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 Batch job tuning sgandhla Testing & Performance analysis 0 Fri Mar 24, 2017 9:41 pm
No new posts MIPS/CPU consumption reduction in Batch vishwakotin DFSORT/ICETOOL 4 Sat Mar 18, 2017 5:46 pm
No new posts Join giving more records than expected Danielle.Filteau SYNCSORT 2 Thu Mar 09, 2017 3:28 am
No new posts TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am
No new posts Extract set of records matching on ac... bhaskar_kanteti DFSORT/ICETOOL 3 Mon Mar 06, 2017 7:19 am


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