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 Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 7 Fri Nov 18, 2016 1:48 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts BWO option in VSAM blayek CICS 3 Sat Nov 05, 2016 10:47 am
No new posts Regarding COBOL Stored Procedure opti... selvamsrinivasan85 DB2 4 Fri Nov 04, 2016 8:57 pm


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