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

Sort a file of 8000 character length


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

New User


Joined: 09 Jun 2005
Posts: 10

PostPosted: Tue Apr 15, 2008 7:48 pm
Reply with quote

We have an input file of over 8000 characters. Out of this, we have a field of length 7980 which needs to be sorted before processing.
But we came to know that sort is capable of handling at a maximum of 4092 characters, irrespective of the length of the record.

Can anyone please suggest us an alternate way to get this sort done?

Naga
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Tue Apr 15, 2008 8:44 pm
Reply with quote

If you can fit the total number of records into the max size of a seqnum, sort it several times, first with the first 4092 bytes of the key while appending a seqnum, then again with the seqnum and the rest of the key.....
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: Tue Apr 15, 2008 10:01 pm
Reply with quote

Hello,

One way to do what you want is to sort the file 2 times.

The first sort is on positions 4001-8000.

The second sort (using the output from the first sort) is on positons 1-4000. In this second sort, specify OPTION EQUALS to preserve the original sequence of the records within the new sort key. If EQUALS is in effect, the duplicate records are kept in their original order.
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 How to split large record length file... DFSORT/ICETOOL 7
No new posts PARSE Syntax for not fix length word ... JCL & VSAM 7
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Access to non cataloged VSAM file JCL & VSAM 18
Search our Forums:

Back to Top