Rob Wunderlich
2005-05-11 23:10:34 UTC
A of my colleague has asked me a COBOL (not my langauge) question. He is
using the construct below. His objective is to minimize storage
requirements. My RFTM does not make it clear if the use of DEPENDING ON
actually results in less getmained storage (assuming LP-TOKEN-COUNT <
99999) than without using DEPENDING ON.
Does anyone know for sure how this works? Will storage for 99999 occurences
be established regardless of the value of LP-TOKEN-COUNT?
Thanks,
Rob
01 LP-TOKEN-BYTE-CODE.
05 LP-TOKEN-X.
10 LP-TOKEN-COUNT PIC S9(9) COMP VALUE 0.
10 LP-TOKEN-ENTRY OCCURS 0 TO 99999 TIMES
DEPENDING ON
LP-TOKEN-COUNT.
15 LP-TOKEN-TYPE PIC S9(2) COMP.
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html
using the construct below. His objective is to minimize storage
requirements. My RFTM does not make it clear if the use of DEPENDING ON
actually results in less getmained storage (assuming LP-TOKEN-COUNT <
99999) than without using DEPENDING ON.
Does anyone know for sure how this works? Will storage for 99999 occurences
be established regardless of the value of LP-TOKEN-COUNT?
Thanks,
Rob
01 LP-TOKEN-BYTE-CODE.
05 LP-TOKEN-X.
10 LP-TOKEN-COUNT PIC S9(9) COMP VALUE 0.
10 LP-TOKEN-ENTRY OCCURS 0 TO 99999 TIMES
DEPENDING ON
LP-TOKEN-COUNT.
15 LP-TOKEN-TYPE PIC S9(2) COMP.
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html