Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

sort command with omit option

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

New User


Joined: 11 May 2007
Posts: 59
Location: chennai

PostPosted: Thu Oct 18, 2007 11:25 am    Post subject: sort command with omit option
Reply with quote

Suppose I'm sorting a file on some condition and suppose this input file
has 100 records. Now I'm sorting input file using omit option where
I want to omit some data (suppose 20 records) which is not required. Now I want to write an output file (which now contains 80 records) which don't have these omitted records from that input file.

Secondly the omitted records should be written a second output file.

Thank you.
Back to top
View user's profile Send private message

murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1439
Location: Bangalore,India

PostPosted: Thu Oct 18, 2007 11:31 am    Post subject:
Reply with quote

Purnendu,

Use
Quote:
OUTFIL....INCLUDE/OMIT
statement. For syntax, our general suggestion..... refer manuals.
Back to top
View user's profile Send private message
nuthan

Active User


Joined: 26 Sep 2005
Posts: 146
Location: Bangalore

PostPosted: Thu Oct 18, 2007 11:49 am    Post subject:
Reply with quote

use

Code:

  SORT FIELDS=(1,10,CH,A)
  OUTFIL FNAMES=CUST1,
      INCLUDE=(1,1,CH,EQ,C'A')
  OUTFIL FNAMES=CUST2,
      INCLUDE=(1,1,CH,EQ,C'B')


Here CUST1 and CUST2 are DD names of two output files.
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Thu Oct 18, 2007 11:50 am    Post subject: Reply to: sort command with omit option
Reply with quote

Purnrndu,

Your sort card should be coded as shown below

Code:

  SORT FIELDS=(YOUR CONDITION)
  OUTFIL FNAMES=OUT1,INCLUDE=(CONDITION)
  OUTFIL FNAMES=OUT2,SAVE


OUT2 will have the records which does not satisfy the INCLUDE condition.

Post your input,output, field positions and RECL details if you want the exact SORT card for your requirement.
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: Thu Oct 18, 2007 8:45 pm    Post subject:
Reply with quote

Purnendu,

If you're 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 Innovations in Your Mainframe Sort Arun Raj PC Guides & IT News 4 Wed Mar 15, 2017 10:38 pm
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts SORT requirement sjiraga COBOL Programming 6 Thu Mar 09, 2017 9:11 pm
No new posts TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am
No new posts SORT to append Month and YEAR in MMYY... tisamf DFSORT/ICETOOL 1 Wed Mar 08, 2017 4:46 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us