sort & copy to 2 o/p files in one pass?



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

sort & copy to 2 o/p files in one pass?

Postby c0r5a38 » Tue Oct 13, 2009 7:46 pm

DFSORT Z/OS R1.10....

I have a two step job with each step executing DFSORT using the same SORTIN file in each with different SORTOUT files.
The SYSIN cards for the first DFSORT step is as follows:
INREC FIELDS=(1,800)
SORT FIELDS=(1,800,CH,A)
SUM FIELDS=NONE
OUTFIL FNAMES=SORTOUT,
IFTHEN=(WHEN=(422,1,CH,EQ,C'Y'),
BUILD=(1,148,C'REG VIOL ',149,21,179,622))

The SYSIN cards for the second DFSORT is as follows:
SORT FIELDS=COPY
OUTFIL INCLUDE=(841,1,CH,EQ,C'Y'),FNAMES=SORTOUT,
OUTREC=(801,300)

How can this job be merged into a single DFSORT pass? Thanks.
c0r5a38
 
Posts: 1
Joined: Tue Oct 13, 2009 2:46 am
Has thanked: 0 time
Been thanked: 0 time

Re: sort & copy to 2 o/p files in one pass?

 

Re: sort & copy to 2 o/p files in one pass?

Postby Frank Yaeger » Tue Oct 13, 2009 9:02 pm

You can't do a SORT and COPY in a single DFSORT pass (that is, by reading the input data only once). If you wanted both output files sorted the same way, or both output files just copied, then you could do it in one pass.

You could, of course, do it in one step with ICETOOL, but it would still take two passes since you're doing a SORT for one output file and a COPY for the other.
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
User avatar
Frank Yaeger
Global moderator
 
Posts: 1080
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 14 times


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post