Example input, RECFM=FB,LRECL=14:

DSK001 1009999
DSK002 3962002
DSK003 0001001
DSK005 2009999
DSK006 2009999
DSK008 0100000
DSK007 0001002
DSK004 0527192

Two fields: VOLSER in 1-6 and SIZE in 8-14.

I want to assign a 'sequence' number to the input from 1 to 4, so that I can 
sort these into 4 groups, and within those groups descending order by size:
 
So for this group the input would be modified to have the sequence in 16 (for 
example) resulting in a temporary work dataset of LRECL=16:

DSK001 1009999 1
DSK002 3962002 2
DSK003 0001001 3
DSK005 2009999 4
DSK006 2009999 1
DSK008 0100000 2
DSK007 0001002 3
DSK004 0527192 4 

And the final output would be RECFM=FB,LRECL=14
DSK006 2009999
DSK001 1009999
DSK002 3962002
DSK008 0100000
DSK007 0001002
DSK003 0001001
DSK005 2009999
DSK004 0527192

The idea is to "balance" disk backup jobs by spreading the large volumes 
across the (4) jobs evenly.  Doing the sort this way isn't "perfect" but it's 
closer 
to what is needed.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to