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
 

 

split the PS into two based on a specific column

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

New User


Joined: 23 Jul 2008
Posts: 27
Location: City of Joy

PostPosted: Wed Jan 13, 2010 1:17 pm    Post subject: split the PS into two based on a specific column
Reply with quote

Hi,

I have a input file that contains two types of records. I want to filter it and write it to two different PS files based on a specific field.

For eg.

My input files reads

Code:

123123123123123  R   00000000000001     
123123123123123  R   00000000000002
123123123123123  R   00000000000003
123123123123123  A   00000000000001       
123123123123123  A   00000000000002     
123123123123123  A   00000000000003     
123123123123123  A   00000000000004
123123123123123  R   00000000000003     
123123123123123  A   00000000000005


I want two output files.

File1:
Code:

123123123123123  R   00000000000001     
123123123123123  R   00000000000002
123123123123123  R   00000000000003
123123123123123  R   00000000000004     


File2:
Code:

123123123123123  A   00000000000001       
123123123123123  A   00000000000002     
123123123123123  A   00000000000003     
123123123123123  A   00000000000004   
123123123123123  A   00000000000005


I want to write a single sort to do both... icon_question.gif
Back to top
View user's profile Send private message

guptae

Moderator


Joined: 14 Oct 2005
Posts: 1187
Location: Bangalore,India

PostPosted: Wed Jan 13, 2010 1:30 pm    Post subject:
Reply with quote

Hello Sudhanshu,

You canuse below sort card

Code:

  OPTION COPY                                 
  OUTFIL INCLUDE=(18,1,CH,EQ,C'R'),FNAMES=OUT1
  OUTFIL SAVE,FNAMES=OUT2 


OUT1 File will contain recrods with R at 18th Byte & OUT2 will contain rest of the records
Back to top
View user's profile Send private message
Sudhanshu Shekhar

New User


Joined: 23 Jul 2008
Posts: 27
Location: City of Joy

PostPosted: Wed Jan 13, 2010 3:07 pm    Post subject:
Reply with quote

Thanks a lot .... it worked fine
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 DB2 query Using Recursion, Converting... smilewithashu2 DB2 1 Tue Jan 03, 2017 12:50 pm
No new posts Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 8 Fri Dec 09, 2016 4:40 am
No new posts SQZ pipe delimited file with 1 column... Rick Silvers DFSORT/ICETOOL 2 Sun Nov 06, 2016 8:11 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


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