Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 MXG - Processing Compressed DB2 SMF r... vasanthz All Other Mainframe Topics 2 Thu May 10, 2018 12:47 am
No new posts Extract the records with a PD field's... sudhakar84 DFSORT/ICETOOL 11 Mon Apr 02, 2018 7:26 pm
No new posts Merge 2 records sancraig16 SYNCSORT 19 Tue Mar 27, 2018 8:17 pm
No new posts Copy set of records based on condition krish.deepu SYNCSORT 2 Thu Mar 08, 2018 11:39 am
No new posts add sequence number for duplicate rec... SRUTHI DRAVIDAMANI COBOL Programming 11 Thu Feb 22, 2018 5:37 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us