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
 

 

Sorting a Batch of Records using DFSORT

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
sankar_MF

New User


Joined: 19 Sep 2006
Posts: 29

PostPosted: Thu May 31, 2007 7:31 pm    Post subject: Sorting a Batch of Records using DFSORT
Reply with quote

I have the following requirement. Can you please tell me how to sort the records to get the desired output.

I have an input file, in the following format:


1AAA 1010HEADER
2AAA DETAIL1
2AAA DETAIL2
0AAA TRAILER

1AAA 3010HEADER
2AAA DETAIL1
2AAA DETAIL2
0AAA TRAILER

1AAA 1010HEADER
2AAA DETAIL1
2AAA DETAIL2
0AAA TRAILER

1AAA 3010HEADER
2AAA DETAIL1
2AAA DETAIL2
0AAA TRAILER

1AAA 1010HEADER
2AAA DETAIL1
2AAA DETAIL2
1AAA 1010HEADER
2AAA DETAIL1
2AAA DETAIL2
0AAA TRAILER

Each set is a Batch. I need to sort the records in batch wise to the following output .

The sort should be done based on the header(Position 6 to 9 ex. 1010 and 3010)

The output should be as follows,



1AAA 1010HEADER
2AAA DETAIL1
2AAA DETAIL2
0AAA TRAILER

1AAA 1010HEADER
2AAA DETAIL1
2AAA DETAIL2
0AAA TRAILER

1AAA 1010HEADER
2AAA DETAIL1
2AAA DETAIL2
1AAA 1010HEADER
2AAA DETAIL1
2AAA DETAIL2
0AAA TRAILER

1AAA 3010HEADER
2AAA DETAIL1
2AAA DETAIL2
0AAA TRAILER

1AAA 3010HEADER
2AAA DETAIL1
2AAA DETAIL2
0AAA TRAILER



Sankar
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 May 31, 2007 9:14 pm    Post subject:
Reply with quote

You can use the technique discussed in the "Sort groups of records" Smart DFSORT Trick at:

http://www.ibm.com/servers/storage/support/software/sort/mvs/tricks/
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 Sorting of hex values Saurabh_mi DFSORT/ICETOOL 11 Thu May 25, 2017 3:49 pm
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 HLIST Utility In Batch Virendra Shambharkar TSO/ISPF 4 Fri Apr 07, 2017 3:38 pm
No new posts DFSORT - Overriding default option TU... Steve Ironmonger DFSORT/ICETOOL 3 Tue Apr 04, 2017 3:54 pm
No new posts Batch job tuning sgandhla Testing & Performance analysis 5 Fri Mar 24, 2017 9:41 pm


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