View previous topic :: View next topic
|
Author |
Message |
mvmadhavi
New User
Joined: 09 Nov 2006 Posts: 21
|
|
|
|
Hi,
I have two files
file 1 has 10 records
file2 has 3 records which are in file1
i need to eliminate those 3 records from file 1 and remaining 7 records
should be written to a new output file is there a synsort steps for these...
Thanks
Madhavi |
|
Back to top |
|
|
ParagChouguley
Active User
Joined: 03 Feb 2007 Posts: 175 Location: PUNE(INDIA)
|
|
|
|
Assuming you do not have duplicates in your first file of 10 records, here is a job for your requirement.
Code: |
//S1 EXEC PGM=SYNCTOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//*
//IN1 DD *
RECORD 01
RECORD 02
RECORD 03
RECORD 04
RECORD 05
RECORD 06
RECORD 07
RECORD 08
RECORD 09
RECORD 10
/*
//IN2 DD *
RECORD 01
RECORD 05
RECORD 09
/*
//OUT DD DSN=OUTPUT-FILE-NAME,
// DSORG=PS,RECFM=FB,DISP=(NEW,CATLG,DELETE)
//TEMP1 DD DSN=&&TEMP1,
// SPACE=(CYL,(10,20),RLSE),DISP=(MOD,KEEP,DELETE)
//TEMP2 DD DSN=&&TEMP2,
// SPACE=(CYL,(10,20),RLSE),DISP=(MOD,KEEP,DELETE)
//TOOLIN DD *
COPY FROM(IN1) TO(TEMP1) USING(SRT1)
COPY FROM(IN2) TO(TEMP1) USING(SRT2)
SPLICE FROM(TEMP1) TO(TEMP2) ON(3,80,CH) WITH(2,1) KEEPNODUPS
COPY FROM(TEMP2) TO(OUT) USING(SRT3)
/*
//SRT1CNTL DD *
OPTION COPY
OUTREC FIELDS=(C'AA',1,80)
/*
//SRT2CNTL DD *
OPTION COPY
OUTREC FIELDS=(C'BB',1,80)
/*
//SRT3CNTL DD *
INCLUDE COND=(1,2,CH,EQ,C'AA')
OUTREC FIELDS=(3,80)
/*
|
Output:
Code: |
RECORD 02
RECORD 03
RECORD 04
RECORD 06
RECORD 07
RECORD 08
RECORD 10
|
--Parag |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
mvmadhavi wrote: |
i need to eliminate those 3 records from file 1 and remaining 7 records
should be written to a new output file is there a synsort steps for these... |
I think Syncsort's JOIN should work, have you look at it? |
|
Back to top |
|
|
Alissa Margulies
SYNCSORT Support
Joined: 25 Jul 2007 Posts: 496 Location: USA
|
|
|
|
Madhavi,
CICS Guy is right. This can be accomplished in a single pass of the data using SyncSort's JOIN feature, which is supported in SyncSort for z/OS 1.2.0 and later. With Parag's sample data, you can code the following:
Code: |
//STEP1 EXEC PGM=SYNCSORT
//SORTJNF1 DD *
RECORD 01
RECORD 02
RECORD 03
RECORD 04
RECORD 05
RECORD 06
RECORD 07
RECORD 08
RECORD 09
RECORD 10
//SORTJNF2 DD *
RECORD 01
RECORD 05
RECORD 09
//SORTOUT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD *
JOINKEYS FILES=F1,FIELDS=(1,9,A)
JOINKEYS FILES=F2,FIELDS=(1,9,A)
JOIN UNPAIRED,F1,ONLY
SORT FIELDS=COPY
/* |
|
|
Back to top |
|
|
ParagChouguley
Active User
Joined: 03 Feb 2007 Posts: 175 Location: PUNE(INDIA)
|
|
|
|
Hi Alissa Margulies,
The PDF of sysncsort that I have does not contain any information about neither joinkeys nor splice. Could you please give me a Complete reference manual for sysncsort 1.5.3
--Parag |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello Parag,
Please post the version information from an execution of Syncsort on your system. It will be at the top of the page.
The most current release of Syncsort (and very recently released at that) is 1.3 (not 1.5.n). |
|
Back to top |
|
|
ParagChouguley
Active User
Joined: 03 Feb 2007 Posts: 175 Location: PUNE(INDIA)
|
|
|
|
Hi Dick,
Thanks for reply !!
Quote: |
Please post the version information from an execution of Syncsort on your system. It will be at the top of the page.
|
SYT000I SYNCTOOL RELEASE 1.5.3 - COPYRIGHT 2004 SYNCSORT INC.
There is one more message.
SYNCSORT FOR Z/OS 1.2.3.1RI U.S. PATENTS: 4210961, 5117495
Hope I'm posting the right messages
--parag |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
You're welcome
You are running the previous release of Syncsort (1.2). If i remember this right, SYNCTOOL was not documented in 1.2. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
To add to the previous. . .
A SYNCTOOL manual is not available for 1.3. . . |
|
Back to top |
|
|
Alissa Margulies
SYNCSORT Support
Joined: 25 Jul 2007 Posts: 496 Location: USA
|
|
|
|
ParagChouguley wrote: |
The PDF of sysncsort that I have does not contain any information about neither joinkeys nor splice. |
JOINKEYS is fully documented in the SyncSort for z/OS 1.2 Programmer's Guide. Which version of the manual are you looking at? |
|
Back to top |
|
|
ParagChouguley
Active User
Joined: 03 Feb 2007 Posts: 175 Location: PUNE(INDIA)
|
|
|
|
Quote: |
Which version of the manual are you looking at?
|
The best one to suit the product version I'm using.
--Parag |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
ParagChouguley wrote: |
The best one to suit the product version I'm using. |
That did not answer the question........
If you can not find JOIN in the index, you are looking at a very old manual....
Contact Syncsort and get a current manual (and possibly a copy of "Exploiting SyncSort JOIN") |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
The best one to suit the product version I'm using.
|
Well, IMHO, i think not. "The best one"(s) would include JOIN and JOINKEYS. I have both a 1.2 Programmers Guide an Exploiting JOIN publication that contain JOIN info. . .
If your system is licensed to use Syncsort, i am sure you can have them e-mailed to you. If you have an online support account, you can download them on your own (which is how i got mine).
Alissa - sorry if i went "overboard" |
|
Back to top |
|
|
veena_nagesh2002 Warnings : 1 Active User
Joined: 07 May 2005 Posts: 110 Location: hyderabad
|
|
|
|
Hi Parag,
when i tried with your code, the out put is having all the 10 records |
|
Back to top |
|
|
Alissa Margulies
SYNCSORT Support
Joined: 25 Jul 2007 Posts: 496 Location: USA
|
|
|
|
dick scherrer wrote: |
Alissa - sorry if i went "overboard" |
Not at all. I'm glad to have licensed customers informed about all the available support methods. Utilitizing the online support accounts makes my life a lot easier. |
|
Back to top |
|
|
Alissa Margulies
SYNCSORT Support
Joined: 25 Jul 2007 Posts: 496 Location: USA
|
|
|
|
(That should have been: "Utilizing the online support accounts makes my life a lot easier".) |
|
Back to top |
|
|
|