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

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

530


Explain the syntax of sort?

546


What is output procedure?

529


Explain the difference between comp & comp-3?

529


Explain how to update data area in cobol 400 program?

563






Explain the output procedure?

560


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

487


Explain the syntax of redefine?

507


What is sort? And its syntax?

656


What are the types of perform?

557


I like to know if possible to use %TRIM or any statement with prefiv "%" like RPG ile programs. thanks

2051


Explain the input procedure?

525


Explain the input procedure and output procedure?

508


What is redefine?

540


What is the syntax of sort?

525