View previous topic :: View next topic
|
Author |
Message |
priyamnavada
New User
Joined: 24 Dec 2005 Posts: 52 Location: hyderabad
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Do you mean one sort card, or one execution of the sort step ? |
|
Back to top |
|
|
acevedo
Active User
Joined: 11 May 2005 Posts: 344 Location: Spain
|
|
|
|
priyamnavada wrote: |
Give me the sord card if possible...... |
search for OUTFIL FILES=??. |
|
Back to top |
|
|
Ajay Baghel
Active User
Joined: 25 Apr 2007 Posts: 206 Location: Bangalore
|
|
|
|
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 |
|
|
|