View previous topic :: View next topic
|
Author |
Message |
cpuhawg
Active User
Joined: 14 Jun 2006 Posts: 331 Location: Jacksonville, FL
|
|
|
|
If you mod records to a file using ICETOOL, is there anyway to have ICETOOL perform the SORT of all records to the Mod'ed file as opposed to sorting the records prior to Mod'ing them (which then requires an additional step to get the whole file sorted? |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Sorry, I'm not following you. Can you show me an example of what it is you want to do. |
|
Back to top |
|
|
cpuhawg
Active User
Joined: 14 Jun 2006 Posts: 331 Location: Jacksonville, FL
|
|
|
|
You have records on an OUTFILE file in sort order, say 1,20,CH,A.
Code: |
AAAAAAAAAAAAAAAAAAAA
BBBBBBBBBBBBBBBBBBBB
CCCCCCCCCCCCCCCCCCCC
FFFFFFFFFFFFFFFFFFFF
|
You then have a step to mod two records onto this file. They are:
Code: |
EEEEEEEEEEEEEEEEEEEE
DDDDDDDDDDDDDDDDDDDD
|
Code: |
SORT FIELDS=(1,20,CH,A)
OUTFIL FNAME=OUTFILE
|
The file then looks like:
Code: |
AAAAAAAAAAAAAAAAAAAA
BBBBBBBBBBBBBBBBBBBB
CCCCCCCCCCCCCCCCCCCC
FFFFFFFFFFFFFFFFFFFF
DDDDDDDDDDDDDDDDDDDD
EEEEEEEEEEEEEEEEEEEE
|
I would want it to look like this without having to run an addition sort step.
Code: |
AAAAAAAAAAAAAAAAAAAA
BBBBBBBBBBBBBBBBBBBB
CCCCCCCCCCCCCCCCCCCC
DDDDDDDDDDDDDDDDDDDD
EEEEEEEEEEEEEEEEEEEE
FFFFFFFFFFFFFFFFFFFF
|
Is there anyway to have ICETOOL perform the sort after it mod's the records to the file? |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
How about concatenating both the files and then applying the above sort? |
|
Back to top |
|
|
cpuhawg
Active User
Joined: 14 Jun 2006 Posts: 331 Location: Jacksonville, FL
|
|
|
|
Thank you for your suggestion arcvns, but when you are using a combination of SORT, SPLICE, and SELECT statements in ICETOOL, you can't concatenate a file that has not yet been created in the single ICETOOL job step. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
I still don't really understand the big picture of what you're trying to do.
If you MOD records onto a data set with existing records, the MODed records appear AFTER the existing records. That's the way MOD works. MOD isn't a DFSORT/ICETOOL function - its an operating system function. There's nothing you can do that will magically allow the MODed records to be sorted with the existing records.
MERGE, or SORT with concatenation, would be the two ways to create an output file with sorted records from different files. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
FWIW - the process may run much faster and use less sytem resources if the new records are created in a separate file rather than MODing them onto the first file.
When the process finishes creating these new records, they could be merged with the "first" file creating a new file with all of the records in the desired sequence. |
|
Back to top |
|
|
|