IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

extrating differed records


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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 Developer


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

PostPosted: Mon Oct 02, 2006 11:46 pm
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Join multiple records using splice DFSORT/ICETOOL 5
No new posts EZT program to build a flat file with... All Other Mainframe Topics 9
No new posts JCL sortcard to print only the records DFSORT/ICETOOL 11
Search our Forums:

Back to Top