View previous topic :: View next topic
|
Author |
Message |
Vinay Pushpala
New User
Joined: 06 Nov 2013 Posts: 21 Location: India
|
|
|
|
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 |
|
|
Pandora-Box
Global Moderator
Joined: 07 Sep 2006 Posts: 1592 Location: Andromeda Galaxy
|
|
|
|
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 |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
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 |
|
|
Skolusu
Senior Member
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
|
|
Back to top |
|
|
Vinay Pushpala
New User
Joined: 06 Nov 2013 Posts: 21 Location: India
|
|
|
|
Thank you for the inputs.
Will post the outcome soon |
|
Back to top |
|
|
|