Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

extrating differed records

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
som_infotech

New User


Joined: 25 Feb 2006
Posts: 38
Location: chennai-india

PostPosted: Mon Oct 02, 2006 10:52 pm    Post subject: extrating differed records
Reply with quote

The requirement is if we have 2 sorted file both files has to be checked and the records which is not there in both files should be written in a new output file
all have same record format of LRECL=80
we dont use ice tool we use ordinary Sort utility

file1
empno name

12345 som
23456 shankar

file2
empno name

12345 som
12346 stella
23456 shankar

i need the output file to have only
output
empno name

12346 stella

please help me out...
Back to top
View user's profile Send private message

Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Mon Oct 02, 2006 11:46 pm    Post subject:
Reply with quote

Quote:
we dont use ice tool we use ordinary Sort utility


I don't know what you mean by this. If you use DFSORT, then you have DFSORT's ICETOOL available. ICETOOL has been shipped free with DFSORT since 1991.

If you want the nonduplicate records between the two files as output, you can use a DFSORT/ICETOOL job like this:

Code:

//S1    EXEC  PGM=ICETOOL
//TOOLMSG DD  SYSOUT=*
//DFSMSG  DD  SYSOUT=*
//CON DD *
12345   som
23456   shankar
//       DD *
12345   som
12346   stella
23456   shankar
/*
//OUT DD SYSOUT=*
//TOOLIN   DD    *
SELECT FROM(CON) TO(OUT) ON(1,15,CH) NODUPS
/*
Back to top
View user's profile Send private message
cpuhawg

Active User


Joined: 14 Jun 2006
Posts: 331
Location: Jacksonville, FL

PostPosted: Mon Oct 02, 2006 11:50 pm    Post subject: Re: extrating differed records
Reply with quote

If you have regular SYNCSORT, you probably have SYNCTOOL that can be used select your data:

Code:

//SYNCTOOL  EXEC PGM=SYNCTOOL
//TOOLMSG  DD SYSOUT=*
//DFSMSG   DD SYSOUT=*
//SYSOUT   DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SORTIN    DD DSN=FILE1,DISP=SHR
//         DD DSN=FILE2,DISP=SHR
//TEMPFILE DD DSN=&&TEMPFILE,DISP=(NEW,PASS),
//  UNIT=SYSDA,SPACE=(TRK,(100,25),RLSE),
//  RECFM=FB,LRECL=80,BLKSIZE=27920
//NODUPS DD DSN=OUTPUT.FILE,DISP=(NEW,CATLG),
//  UNIT=SYSDA,SPACE=(TRK,(100,25),RLSE),
//  RECFM=FB,LRECL=80,BLKSIZE=27920
//TOOLIN   DD *
  COPY FROM(SORTIN) TO(TEMPFILE)  USING(CTL1)
  SELECT FROM(TEMPFILE) TO(NODUPS) ON(1,80,CH) NODUPS
/*
//CTL1CNTL DD  *                                   
 SORT FIELDS=(1,80,CH,A)   
 END                                         


The SORTIN DD statement brings in both files, sorts them (1,80,CH,A), and writes them to TEMPFILE. The SYNCTOOL program then copies all records from TEMPFILE and removes all duplicates (records exactly the same in positions 1 through 80). What are not duplicates should be written to the NODUPS DD statement.

If you used ALLDUPS instead of NODUPS, your NODUPS output file would contain only the duplicates.

I was not able to test the JCL because SYNCTOOL is not available to me.
Back to top
View user's profile Send private message
som_infotech

New User


Joined: 25 Feb 2006
Posts: 38
Location: chennai-india

PostPosted: Tue Oct 03, 2006 11:19 pm    Post subject: Re: extrating differed records
Reply with quote

Thanks a lot....
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 8 Fri Dec 09, 2016 4:40 am
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to split the records using the am... vnktrrd DFSORT/ICETOOL 24 Fri Oct 28, 2016 7:33 pm
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm
No new posts abend sort based on count records in ... anatol DFSORT/ICETOOL 5 Mon Oct 17, 2016 10:10 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us