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 PS File

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

New User


Joined: 06 Nov 2013
Posts: 21
Location: India

PostPosted: Thu Apr 10, 2014 4:54 pm    Post subject: Sorting a PS File
Reply with quote

Hi all,
I have a requirement on sorting a PS file.
The file structure can be seen below.

Code:


* HEADER 1                                   
* HEADER 2 :                                 
* HEADER 3 :                                 
---------------------------------------------
1111111    MARCH     12344                     
2222222    APRIL       12345                     
1112222    JUNE         23123                     
3323214    JULY         22134                     
1123324    AUGUST    12314                     

       Trailer record




Record sequence in the file:

After five records a trailer ends the page & the headers 1,2,3 & hiphen record starts again for the next set of 5 records.

I need to sort the records between the headers 1,2,3 & trailer in every page (The headers should not be affected
The file is of record length 80.

Any inputs can be very helpful.

Thank you
Back to top
View user's profile Send private message

Pandora-Box

Moderator


Joined: 07 Sep 2006
Posts: 1534
Location: Andromeda Galaxy

PostPosted: Thu Apr 10, 2014 6:51 pm    Post subject:
Reply with quote

1.Number trailer as '3', Header as 1 and Details as 2
2.Group records for every header and have a PUSH an ID
3.Sort based on 1 and 2 criteria
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Thu Apr 10, 2014 7:07 pm    Post subject: Reply to: Sorting a PS File
Reply with quote

That'll get all the headers from each page together, all the details from each page together, and all the trailers from each page together.

GROUP per page (on first header) with ID. Type of record. Required sort for the data. With OPTION equals.
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Thu Apr 10, 2014 10:52 pm    Post subject:
Reply with quote

see the smart DFSORT trick "Sort groups of records" here

http://www.ibm.com/support/docview.wss?uid=isg3T7000094
Back to top
View user's profile Send private message
Vinay Pushpala

New User


Joined: 06 Nov 2013
Posts: 21
Location: India

PostPosted: Fri Apr 11, 2014 12:27 pm    Post subject:
Reply with quote

Thank you for the inputs.
Will post the outcome soon
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 Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am
No new posts File processing vishwakotin Mainframe Interview Questions 9 Fri Apr 28, 2017 11:38 am


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