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

How to get the two output files with only one sort card?


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
priyamnavada

New User


Joined: 24 Dec 2005
Posts: 52
Location: hyderabad

PostPosted: Mon Jan 14, 2008 5:50 pm
Reply with quote

Hi,

Is it possible to get the two files as output with only one sort card?
For example, i want all records with charcter 'a' in one file and rest of the records in another file but using only one sort card.

Give me the sord card if possible......
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Mon Jan 14, 2008 5:52 pm
Reply with quote

Do you mean one sort card, or one execution of the sort step ?
Back to top
View user's profile Send private message
acevedo

Active User


Joined: 11 May 2005
Posts: 344
Location: Spain

PostPosted: Mon Jan 14, 2008 6:05 pm
Reply with quote

priyamnavada wrote:

Give me the sord card if possible......


search for OUTFIL FILES=??.
Back to top
View user's profile Send private message
Ajay Baghel

Active User


Joined: 25 Apr 2007
Posts: 206
Location: Bangalore

PostPosted: Mon Jan 14, 2008 7:02 pm
Reply with quote

Assuming you want the records containing 'a' in the first column to go to FILE1 and rest of the records to go to FILE2, you can use a DFSORT job like this:

Code:

//S1 EXEC PGM=SORT
//SYSOUT    DD SYSOUT=*
//SORTIN     DD  DSN=MYINFILE,DISP=SHR
//FILE1        DD DSN=TS.CHAR.A,...
//FILE2        DD DSN=TS.NOT.CHAR.A,...
//SYSIN       DD  *
  OPTION COPY
  OUTFIL FNAMES=FILE1,INCLUDE=(1,1,CH,EQ,C'a')
  OUTFIL FNAMES=FILE2,SAVE
/*


-Ajay
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 Compare 2 files and retrive records f... DFSORT/ICETOOL 0
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
Search our Forums:

Back to Top