IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

sort command with omit option


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

New User


Joined: 11 May 2007
Posts: 57
Location: chennai

PostPosted: Thu Oct 18, 2007 11:25 am
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: 1436
Location: Bangalore,India

PostPosted: Thu Oct 18, 2007 11:31 am
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
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: 1287
Location: Chennai, India

PostPosted: Thu Oct 18, 2007 11:50 am
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 Developer


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

PostPosted: Thu Oct 18, 2007 8:45 pm
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:

Use [URL] BBCode for External Links
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts RACF - Rebuild SETROPTS command which... All Other Mainframe Topics 3
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Routing command Address SDSF to other... TSO/ISPF 2
Search our Forums:

Back to Top