how array can be declare in cobol?

Answer Posted / ashish

we declare table as
01 SALES-OF-YEAR-2010 OCCURS 12 TIMES indexed by YY.
02 MONTH PIC A(10).
02 NUM-OF-UNITS PIC 9(7).
02 PRICE-OF-UNIT PIC 9(5).

and we can call table elemnts as follows

procedure division.
.......
.......
MOVE 1 TO YY.
DISPLAY MONTH(YY).

Is This Answer Correct ?    9 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is output procedure?

543


Explain the output procedure?

573


Define redefine?

559


Explain the syntax of sort?

561


What is comp?

549






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

531


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

504


Explain the difference between comp & comp-3?

545


Define perform? And its types?

504


Explain the input procedure and output procedure?

518


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

552


How to update data area in cobol 400 program?

579


Explain the difference between section, paragraph and sentences?

510


What is the syntax of redefine?

535


Explain the syntax of redefine?

517