View previous topic :: View next topic
|
Author |
Message |
Purnendu.it
New User
Joined: 11 May 2007 Posts: 57 Location: chennai
|
|
|
|
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 |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
Purnendu,
Use
Quote: |
OUTFIL....INCLUDE/OMIT |
statement. For syntax, our general suggestion..... refer manuals. |
|
Back to top |
|
|
nuthan
Active User
Joined: 26 Sep 2005 Posts: 146 Location: Bangalore
|
|
|
|
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 |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
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 |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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 |
|
|
|