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
 
Include only selected records in sort

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
brahmanandareddy

New User


Joined: 16 Dec 2004
Posts: 44
Location: Hyderabad

PostPosted: Wed Oct 19, 2005 4:47 am    Post subject: Include only selected records in sort
Reply with quote

1. I have a file. I want to include only selected records in sort (JCL sort). How do we do this?

2. I have a file. I want to sort the records and want to place the records from this file into three output files. For this am I right that we just need to give three output DD statements?
Back to top
View user's profile Send private message

mvanandkumar

New User


Joined: 01 Sep 2005
Posts: 11

PostPosted: Wed Oct 19, 2005 7:14 am    Post subject:
Reply with quote

Hi,

Please click this link for readymade answer ...

www.ibm.com/servers/storage/support/software/sort/mvs/srtmpub.html


Thanks
Anand
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Wed Oct 19, 2005 8:27 pm    Post subject:
Reply with quote

1. Use DFSORT's INCLUDE statement to specify the criteria you want to use to include records, e.g.

Code:

//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=...  input file
//SORTOUT DD DSN=...  output file
//SYSIN DD *
   OPTION COPY
   INCLUDE COND=(21,3,CH,EQ,C'ABC')
/*


For the many ways in which you can specify the criteria using DFSORT's INCLUDE statement, see:

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CA10/3.7?DT=20050222160456

2. No, you also need a DFSORT OUTFIL statement, e.g.,

Code:

//S2 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=...  input file
//OUT1 DD DSN=...  output file1
//OUT2 DD DSN=...  output file2
//OUT3 DD DSN=...  output file3
//SYSIN DD *
   SORT FIELDS=(...)
   OUTFIL FNAMES=(OUT1,OUT2,OUT3)
/*


Since you're obviously not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:

www.ibm.com/servers/storage/support/software/sort/mvs/srtmpub.html
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 records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts Addition of two records on 2 fields amar143 SYNCSORT 8 Tue Oct 03, 2017 11:14 am
No new posts JOINKEYS Paired and Unpaired Sort MFwhiz DFSORT/ICETOOL 4 Fri Sep 29, 2017 1:48 am
No new posts Difference in SORT & ICETOOL Mohan Kothakota DFSORT/ICETOOL 5 Fri Sep 22, 2017 4:56 pm
No new posts More than 1 Include criteria for sing... Roy Ware SYNCSORT 6 Wed Sep 13, 2017 11:45 pm

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