the input file 1 is a sequential file with an LRECL=500 and FB. Key in file 1 starts in position 17 for a length of 10
the input file 2 is LRECL=120 and is FB the key in file 2 starts in position 1 for a length of 10
I want to overlay position 434 in File 1(currently initialized and empty) with the field from File 2 which is in position 113 for 1 byte that is either an 'I' or an 'R'
I have tried to search these forums for help and found the following JCL.. when I try it, my field in file 1 is not populating from file 2.
Any help would be greatly appreciated!
//STEP01 EXEC PGM=SORT
//*
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSSNAP DD SYSOUT=*
//SYSDUMP DD SYSOUT=*
//*
//SORTJNF1 DD DSN=file1,
// DISP=SHR
//SORTJNF2 DD DSN=file 2,
// DISP=SHR
//SORTOUT DD DSN=abc.output.file,
// DISP=(NEW,CATLG,DELETE),
// SPACE=(CYL,(100,50),RLSE),
// DCB=(LRECL=500,BLKSIZE=0,RECFM=FB)
//SORTWK01 DD UNIT=(DASD,7),SPACE=(CYL,(1,50),RLSE)
//SORTWK02 DD UNIT=(DASD,7),SPACE=(CYL,(1,50),RLSE)
//SORTWK03 DD UNIT=(DASD,7),SPACE=(CYL,(1,50),RLSE)
//SORTWK04 DD UNIT=(DASD,7),SPACE=(CYL,(1,50),RLSE)
//SORTWK05 DD UNIT=(DASD,7),SPACE=(CYL,(1,50),RLSE)
//SORTWK06 DD UNIT=(DASD,7),SPACE=(CYL,(1,50),RLSE)
//*
//SYSIN DD *
JOINKEYS FILE=F1,FIELDS=(17,10,A)
JOINKEYS FILE=F2,FIELDS=(1,10,A)
JOIN UNPAIRED,F1
REFORMAT FIELDS=(F1:1,500,?,F2:113,1)
OPTION COPY
OUTFIL IFOUTLEN=500,
IFTHEN=(WHEN=(501,1,CH,EQ,C'B'),OVERLAY=(434:502,1))
//*
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSSNAP DD SYSOUT=*
//SYSDUMP DD SYSOUT=*
//*
//SORTJNF1 DD DSN=file1,
// DISP=SHR
//SORTJNF2 DD DSN=file 2,
// DISP=SHR
//SORTOUT DD DSN=abc.output.file,
// DISP=(NEW,CATLG,DELETE),
// SPACE=(CYL,(100,50),RLSE),
// DCB=(LRECL=500,BLKSIZE=0,RECFM=FB)
//SORTWK01 DD UNIT=(DASD,7),SPACE=(CYL,(1,50),RLSE)
//SORTWK02 DD UNIT=(DASD,7),SPACE=(CYL,(1,50),RLSE)
//SORTWK03 DD UNIT=(DASD,7),SPACE=(CYL,(1,50),RLSE)
//SORTWK04 DD UNIT=(DASD,7),SPACE=(CYL,(1,50),RLSE)
//SORTWK05 DD UNIT=(DASD,7),SPACE=(CYL,(1,50),RLSE)
//SORTWK06 DD UNIT=(DASD,7),SPACE=(CYL,(1,50),RLSE)
//*
//SYSIN DD *
JOINKEYS FILE=F1,FIELDS=(17,10,A)
JOINKEYS FILE=F2,FIELDS=(1,10,A)
JOIN UNPAIRED,F1
REFORMAT FIELDS=(F1:1,500,?,F2:113,1)
OPTION COPY
OUTFIL IFOUTLEN=500,
IFTHEN=(WHEN=(501,1,CH,EQ,C'B'),OVERLAY=(434:502,1))