View previous topic :: View next topic
|
Author |
Message |
rgupta71
Active User
Joined: 21 Jun 2009 Posts: 160 Location: Indore
|
|
|
|
Hi Experts,
I am in a problem. I want to sort my data such that the output is always the last record.
I/P file
U1 P1 A1 A2 A3
U1 P2 A1
U1 P3 A1 A2 A3 A4
O/P file
U1 P1 A3
U1 P2 A1
U1 P3 A4
U1 is of 2 characters. P1 is of 10 characters and values are in array format with range upto 25.
Can we achieve this using SYNSORT.
Thanks in Advance. |
|
Back to top |
|
|
sdsinfo
New User
Joined: 14 Jan 2008 Posts: 10 Location: bangalore
|
|
|
|
it is possible to sort your records in such a way that ur last value of record will be at last but ur records position will be changed.. do u want to sort in this way or you must need first record's last value should be in the first record itself in forst position ? |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
Rgupta,
Quote: |
am in a problem. I want to sort my data such that the output is always the last record.
|
Going by the response, I do not think the requirement is clear.
Please explain in case you need a working JCL for your requirement. |
|
Back to top |
|
|
rgupta71
Active User
Joined: 21 Jun 2009 Posts: 160 Location: Indore
|
|
|
|
Hi Aaru,
The record is of the format
<key1 Key2><Count><value1><value2><value3>...........<value25>
Key1 is of 2 characters
Key2 is of 10 character
Count defines no of values present in the record. I need to pick the last record.i.e. the value which is equal to count.
Value is of 4 characters
Values are a type of array that range from 1 to 25.
Thanks |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
What is the size and format of the count, packed decimal, zoned decimal, binary? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
<key1 Key2><Count><value1><value2><value3>...........<value25> |
There is no count shown in the "sample" data.
It will help if you post more realistic data rather than alphabet soup. . .
As Craig mentioned, you need to post all of the info needed to meet this requirement. |
|
Back to top |
|
|
|