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

sort only the detail records excluding header and trailer


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

New User


Joined: 14 Sep 2006
Posts: 11

PostPosted: Fri May 04, 2007 2:46 pm
Reply with quote

i have a file with header, detail and trailer.. i want to sort the detail records only, and in the sortout i want my header and trailer present to, with the detail records.

i was looking into it and figured that this can be done with outrec, but i dont know how and i am kinda pressed for time.

any help will be much appreciated

thank you in advance
Back to top
View user's profile Send private message
preeth

New User


Joined: 14 Sep 2006
Posts: 11

PostPosted: Fri May 04, 2007 2:47 pm
Reply with quote

i forgot to mention that the format of the sortout should be the same as the sortin that the header should be the first record and trailer should be the last record
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Fri May 04, 2007 2:53 pm
Reply with quote

preeth,

This is was discussed earlier. Please search the forum.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri May 04, 2007 3:07 pm
Reply with quote

See:

http://www-304.ibm.com/jct01004c/systems/support/storage/software/sort/mvs/tricks/
Back to top
View user's profile Send private message
preeth

New User


Joined: 14 Sep 2006
Posts: 11

PostPosted: Fri May 04, 2007 7:20 pm
Reply with quote

thank u, that link is very helpful, however wouldnt the overlay change the value of the record at whatever column you specify it at. my file is of record length 200. so what do i spedify the column to overlay as.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri May 04, 2007 7:29 pm
Reply with quote

I can remember Frank showing the code to do this somewhere, and how he did it was to remove the overlaid parts at some stage to produce the final file as required.

This is off the top of my head from memory - so may be wrong ....
The the original record length was increased to accomodate the overlays.
HEADER = 1, DATA = 2, TRAILER = 3

The overlays were then used as the major key of the sort sequence,
OVERLAY, real sort field 1, real sort field 2, etc. etc.

and then they are removed in the final output of the record, and the output record was the same length as the input record.
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: Fri May 04, 2007 8:59 pm
Reply with quote

See the "Sort records between a header and trailer" Smart DFSORT Trick at:

www.ibm.com/servers/storage/support/software/sort/mvs/tricks/

You would use 201 instead of 81, and use 1,200 in the OUTREC statement.
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 Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
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 Compare only first records of the fil... SYNCSORT 7
Search our Forums:

Back to Top