Guest_imported
New member
- Jan 1, 1970
- 0
Greetings once again, I have attached one of the two tables and my procedure division code,
Ultimatly, I have the branch number in the input file, and I need to use that to pull off the District-code,
If you could please help or, or direct me to a good example, I would be most greatful.
Thanks you every so kindly.
Dash
01 BRANCH-VALUES.
05 BRANCH-NUMBER.
10 PIC 999 VALUE 123.
10 PIC 999 VALUE 221.
10 PIC 999 VALUE 333.
10 PIC 999 VALUE 414.
10 PIC 999 VALUE 515.
10 PIC 999 VALUE 616.
10 PIC 999 VALUE 717.
10 PIC 999 VALUE 818.
10 PIC 999 VALUE 919.
05 DISTRICT-CODE.
10 PIC 9 VALUE 1.
10 PIC 9 VALUE 1.
10 PIC 9 VALUE 2.
10 PIC 9 VALUE 2.
10 PIC 9 VALUE 3.
10 PIC 9 VALUE 4.
10 PIC 9 VALUE 4.
10 PIC 9 VALUE 5.
01 BRANCH-TABLE REDEFINES BRANCH-VALUES.
05 ROWS OCCURS 2 TIMES.
10 COLOUMS OCCURS 9 TIMES PIC 999.
Procedure Division
MOVE COLOUMS(BRANCH-NUMBER-I) TO DISTRICT-CODE-O.
Ultimatly, I have the branch number in the input file, and I need to use that to pull off the District-code,
If you could please help or, or direct me to a good example, I would be most greatful.
Thanks you every so kindly.
Dash
01 BRANCH-VALUES.
05 BRANCH-NUMBER.
10 PIC 999 VALUE 123.
10 PIC 999 VALUE 221.
10 PIC 999 VALUE 333.
10 PIC 999 VALUE 414.
10 PIC 999 VALUE 515.
10 PIC 999 VALUE 616.
10 PIC 999 VALUE 717.
10 PIC 999 VALUE 818.
10 PIC 999 VALUE 919.
05 DISTRICT-CODE.
10 PIC 9 VALUE 1.
10 PIC 9 VALUE 1.
10 PIC 9 VALUE 2.
10 PIC 9 VALUE 2.
10 PIC 9 VALUE 3.
10 PIC 9 VALUE 4.
10 PIC 9 VALUE 4.
10 PIC 9 VALUE 5.
01 BRANCH-TABLE REDEFINES BRANCH-VALUES.
05 ROWS OCCURS 2 TIMES.
10 COLOUMS OCCURS 9 TIMES PIC 999.
Procedure Division
MOVE COLOUMS(BRANCH-NUMBER-I) TO DISTRICT-CODE-O.