Just Learning - COBOL example of real issue
Posted: Fri Nov 03, 2006 9:32 am
Jan,
This is a simpler example of what this file I'm working with is like. I wish I could send the actual file. I hope I am translating this right. Thanks for your help.
Copy Book:
01 TEST2-Record.
03 ITEM1-CNT PIC 9(2).
03 ITEM2-CNT PIC 9(2).
03 ITEM1-SECTION.
05 ITEM1-SECT OCCURS 10 TIMES.
10 ITEM1 PIC X(2).
03 ITEM2-SECTION REDEFINES ITEM1-SECTION.
05 ITEM2-SECT OCCURS 10 TIMES.
10 ITEM2 PIC X(1).
10 ITEM3 PIC 9(1).
Input Data w/<CR><LF>:
0202aabbA1B1 <CR><LF>
0505zzyyxxwwvvA9B8C7D6E5<CR><LF>
This is a simpler example of what this file I'm working with is like. I wish I could send the actual file. I hope I am translating this right. Thanks for your help.
Copy Book:
01 TEST2-Record.
03 ITEM1-CNT PIC 9(2).
03 ITEM2-CNT PIC 9(2).
03 ITEM1-SECTION.
05 ITEM1-SECT OCCURS 10 TIMES.
10 ITEM1 PIC X(2).
03 ITEM2-SECTION REDEFINES ITEM1-SECTION.
05 ITEM2-SECT OCCURS 10 TIMES.
10 ITEM2 PIC X(1).
10 ITEM3 PIC 9(1).
Input Data w/<CR><LF>:
0202aabbA1B1 <CR><LF>
0505zzyyxxwwvvA9B8C7D6E5<CR><LF>