how array can be declare in cobol?

Answer Posted / vinay gautam

This is a working example of 1D arrey...
in last ex. o posted there was a comment line......


Working-storage section.
77 index1 pic 9 value 1.
01 week value 'montuewedthufrisatsun'.
03 days pic x(3) occurs 7 times indexed by idx.

Procedure division.
perform varying index1 from 1 by 1 until index1 >= 8
display days(Index1)
End-Perform.
stop run.


Regards Vinay Gautam

Is This Answer Correct ?    4 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the difference between comp & comp-3?

545


Explain the input procedure and output procedure?

517


Explain how to convert 2010/02/11 to m/dd/yyy.. With string and without string if any other method... Code?

644


What is perform?

535


Explain the types of perform?

525






Define sort?

581


What is sort? And its syntax?

668


Explain the syntax of sort?

560


Explain what all the conditiones required for using open opcode on a file?

503


What are the types of perform?

567


Explain the input procedure?

535


What is the syntax of sort?

538


What is input procedure?

578


How to update data area in cobol 400 program?

579


Explain how to detect record is locked in cobol/400? What is the solution for that?

530