answersLogoWhite

0

Arrays aren't quite as natural to COBOL as they are to most other languages, but that is a sign of COBOL's age.

01 WS-EMPLOYEE-REC

03 WS-EMPLOYEE-SALARY PIC 99999

OCCURS 10 TIMES

You may think it would make sense to declare all this at level 01, but the OCCURS clause cannot be used at level 01.

You can then use parenthesis to refer to a particular element in the array :

DISPLAY WS-EMPLOYEE-SALARY(3)

This will print out the fifth element.

User Avatar

Wiki User

13y ago

What else can I help you with?

Related Questions

Can you assign value to variable without using picture clause in mainframes?

No. In COBOL, any variable must be declared with PIC statement.


Is COBOL an application program?

No, COBOL is a programming language.


What has the author Andreas S Philippakis written?

Andreas S. Philippakis has written: 'The new COBOL' -- subject(s): COBOL (Computer program language) 'Comprehensive COBOL' -- subject(s): COBOL (Computer program language) 'Information systems through COBOL' -- subject(s): COBOL (Computer program language), Management information systems 'COBOL for business applications' -- subject(s): COBOL (Computer program language)


Are arrays in C created on the stack or the heap?

That depends on where you define them. Arrays defined inside functions are declared on the stack (like other variables defined in functions). Arrays defined outside of any function, or using the static keyword inside a function are allocated in the static data area of the program. Other arrays may be allocated using malloc() (or "new" in C++); these are allocated on the heap.


Are arrays objects?

Yes. Arrays are objects in Java that store multiple variables of the same type. Arrays can hold either primitives or object references, but the array itself will always be an object on the heap, even if the array is declared to hold primitive elements. In other words, there is no such thing as a primitive array, but you can make an array of primitives


What inspired COBOL?

can you tell me what inspired Dr Hooper to invent COBOL


Who is known as the mother of Cobol?

Grace Hopper is known as the Mother of Cobol.


What is the difference between cobol-74 and cobol-85?

COBOL-85 is a later version of COBOL language. COBOL-85 also known as VS COBOL-II provides more features than COBOL-74. Some of the features of COBOL-85 are: 1. In COBOL-85 we can use following delimiters such as END-IF, END-PERFORM,END-STRING,etc. 2. We can use EVALUATE verb in place of complex IF structures. 3. CALL statement can pass variables by CONTENT and BY reference. In COBOL-74 we can only use pass by reference. 4. A new verb CONTINUE is introduced in order to over come the limitations of NEXT SENTENCE verb. 5. COBOL - 85 supports 32 bit addressing mode. UR'S Rj


What has the author Paul Noll written?

Paul Noll has written: 'The COBOL programmers handbook' -- subject(s): COBOL (Computer program language) 'Structured COBOL methods' -- subject(s): COBOL (Computer program language), Structured programming


Where can a person find information about COBOL?

COBOL was originally designed by Grace Hopper and is on of the oldest programming languages. The name stands for Common Business Orientated Language. More information can be found at websites such as Wikipedia.


What is COBOL is it a device or a operating system?

COBOL (common business-oriented language) is an operating system.


What is the Meaning of COBOL?

COBOL stands for COmmon Business-Oriented Language. See Related Links for more information. For the point of COBOL's obsolescence, COBOL also stands for Completely Obsolete Business-Oriented Language.