how array can be declare in cobol?

Answer Posted / vinay gautam

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)
compute index1 = index1 + 1
end-perform.
stop run.

Is This Answer Correct ?    7 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the input procedure and output procedure?

587


What are the types of perform?

644


Define redefine?

648


Explain the output procedure?

666


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

763






Explain the syntax of redefine?

586


Define sort?

671


How to detect record is locked in cobol/400?

623


What are fillers? What is the actual use of fillers? With mall/simple example?

631


Explain how to update data area in cobol 400 program?

673


Define perform? And its types?

597


What is perform?

620


What is output procedure?

611


Explain the types of perform?

597


What is sort? And its syntax?

740