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
 

 

How to group the matched and the unmatched records in A file

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

New User


Joined: 04 Jun 2009
Posts: 30
Location: Bangalore

PostPosted: Wed Jun 10, 2009 2:22 am    Post subject: How to group the matched and the unmatched records in A file
Reply with quote

Scenario, is something like this:
I have an input file.
FILE1
-------
11111 ABCDEF
22222 CDEFDF
33333 IUIUTW
22222 SDFJFF

The ouput should come in two files as.
FILE2
-------
11111 ABCDEF
33333 IUIUTW

FILE3
-------
22222 CDEFDF
22222 SDFJFF

Matching is done on first 5 bytes(char 5) of the record and lrcl is 1000 bytes.

Thanks
Back to top
View user's profile Send private message

Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Wed Jun 10, 2009 5:53 am    Post subject: Reply to: How to group the matched and the unmatched records
Reply with quote

Furor,

You can use a DFSORT/ICETOOL job like the following to get the unique records in one file and the duplicates in another:


Code:

//STEP0100 EXEC PGM=ICETOOL                   
//TOOLMSG   DD SYSOUT=*                       
//DFSMSG    DD SYSOUT=*                       
//IN        DD DSN=INPUT.FILE,               
//             DISP=SHR                       
//UNQ       DD DSN=OUPUT.UNQ.KEY FILE,           
//             DISP=(,NEW,CATLG,DELETE),       
//             UNIT=SYSDA                     
//             SPACE=(CYL,(X,Y),RLSE)
//DUPS      DD DSN=OUPUT.DUPS.KEY FILE,           
//             DISP=(,NEW,CATLG,DELETE),       
//             UNIT=SYSDA                     
//             SPACE=(CYL,(X,Y),RLSE)       
//TOOLIN    DD *                               
  SELECT FROM(IN) TO(UNQ) ON(1,5,CH) NODUPS DISCARD(DUPS)   
/*           
Back to top
View user's profile Send private message
Furor

New User


Joined: 04 Jun 2009
Posts: 30
Location: Bangalore

PostPosted: Wed Jun 10, 2009 6:03 pm    Post subject: Reply to: How to group the matched and the unmatched records
Reply with quote

Thanks a lot Skolusu. Knowledge has no substitute icon_smile.gif
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 Receive a file using PCOMM macro Harald.v.K IBM Tools 0 Thu Mar 23, 2017 6:50 pm
No new posts Why TS/OP would Not contact site supp... RahulG31 All Other Mainframe Topics 2 Wed Mar 22, 2017 7:46 am
No new posts Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Formatting VB File Learncoholic DFSORT/ICETOOL 3 Mon Mar 20, 2017 12:29 pm
No new posts Updating a VSAM file with DISP=OLD sheersh JCL & VSAM 8 Tue Mar 14, 2017 6:14 pm


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