Passing default value to variable
Posted: Thu Mar 12, 2020 6:25 pm
Hi All,
I have defined one below variable in my program in working section. I need to initialize or pass the default values to the variable before using it without using INITIALIZE syntax of cobol.
011900 01 ORG-COUNTS.
012000 03 CARD-TYPE OCCURS 8 TIMES
012200 INDEXED BY CARD-TYPE-IDX.
012300 05 ACT-CNT OCCURS 90 TIMES
012400 INDEXED BY ACT-CNT-IDX
012500 PIC S9(12) COMP-3.
012600*
Simply move statement like below is not working as expected.
001112 106412 MOVE ZEROES TO ORG-COUNTS.
Kindly suggest.
Thanks in advance.
I have defined one below variable in my program in working section. I need to initialize or pass the default values to the variable before using it without using INITIALIZE syntax of cobol.
011900 01 ORG-COUNTS.
012000 03 CARD-TYPE OCCURS 8 TIMES
012200 INDEXED BY CARD-TYPE-IDX.
012300 05 ACT-CNT OCCURS 90 TIMES
012400 INDEXED BY ACT-CNT-IDX
012500 PIC S9(12) COMP-3.
012600*
Simply move statement like below is not working as expected.
001112 106412 MOVE ZEROES TO ORG-COUNTS.
Kindly suggest.
Thanks in advance.