View previous topic :: View next topic
|
Author |
Message |
crrindia
Active User
Joined: 02 Jul 2005 Posts: 124 Location: Gurgaon
|
|
|
|
Hi All, can any one of you please let me know how to DEFINE A TABLE Dynamically in the Cobol Program?
Thanks!
Rathna. |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
Back to top |
|
|
vin12pr Warnings : 1 New User
Joined: 14 Jun 2006 Posts: 56
|
|
|
|
Here is a example:
WORKING-STORAGE-SECTION
01 WS-MONTH-DAY-CALENDER.
05 WS-DAY PIC 9(2) OCCURS 1 TO 31 TIMES DEPENDING ON WS-OCCURENCE.
PROCEDURE DIVISION.
IF MONTH = 'FEB' THEN
MOVE 28 TO WS-OCCURENCE
.
.
Based on the value you pass in the procedure division to the WS-OCURENCE vatriable the size of the table will be decided.
Hope it is clear now. |
|
Back to top |
|
|
crrindia
Active User
Joined: 02 Jul 2005 Posts: 124 Location: Gurgaon
|
|
|
|
Hi Thank you very much for your reply. That means creating variable lenght of the tables(OCCURS DEPENDING ON variable-name) are called DYNAMIC, and Fixed lenght of the Tables are called STATIC?
Thanks!
Rathna. |
|
Back to top |
|
|
|