Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

ICETOOL Question Concerning Sort Order

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: ICETOOL Question Concerning Sort Order
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 Moderator


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

PostPosted: Thu Nov 27, 2008 12:37 am    Post subject:
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    Post subject: Reply to: ICETOOL Question Concerning Sort Order
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: 2181
Location: @my desk

PostPosted: Thu Nov 27, 2008 12:52 am    Post subject:
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    Post subject: Reply to: ICETOOL Question Concerning Sort Order
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 Moderator


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

PostPosted: Thu Nov 27, 2008 2:01 am    Post subject:
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

Site Director


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

PostPosted: Thu Nov 27, 2008 8:46 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Order BY AND Index Nileshkul DB2 2 Sat Dec 31, 2016 6:33 pm
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm
No new posts How to delete second instance from Fl... Gunapala CN DFSORT/ICETOOL 6 Tue Oct 18, 2016 11:42 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us