I have a problem with merging two input VB files & then writing it to another VB file. If I send the output to the SORTOUT DD SYSOUT=*. It works fine.
When I send it to a VB file. It gives error:
ICE043A 9 INVALID DATA SET ATTRIBUTES: OUT RECFM - REASON CODE IS 14
//STEP EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//IN1 DD DSN=U299060.JN2FL1.PS,DISP=SHR
//IN2 DD DSN=U299060.JN2FL2.PS,DISP=SHR
//OUT DD DSN=U299060.JN2FLOUT.PS,DISP=SHR
//SYSIN DD *
JOINKEYS F1=IN1,FIELDS=(1,7,A)
JOINKEYS F2=IN2,FIELDS=(1,7,A)
REFORMAT FIELDS=(F1:1,80,F2:1,80)
JOIN UNPAIRED,F1,F2
OPTION COPY
OUTFIL FNAMES=OUT,BUILD=(1,80,11,80)
/*
//SYSOUT DD SYSOUT=*
//IN1 DD DSN=U299060.JN2FL1.PS,DISP=SHR
//IN2 DD DSN=U299060.JN2FL2.PS,DISP=SHR
//OUT DD DSN=U299060.JN2FLOUT.PS,DISP=SHR
//SYSIN DD *
JOINKEYS F1=IN1,FIELDS=(1,7,A)
JOINKEYS F2=IN2,FIELDS=(1,7,A)
REFORMAT FIELDS=(F1:1,80,F2:1,80)
JOIN UNPAIRED,F1,F2
OPTION COPY
OUTFIL FNAMES=OUT,BUILD=(1,80,11,80)
/*
Here JN2FL1 & JN2FL2 are of type VB.