Length Of leyword in cobol
Posted: Sat Nov 26, 2016 3:49 pm
What is the output came after giving the LENGTH OF keyword to some variable
In program ws-variable define in working storage section as
01 WS-HOLI-TABLE.
03 WS-HOLIDAY-RECORD OCCURS 3 TIMES
INDEXED BY
X-HOLIDAY.
07 WS-HOLIDAY PIC 9(07).
And in procedure division they are using this line of code
INITIALIZE WS-HOLIDAY-RECORD(1)
MOVE WS-HOLI-TABLE TO
WS-HOLI-TABLE ( LENGTH OF WS-HOLIDAY-RECORD(1) + 1 : )
Please tell the output that I get from the below line
LENGTH OF WS-HOLIDAY-RECORD(1) + 1 :
is it this below I am not sure...!!
INITIALIZE WS-HOLIDAY-RECORD(1)
MOVE WS-HOLI-TABLE TO WS-HOLI-TABLE(8:)
In program ws-variable define in working storage section as
01 WS-HOLI-TABLE.
03 WS-HOLIDAY-RECORD OCCURS 3 TIMES
INDEXED BY
X-HOLIDAY.
07 WS-HOLIDAY PIC 9(07).
And in procedure division they are using this line of code
INITIALIZE WS-HOLIDAY-RECORD(1)
MOVE WS-HOLI-TABLE TO
WS-HOLI-TABLE ( LENGTH OF WS-HOLIDAY-RECORD(1) + 1 : )
Please tell the output that I get from the below line
LENGTH OF WS-HOLIDAY-RECORD(1) + 1 :
is it this below I am not sure...!!
INITIALIZE WS-HOLIDAY-RECORD(1)
MOVE WS-HOLI-TABLE TO WS-HOLI-TABLE(8:)