Posted: Sat Mar 27, 2010 9:23 pm Post subject: Performance of sysncort
We have sort copy being done on a large file ,using the below sort card
INCLUDE COND=(15,2,CH,EQ,C'20')
SORT FIELDS=(5,10,PD,A,17,6,CH,A,36,6,CH,A,27,9,ZD,A, X
42,2,CH,A,15,2,CH,A)
SUM FIELDS=NONE *REMOVES DUPLICATES
Now we have another requirement to create one more file using the same master file,with a additional codition.
Two options are to modify the existing sortcard to produce two files or crate another job
I modified the above sort card as below to get the oputout in 2 files
But how to i get the file sorted in the order as before,because when i try to add the sort filed command it says syntaxt error duplicate commands.
Also what will be the effect on performce of sort if i add the additional file..
How many records are in the original input file? What is the recfm/lrecl?
How many records will be written to each of the output files? Will the output have the recfm/lrecl as the input?
Something you might consider is to pull the '20' records and sort them. Then, from the file with the '20' records, select the second set of "output" as they will all be in the file with the '20' records and they will already be in sequence. _________________ All the best,
How many records are in the original input file? What is the recfm/lrecl?
How many records will be written to each of the output files? Will the output have the recfm/lrecl as the input?
Something you might consider is to pull the '20' records and sort them. Then, from the file with the '20' records, select the second set of "output" as they will all be in the file with the '20' records and they will already be in sequence.
Thanks for the quick reply..
the record format is VB and lrecl is 28793..the master file will have around 10 million records...and the output file will be say 500 thousand..
yeap we were also considering the same ,of using the extract file of the first,but just that am not clear how the syncsort works..does it go through one pass and evalute both the codintion or does it go thorugh one pass for the first file and another pass for the second??
If only one pass is required then i think its better to have the 2nd file also created using the same sort card ..(We have the same sort running again 20 different Master files ..it would be easier to maintain)
But now the problem is getting the files sorted...Can you help me with the below syntax..
How to i get the files sorted as below
SORT FIELDS=COPY
OUTFIL FILES=1,
INCLUDE=(15,2,CH,EQ,C'20')
SORT FIELDS=(5,10,PD,A,17,6,CH,A,36,6,CH,A,27,9,ZD,A, X
42,2,CH,A,15,2,CH,A)
OUTFIL FILES=2,
INCLUDE=((15,2,CH,EQ,C'20'),AND,(790,1,PD,GT,0))
SORT FIELDS=(5,10,PD,A,17,6,CH,A,36,6,CH,A,27,9,ZD,A, X
42,2,CH,A,15,2,CH,A)
You cannot specify "sort fields" more than once in a single execution.
I don't have access to the manuals as i'm not on one of my regular systems, but suggest you remove the COPY and specify the sort criteria. Use INREC to filter the large file and then create both outputs in the "output".
Possibly, i'll be where i have material later and will check if this is not yet working. _________________ All the best,
The INREC control statement reformats the input records. Use the INREC control statement to add, delete, or reformat fields before the records are sorted or merged. Use theOUTREC control statement or the OUTREC parameter of the OUTFIL control statement to delete or reformat fields after the records are sorted or merged.
And:
Quote:
The Multiple Output Capability
Use the OUTFIL control statement to create multiple files without making multiple passes
through the input data. The output files can be treated the same or differently:
The INREC control statement reformats the input records. Use the INREC control statement to add, delete, or reformat fields before the records are sorted or merged. Use theOUTREC control statement or the OUTREC parameter of the OUTFIL control statement to delete or reformat fields after the records are sorted or merged.
Thanks papadi for quick responses and searches ,am actually new to sorts this is good learning..
But what i didn't still get is if the INREC only reformats the fields ,how can is use them to filter out records???
Thanks..Due to my sufficient knowledge on sort processing was not asking the right question...was able to resolve the issue...you inputs were very helpful..
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum