View previous topic :: View next topic
Author
Message
gayathrinag New User Joined: 16 Oct 2008Posts: 37 Location: chennai
Hi,
Here is the requirement.
I have 2 input files.
File1 : Lrecl - 108
File2: Lrecl - 113
I my key is 1,10 in both files. I wanted to get the matched records from
File1, and unmatched records from File1 and Unmatched records File 2.
Below is the sort card i used. but its giving error
JOINKEYS FILES=F1,FIELDS=(1,10,A)
JOINKEYS FILES=F2,FIELDS=(1,10,A)
JOIN UNPAIRED,F1,F2
SORT FIELDS=COPY
REFORMAT FIELDS=(F1:1,110,F2:1,113)
OUTFIL FNAMES=ONLYF1,INCLUDE=(111,1,CH,EQ,C' '),BUILD=(001,110)
OUTFIL FNAMES=ONLYF2,INCLUDE=(001,1,CH,EQ,C' '),BUILD=(111,113)
OUTFIL FNAMES=MATCH,SAVE,BUILD=(1,223)
Error:
JOINKEYS FILES=F1,FIELDS=(1,10,A)
JOINKEYS FILES=F2,FIELDS=(1,10,A)
JOIN UNPAIRED,F1,F2
SORT FIELDS=COPY
REFORMAT FIELDS=(F1:1,110,F2:1,113)
OUTFIL FNAMES=ONLYF1,INCLUDE=(111,1,CH,EQ,C' '),BUILD=(001,110)
OUTFIL FNAMES=ONLYF2,INCLUDE=(001,1,CH,EQ,C' '),BUILD=(111,113)
OUTFIL FNAMES=MATCH,SAVE,BUILD=(1,223)
*
WER268A OUTFIL STATEMENT : SYNTAX ERROR
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
Can you please help me in this
Back to top
dick scherrer Moderator Emeritus Joined: 23 Nov 2006Posts: 19244 Location: Inside the Matrix
Hello,
It may help if you post the jcl used for this execution. . .
Back to top
superk Global Moderator Joined: 26 Apr 2004Posts: 4652 Location: Raleigh, NC, USA
FWIW, I don't have Syncsort, but I'll bet that the OUTFIL statement being flagged should be formatted like this:
OUTFIL FNAMES=(MATCH,SAVE),BUILD=(1,223)
Back to top
gayathrinag New User Joined: 16 Oct 2008Posts: 37 Location: chennai
Hi,
I tried with your suggestion...but it didnt work...sorry...
Back to top
gayathrinag New User Joined: 16 Oct 2008Posts: 37 Location: chennai
here is the jcl:
Code:
//SORTJNF2 DD DISP=SHR,DSN=PROD.FILE.F2
//SORTJNF1 DD DISP=SHR,DSN=PROD.FILE.F1
//SYSOUT DD SYSOUT=*
//MATCH DD DSN=PROD.FILE.F2.MATCH,
// DISP=(NEW,CATLG,DELETE),
// DCB=(MODEL,LRECL=223,RECFM=FB,BLKSIZE=0),
// UNIT=DISK,SPACE=(CYL,(200,20),RLSE)
//ONLYF1 DD DSN=PROD.FILE.F1.UNMTCH,
// DISP=(NEW,CATLG,DELETE),
// DCB=(MODEL,LRECL=223,RECFM=FB,BLKSIZE=0),
// UNIT=DISK,SPACE=(CYL,(200,20),RLSE)
//ONLYF2 DD DSN=PROD.FILE.F2.UNMTCH,
// DISP=(NEW,CATLG,DELETE),
// DCB=(MODEL,LRECL=223,RECFM=FB,BLKSIZE=0),
// UNIT=DISK,SPACE=(CYL,(200,20),RLSE)
//SYSIN DD *
JOINKEYS FILES=F1,FIELDS=(1,10,A)
JOINKEYS FILES=F2,FIELDS=(1,10,A)
JOIN UNPAIRED,F1,F2
SORT FIELDS=COPY
OUTFIL FNAMES=ONLYF1,INCLUDE=(111,1,CH,EQ,C' '),BUILD= (001,110)
OUTFIL FNAMES=ONLYF2,INCLUDE=(001,1,CH,EQ,C' '),BUILD=(111,113)
OUTFIL FNAMES=(MATCH,SAVE),BUILD=(1,223)
If my key is matched i need to get the matched records from File2
Back to top
dick scherrer Moderator Emeritus Joined: 23 Nov 2006Posts: 19244 Location: Inside the Matrix
Hello,
Quote:
I tried with your suggestion...but it didnt work...sorry...
Posting "it didn't work" is simply a waste of everyone's time. . .
What happened? An error? unexpected/unwanted output? An abend?
Back to top
gayathrinag New User Joined: 16 Oct 2008Posts: 37 Location: chennai
Its abended with syntax error.
SYNCSORT LICENSED FOR CPU SERIAL NUMBER 1F464, MODEL 2097 603
SYSIN :
JOINKEYS FILES=F1,FIELDS=(1,10,A)
JOINKEYS FILES=F2,FIELDS=(1,10,A)
JOIN UNPAIRED,F1,F2
SORT FIELDS=COPY
REFORMAT FIELDS=(F1:1,110,F2:1,113)
OUTFIL FNAMES=ONLYF1,INCLUDE=(111,1,CH,EQ,C' '),BUILD=(001,110)
OUTFIL FNAMES=ONLYF2,INCLUDE=(001,1,CH,EQ,C' '),BUILD=(111,113)
OUTFIL FNAMES=(MATCH,SAVE),BUILD=(1,223)
*
WER268A OUTFIL STATEMENT : SYNTAX ERROR
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
Back to top
Arun Raj Moderator Joined: 17 Oct 2006Posts: 2481 Location: @my desk
What's you input LRECLs?
Correct your OUTFIL SYNTAX and check the file positions.
Back to top
Arun Raj Moderator Joined: 17 Oct 2006Posts: 2481 Location: @my desk
Your file-1 LRECL is 108 and you're trying to access 110th byte. Correct it
Quote:
REFORMAT FIELDS=(F1:1,110,F2:1,113)
Back to top
Arun Raj Moderator Joined: 17 Oct 2006Posts: 2481 Location: @my desk
superk wrote:
FWIW, I don't have Syncsort, but I'll bet that the OUTFIL statement being flagged should be formatted like this:
OUTFIL FNAMES=(MATCH,SAVE),BUILD=(1,223)
Kevin,
Syncsort gives an error if the SAVE "parameter" is enclosed within parantheses saying "SAVE" ddname not defined.
If OUTFIL FNAMES is used, then the parantheses followed must be having only ddnames.
Since the "SAVE" is used in this case as a parameter and not a ddname, the OUTFIL given by the OP does n't seem to have any problem.
Back to top
Please enable JavaScript!