Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
Posted: Thu Aug 25, 2005 6:24 am Post subject:
Sharada,
Try this JCL.
Code:
//********************************************************************
//* THIS STEP WRITES 3 FILES. *
//* A MATCH FILE(MATCH) WHERE RECORDS FROM FILE1 AND FILE2 ARE MATCH *
//* AN OUTPUT FILE(ONLYF1) WHEN THE KEY IS FOUND ONLY ON FILE1 *
//* AN OUTPUT FILE(ONLYF2) WHEN THE KEY IS FOUND ONLY ON FILE2 *
//********************************************************************
//STEP0100 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTJNF1 DD *
100006US
300006UK
200006GR
//SORTJNF2 DD *
200006 EU
400006 AS
//MATCH DD SYSOUT=*
//ONLYF1 DD SYSOUT=*
//ONLYF2 DD SYSOUT=*
//SYSIN DD *
JOINKEYS FILES=F1,FIELDS=(01,6,A)
JOINKEYS FILES=F2,FIELDS=(01,6,A)
REFORMAT FIELDS=(F1:1,08,
F2:1,09),FILL=X'FF'
SORT FIELDS=(1,6,CH,A)
JOIN UNPAIRED
OUTFIL FNAMES=ONLYF1,INCLUDE=(09,01,BI,EQ,X'FF'),
OUTREC=(1,08)
OUTFIL FNAMES=ONLYF2,INCLUDE=(01,01,BI,EQ,X'FF'),
OUTREC=(09,09)
OUTFIL FNAMES=MATCH,SAVE,
OUTREC=(01,08,16,2)
/*
Joined: 24 Aug 2005 Posts: 32 Topics: 14 Location: Hyderabad
Posted: Thu Aug 25, 2005 7:29 am Post subject: HI KOLUSU, DIDN'T WORK
Hi Kolusu,
I am getting ABENDU0016
I am pasting the spool info.
Code:
SYSIN :
JOINKEYS FILES=F1,FIELDS=(01,6,A)
*
JOINKEYS FILES=F2,FIELDS=(01,6,A)
*
REFORMAT FIELDS=(F1:1,08,
*
F2:1,09),FILL=X'FF'
SORT FIELDS=(1,6,CH,A)
JOIN UNPAIRED
*
OUTFIL FNAMES=ONLYF1,INCLUDE=(09,01,BI,EQ,X'FF'),
OUTREC=(1,08)
OUTFIL FNAMES=ONLYF2,INCLUDE=(01,01,BI,EQ,X'FF'),
OUTREC=(09,09)
OUTFIL FNAMES=MATCH,SAVE,
OUTREC=(01,08,16,2)
/*
*
WER275A NO KEYWORDS FOUND ON CONTROL STATEMENT
WER275A NO KEYWORDS FOUND ON CONTROL STATEMENT
WER275A NO KEYWORDS FOUND ON CONTROL STATEMENT
WER275A NO KEYWORDS FOUND ON CONTROL STATEMENT
WER275A NO KEYWORDS FOUND ON CONTROL STATEMENT
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
and one more thing can you please explain me this,
thanks for your time.
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
Posted: Thu Aug 25, 2005 8:02 am Post subject:
Sharada,
The first example might not have worked because of the syncsort version. Look in your sysout and the first line mentions the version of syncsort. The first example works only with SYNCSORT FOR Z/OS 1.2 . If your shop did have the SYNCSORT FOR Z/OS 1.2 then make sure that sysin control cards start from pos 2
Quote:
If you have time please explain.
Look at the 2nd post from bottom in the following topic which explains the logic.
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