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

split the PS into two based on a specific column


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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: 1209
Location: Bangalore,India

PostPosted: Wed Jan 13, 2010 1:30 pm
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
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 All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Extract records for a specific condit... DFSORT/ICETOOL 25
No new posts Write record twice based on condition... SYNCSORT 7
No new posts Create a specific record/file based o... SYNCSORT 8
No new posts Extract ISPF table column headings CLIST & REXX 2
No new posts Sort based on the record type DFSORT/ICETOOL 1
Search our Forums:


Back to Top