IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

ICETOOL Question Concerning Sort Order


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
cpuhawg

Active User


Joined: 14 Jun 2006
Posts: 331
Location: Jacksonville, FL

PostPosted: Wed Nov 26, 2008 11:52 pm
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Thu Nov 27, 2008 12:37 am
Reply with quote

Sorry, I'm not following you. Can you show me an example of what it is you want to do.
Back to top
View user's profile Send private message
cpuhawg

Active User


Joined: 14 Jun 2006
Posts: 331
Location: Jacksonville, FL

PostPosted: Thu Nov 27, 2008 12:49 am
Reply with quote

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
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Thu Nov 27, 2008 12:52 am
Reply with quote

How about concatenating both the files and then applying the above sort?
Back to top
View user's profile Send private message
cpuhawg

Active User


Joined: 14 Jun 2006
Posts: 331
Location: Jacksonville, FL

PostPosted: Thu Nov 27, 2008 1:02 am
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Thu Nov 27, 2008 2:01 am
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Nov 27, 2008 8:46 am
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts Rotate partition-logical & physic... DB2 0
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
Search our Forums:

Back to Top