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: 1529
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: 7240

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 Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm


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