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
 

 

sort only the detail records excluding header and trailer

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: sort only the detail records excluding header and trailer
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    Post subject:
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: 1439
Location: Bangalore,India

PostPosted: Fri May 04, 2007 2:53 pm    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Fri May 04, 2007 3:07 pm    Post subject:
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    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Fri May 04, 2007 7:29 pm    Post subject:
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 Moderator


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

PostPosted: Fri May 04, 2007 8:59 pm    Post subject:
Reply with quote

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

http://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    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 How to change 'K' or 'M' use Sort vice_versa DFSORT/ICETOOL 5 Thu May 18, 2017 7:11 am
No new posts Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm
This topic is locked: you cannot edit posts or make replies. SORT trick needed bshkris SYNCSORT 6 Tue May 02, 2017 4:35 am


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