Hi BillyBoyo,
I tested deleting the rows and pasting the logic and it worked =). So it really is the SORT that generates this DSN that's causing the problem, as you said.
The DSN is FB/80:
ALLOCATED TRACKS ===> 1 DSORG ===> PS
USED TRACKS ===> 1 RECFM ===> FB
ALLOCATED EXTENTS ===> 1 LRECL ===> 80
I have one dataset with two values, one date and one number, and I need to compare these values with the records in another dataset.
I first generate with LRECL 45, because with 80 it says “INCOMPATIBLEE LRECL”. Then in another step I copy the content to dataset that has LRECL equals 80.
//SORT001 EXEC PGM=SORT,COND=(0,NE,SYS112)
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=sortin-dataset,DISP=SHR
//SORTOUT DD DSN=temp-sysin-45,
// DISP=(,CATLG),RECFM=FB,DSORG=PS,LRECL=045,AVGREC=K,
// SPACE=(045,(100,100),RLSE)
//SYSIN DD *
SORT FIELDS=(01,16,ZD,D)
OUTFIL ENDREC=1,
BUILD=(C' SORT FIELDS=(01,01,ZD,A, ** TIP-REG',/,
C' 16,04,ZD,A, ** ANO DT-JTRB',/,
C' 13,02,ZD,A, ** MES DT-JTRB',/,
C' 10,02,ZD,A, ** DIA DT-JTRB',/,
C' 02,08,ZD,A) ** NR-PSSL',/,
C' INREC FIELDS=(01,231,16,04,13,02,10,02)',/,
C' OUTFIL INCLUDE=((232,08,ZD,EQ,',01,08,C',AND,',/,
C' 02,08,ZD,GT,',09,08,C'),OR,',/,
C' 232,08,ZD,GT,',01,08,C',OR,',/,
C' 1,1,ZD,EQ,0,OR,1,1,ZD,EQ,9),',/,
C' OUTREC=(01,231)')
sysout:
SYSIN :
SORT FIELDS=(01,16,ZD,D)
OUTFIL ENDREC=1,
BUILD=(C' SORT FIELDS=(01,01,ZD,A, ** TIP-REG',/,
C' 16,04,ZD,A, ** ANO DT-JTRB',/,
C' 13,02,ZD,A, ** MES DT-JTRB',/,
C' 10,02,ZD,A, ** DIA DT-JTRB',/,
C' 02,08,ZD,A) ** NR-PSSL',/,
C' INREC FIELDS=(01,231,16,04,13,02,10,02)',/,
C' OUTFIL INCLUDE=((232,08,ZD,EQ,',01,08,C',AND,',/,
C' 02,08,ZD,GT,',09,08,C'),OR,',/,
C' 232,08,ZD,GT,',01,08,C',OR,',/,
C' 1,1,ZD,EQ,0,OR,1,1,ZD,EQ,9),',/,
C' OUTREC=(01,231)')
WER276B SYSDIAG= 11146638, 15218035, 15218035, 5615775
WER164B 24,612K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,
WER164B 0 BYTES RESERVE REQUESTED, 24,564K BYTES USED
WER146B 12K BYTES OF EMERGENCY SPACE ALLOCATED
WER108I SORTIN : RECFM=FB ; LRECL= 16; BLKSIZE= 27984
WER073I SORTIN : DSNAME=xxx
WER110I SORTOUT : RECFM=FB ; LRECL= 45; BLKSIZE= 27990
WER074I SORTOUT : DSNAME=xxx
WER410B 23,584K BYTES OF VIRTUAL STORAGE AVAILABLE ABOVE THE 16MEG LINE,
WER410B 0 BYTES RESERVE REQUESTED, 23,568K BYTES USED
WER036B G=6996,B=3327
WER045C END SORT PHASE
WER418I DATASPACE(S) AND/OR ZSPACE USED
WER405I SORTOUT : DATA RECORDS OUT 1; TOTAL RECORDS OUT
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER416B SORTIN : EXCP'S=1,UNIT=3390,DEV=A32E,CHP=(D8D9DADB,1),VOL=DS0X
WER416B OUTFIL WAS USED FOR SORTOUT
WER246I FILESIZE 1,120 BYTES
WER054I RCD IN 70, OUT 70
NOEQUALS, BALANCE IN EFFECT
RELEASE 1.4 BATCH 0520 TPF LEVEL 1.0
END SYNCSORT - Jxxx,SORT001,,DIA
//SORT002 EXEC PGM=SORT,COND=(0,NE,SYS112)
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=temp-sysin-45,DISP=SHR
//SORTOUT DD DSN=sysin-80,
// DISP=(,CATLG),RECFM=FB,DSORG=PS,LRECL=080,AVGREC=K,
// SPACE=(080,(100,100),RLSE)
//SYSIN DD *
OPTION COPY
sysout:
SYSIN :
OPTION COPY
WER276B SYSDIAG= 11144149, 15210510, 15210510, 5615775
WER164B 8,884K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,
WER164B 0 BYTES RESERVE REQUESTED, 2,420K BYTES USED
WER146B 12K BYTES OF EMERGENCY SPACE ALLOCATED
WER108I SORTIN : RECFM=FB ; LRECL= 45; BLKSIZE= 27990
WER073I SORTIN : DSNAME=xxx
WER110I SORTOUT : RECFM=FB ; LRECL= 80; BLKSIZE= 27920
WER074I SORTOUT : DSNAME=xxx
WER462I OUTPUT LRECL DIFFERS FROM SORTOUT LRECL
WER410B 7,856K BYTES OF VIRTUAL STORAGE AVAILABLE ABOVE THE 16MEG LINE,
WER410B 0 BYTES RESERVE REQUESTED, 2,276K BYTES USED
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER416B SORTIN : EXCP'S=1,UNIT=3390,DEV=A0A7,CHP=(D8D9DADB,1),VOL=DS0X
WER416B SORTOUT : EXCP'S=1,UNIT=3390,DEV=A2CA,CHP=(D8D9DADB,1),VOL=DS0X
WER416B TOTAL OF 2 EXCP'S ISSUED FOR COPYING
WER054I RCD IN 11, OUT 11
WER169I RELEASE 1.4 BATCH 0520 TPF LEVEL 1.0
WER052I END SYNCSORT - Jxxx,SORT002,,DIAG=AE00,710A,8284,00CE,E66A,4