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: 1537
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 Extra character appears in file when ... Balu5491 All Other Mainframe Topics 1 Wed Jul 26, 2017 2:39 pm
No new posts SSH - known_hosts file configuration vasanthz All Other Mainframe Topics 2 Wed Jul 26, 2017 2:10 am
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm


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