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 Group Data based on a key Arun Raj DFSORT/ICETOOL 7 Thu Apr 27, 2017 11:29 pm
No new posts Dynamic split of files under groups sril.krishy DFSORT/ICETOOL 4 Mon Apr 17, 2017 1:09 pm
No new posts JCL to Set Return code based on DB2 S... vinu78 DB2 17 Mon Mar 13, 2017 9:47 pm
No new posts Route a product's job to specific lpar vasanthz All Other Mainframe Topics 9 Thu Mar 02, 2017 2:22 am
No new posts Inserting records based on conditions vickey_dw DFSORT/ICETOOL 9 Wed Feb 22, 2017 1:33 pm


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