Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
How to get the two output files with only one sort card?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: How to get the two output files with only one sort card?
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: 8620
Location: Back in jolly old England

PostPosted: Mon Jan 14, 2008 5:52 pm    Post subject:
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    Post subject: Re: How to get the two output files with only one sort card?
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: 205
Location: Bangalore

PostPosted: Mon Jan 14, 2008 7:02 pm    Post subject: Reply to: How to get the two output files with only one sort
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    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 SORT BUT RETAIN HIGHEST VALUE ON NON-... leondan22 DFSORT/ICETOOL 2 Thu Dec 14, 2017 8:13 pm
No new posts Extract record for change in combinat... Trinadh DFSORT/ICETOOL 6 Thu Nov 23, 2017 3:32 pm
No new posts Compare VSAM files using DFSORT pshongal DFSORT/ICETOOL 5 Thu Nov 23, 2017 10:24 am
No new posts Split files upto certain limit based ... bubbu75 DFSORT/ICETOOL 5 Tue Nov 14, 2017 11:11 pm
No new posts VBS and VB, COBOL syntax is the same ... natt.sut COBOL Programming 3 Sun Nov 12, 2017 6:36 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us