I have a requirement to change the group number in the below line as mentioned below
I want to match the branch from file and file2 if it matches update group from file2 into file1 and write to file3, Using the below code, I am getting empty file and also below error later on.
//EASY01 EXEC PGM=EZTPA00
//STEPLIB DD DSN=SW.PANPLUS.LOAD,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=I
//EZTVFM DD UNIT=SYSDA,SPACE=(4096,(600,600))
//FILE1 DD DISP=SHR,DSN=AAAAAAA.P.COPY1.YR2012
//FILE2 DD DISP=SHR,DSN=BBBBB.OY2012.CLONE
//FILE3 DD DISP=SHR,DSN=AAAAAAA.P.COPY1.YR2012.CLONE
//SYSIN DD *
*
FILE FILE1
EXT-EMPNO-REC 1 2025 A
EXT-BRANCH 17 4 N
EXT-GROUP 14 3 A
EXT-GROUP1 77 3 A
FILE FILE2
D5-TAB-RECORD 1 100 A
D5-BRANCH-DATA 1 4 N
I-D5-GROUP 7 3 A
FILE FILE3
D5-OUT-REC 1 2025 A
JOB INPUT (FILE1 KEY(EXT-BRANCH) +
FILE2 KEY(D5-BRANCH-DATA))
IF MATCHED
D5-OUT-REC = EXT-EMPNO-REC
MOVE I-D5-GROUP TO EXT-GROUP
PUT FILE3
GOTO JOB
END-IF
IF FILE1
PUT FILE3
GOTO JOB
END-IF
IF FILE2
PUT FILE3
GOTO JOB
END-IF
//STEPLIB DD DSN=SW.PANPLUS.LOAD,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=I
//EZTVFM DD UNIT=SYSDA,SPACE=(4096,(600,600))
//FILE1 DD DISP=SHR,DSN=AAAAAAA.P.COPY1.YR2012
//FILE2 DD DISP=SHR,DSN=BBBBB.OY2012.CLONE
//FILE3 DD DISP=SHR,DSN=AAAAAAA.P.COPY1.YR2012.CLONE
//SYSIN DD *
*
FILE FILE1
EXT-EMPNO-REC 1 2025 A
EXT-BRANCH 17 4 N
EXT-GROUP 14 3 A
EXT-GROUP1 77 3 A
FILE FILE2
D5-TAB-RECORD 1 100 A
D5-BRANCH-DATA 1 4 N
I-D5-GROUP 7 3 A
FILE FILE3
D5-OUT-REC 1 2025 A
JOB INPUT (FILE1 KEY(EXT-BRANCH) +
FILE2 KEY(D5-BRANCH-DATA))
IF MATCHED
D5-OUT-REC = EXT-EMPNO-REC
MOVE I-D5-GROUP TO EXT-GROUP
PUT FILE3
GOTO JOB
END-IF
IF FILE1
PUT FILE3
GOTO JOB
END-IF
IF FILE2
PUT FILE3
GOTO JOB
END-IF
OPTIONS FOR THIS RUN - ABEXIT SNAP DEBUG (STATE FLDCHK NOXREF) LIST (PARM FILE) PRESIZE 512
SORT (DEVICE SYSDA ALTSEQ NO MSG DEFAULT MEMORY MAX WORK 3) VFM ( 64)
15 *******A006 PROGRAM INTERRUPT - CODE 7 (DATA EXCP)
INTERRUPT OCCURRED AT 0214 BLOCK 1 FROM EP CA-EASYTRIEVE PLUS 6.2 9606-24/04/13-10.44-JSN00015
INSTRUCTION AT 01E224 IS F89954505316
FIRST OPERAND ADDRESS 015450 CONTENTS 00000000000000000000
SECOND OPERAND ADDRESS 015316 CONTENTS 00000000000000000000
PSW AT INTERRUPT 07850007 E001E22A
REGISTERS AT INTERRUPT
SORT (DEVICE SYSDA ALTSEQ NO MSG DEFAULT MEMORY MAX WORK 3) VFM ( 64)
15 *******A006 PROGRAM INTERRUPT - CODE 7 (DATA EXCP)
INTERRUPT OCCURRED AT 0214 BLOCK 1 FROM EP CA-EASYTRIEVE PLUS 6.2 9606-24/04/13-10.44-JSN00015
INSTRUCTION AT 01E224 IS F89954505316
FIRST OPERAND ADDRESS 015450 CONTENTS 00000000000000000000
SECOND OPERAND ADDRESS 015316 CONTENTS 00000000000000000000
PSW AT INTERRUPT 07850007 E001E22A
REGISTERS AT INTERRUPT
Please let me know why this is failing
Code'd