“Hello” from Russell Haile with DPC. Please allow me to ask for help.
I’m working on a program. The attached copybook states:
******** FIREPEAT-OP-VAR-DATA ********
05 FIREPEAT-FIELDS.
08 FIREPEAT-SUBFIELDS.
10 FIREPEAT-TXT-TITLE
PIC X(00050).
10 FILLER OCCURS 15.
15 FIREPEAT-TXT-ID
PIC 9(008).
15 FIREPEAT-TXT-DESC
PIC X(00070).
15 FIREPEAT-TXT-VENDOR
PIC X(00040).
15 FIREPEAT-TXT-TYPE
PIC X(00010).
15 FIREPEAT-TXT-PRICE
PIC S9(06)V9(02).
The copybook is generated by another system. I can’t do anything about it. I just have to work with what I have.
Attached is the program I’m working on. There’s no use trying to go through it to see what it does. It’s messy and it does not work.
My problems:
- I can look at the copybook and see the occurs = 15.
- I can’t change the copybook
- I don’t know how to make the actual cobol program “know” the value = 15.
Here is my question:
Specifically, the copybook states 10 FILLER OCCURS 15. In the procedure division of the attached program, is there any way to determine the number of occurrences?




