IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Sorting a PS File


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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

Global Moderator


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

PostPosted: Thu Apr 10, 2014 6:51 pm
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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Thu Apr 10, 2014 7:07 pm
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
Reply with quote

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

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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top