I have to compare field from file1 started from position 12 11 byte, with field from file2 started
from position 1 11 byte. I got error, please take a look my JCL. I appreciate all your help.
* ADD '22' IDENTIFIER FOR FILE2 RECORDS.
COPY FROM(IN2) TO(T1) USING(CTL2)
SYT020I SYNCSORT CALLED WITH IDENTIFIER "0002"
SYT030I OPERATION COMPLETED WITH RETURN CODE 0
* SPLICE TO MATCH UP RECORDS AND WRITE THEM TO THEIR
* APPROPRIATE OUTPUT FILES.
SPLICE FROM(T1) TO(OUT12) ON(1,22,CH) WITH(26,1) -
USING(CTL3) KEEPNODUPS
SYT020I SYNCSORT CALLED WITH IDENTIFIER "0003"
SYT012E SYNCSORT COMPLETED UNSUCCESSFULLY
SYT030I OPERATION COMPLETED WITH RETURN CODE 16
SYT015I PROCESSING MODE CHANGED FROM "STOP" TO "SCAN" DUE TO OPERATION FAILURE
SYT004I SYNCTOOL PROCESSING COMPLETED WITH RETURN CODE 16
JCL
//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN1 DD DISP=SHR,DSN=D2HG.WITHOUT.DUP.RECORDS.NTFY.R1000.TEST
//IN2 DD DISP=SHR,DSN=D2HG.WITHOUT.DUP.RECORDS.PROF.R1000
//***OUT12 DD SYSOUT=* NAMES IN FILE1 AND FILE2
//OUT12 DD DSN=D2HG.MATCH1,
// DISP=(NEW,CATLG,DELETE),
// SPACE=(CYL,(200,20),RLSE),
// DCB=(BLKSIZE=0,LRECL=22,RECFM=FB,DSORG=PS)
//****OUT1 DD SYSOUT=* NAMES IN FILE1 ONLY
//OUT1 DD DSN=D2HG.NTFY1,
// DISP=(NEW,CATLG,DELETE),
// SPACE=(CYL,(200,20),RLSE),
// DCB=(BLKSIZE=0,LRECL=22,RECFM=FB,DSORG=PS)
//***OUT2 DD SYSOUT=* NAMES IN FILE2 ONLY
//OUT2 DD DSN=D2HG.PROF1,
// DISP=(NEW,CATLG,DELETE),
// SPACE=(CYL,(1200,20),RLSE),
// DCB=(BLKSIZE=0,LRECL=22,RECFM=FB,DSORG=PS)
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(200,10),RLSE),
//** USE MOD FOR T1
// DISP=(MOD,PASS)
//TOOLIN DD *
* ADD '11' IDENTIFIER FOR FILE1 RECORDS.
COPY FROM(IN1) TO(T1) USING(CTL1)
* ADD '22' IDENTIFIER FOR FILE2 RECORDS.
COPY FROM(IN2) TO(T1) USING(CTL2)
* SPLICE TO MATCH UP RECORDS AND WRITE THEM TO THEIR
* APPROPRIATE OUTPUT FILES.
SPLICE FROM(T1) TO(OUT12) ON(1,22,CH) WITH(26,1) -
USING(CTL3) KEEPNODUPS
/*
//CTL1CNTL DD *
* MARK FILE1 RECORDS WITH '11'
OUTREC FIELDS=(12,11,22:C'11')
/*
//CTL2CNTL DD *
* MARK FILE2 RECORDS WITH '22'
OUTREC FIELDS=(1,11,12:C'22')
/*
//CTL3CNTL DD *
* WRITE MATCHING RECORDS TO OUT12 FILE. REMOVE ID.
OUTFIL FNAMES=OUT12,INCLUDE=(12,2,CH,EQ,C'12'),OUTREC=(1,11)
* WRITE FILE1 ONLY RECORDS TO OUT1 FILE. REMOVE ID.
OUTFIL FNAMES=OUT1,INCLUDE=(22,2,CH,EQ,C'11'),OUTREC=(1,11)
* WRITE FILE2 ONLY RECORDS TO OUT2 FILE. REMOVE ID.
OUTFIL FNAMES=OUT2,INCLUDE=(12,2,CH,EQ,C'22'),OUTREC=(1,11)
/*
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
Posted: Wed Apr 26, 2006 10:47 am Post subject:
Quote:
WER247A OUT12 HAS INCOMPATIBLE LRECL
WER247A OUT1 HAS INCOMPATIBLE LRECL
WER247A OUT2 HAS INCOMPATIBLE LRECL
ldushkin,
The above messages should tell you what went wrong with the job. T1 has an lrecl of 23 and you hardcoded an lrecl of 22 on all the output files.
With sort you never have to code the DCB parameters as they will be automatically calculated by sort. So remove the DCB parm on the OUT files and your job should run ok.
I just ran my JCL it works fine, but the field {0077215013 has in both file after ran only insert in file D2HG.NTFY1, not insert in file D2HG.MATCH1 and full file D2HG.PROF1.
My output:
D2HG.MATCH1 empty
D2HG.NTFY1 1 record
D2HG.PROF1 1000 records
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
Posted: Wed Apr 26, 2006 1:11 pm Post subject:
ldushkin,
You are just wasting my time as well as your time. First understand the job and then code the job. If you then get a problem then come back with messages and we can help you.
Here is a job which will give you the desired results.
Code:
//STEP0200 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN1 DD *
{0077215012{0077215013
//IN2 DD *
{0000000116
{0077215013
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(TRK,(5,5)),
// DISP=(MOD,PASS)
//OUT12 DD SYSOUT=*
//OUT1 DD SYSOUT=*
//OUT2 DD SYSOUT=*
//TOOLIN DD *
* ADD '11' IDENTIFIER FOR FILE1 RECORDS.
COPY FROM(IN1) TO(T1) USING(CTL1)
* ADD '22' IDENTIFIER FOR FILE2 RECORDS.
COPY FROM(IN2) TO(T1) USING(CTL2)
* SPLICE TO MATCH UP RECORDS AND WRITE THEM TO THEIR
* APPROPRIATE OUTPUT FILES.
SPLICE FROM(T1) TO(OUT12) ON(12,11,CH) WITH(24,1) -
USING(CTL3) KEEPNODUPS
/*
//CTL1CNTL DD *
* MARK FILE1 RECORDS WITH '11'
OUTREC FIELDS=(01,22,C'11')
/*
//CTL2CNTL DD *
* MARK FILE2 RECORDS WITH '22'
OUTREC FIELDS=(11X,01,11,C'22')
/*
//CTL3CNTL DD *
* WRITE MATCHING RECORDS TO OUT12 FILE. REMOVE ID.
OUTFIL FNAMES=OUT12,INCLUDE=(23,2,CH,EQ,C'12'),OUTREC=(1,22)
* WRITE FILE1 ONLY RECORDS TO OUT1 FILE. REMOVE ID.
OUTFIL FNAMES=OUT1,INCLUDE=(23,2,CH,EQ,C'11'),OUTREC=(1,22)
* WRITE FILE2 ONLY RECORDS TO OUT2 FILE. REMOVE ID.
OUTFIL FNAMES=OUT2,INCLUDE=(23,2,CH,EQ,C'22'),OUTREC=(1,22)
/*
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum