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: 1208
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts How to load to DB2 with column level ... DB2 6
No new posts RC query -Time column CA Products 3
No new posts first column truncated in search result IBM Tools 13
Search our Forums:

Back to Top