View previous topic :: View next topic |
Author |
Message |
vkphani Intermediate

Joined: 05 Sep 2003 Posts: 483 Topics: 48
|
Posted: Tue Jul 26, 2005 10:04 pm Post subject: SORT Help |
|
|
Hi,
I am having an input file with the below structure.
Code: |
EmpNo(Numeric) Details(String)
123 Abcd
234 nijpoi
123 pqrs
123 mnop
234 jjoijojgsg
|
I want to sort this file with the duplicates eliminated. However, the details need to be concatenated.
Output:
Code: |
123 Abcdpqrsmnop
234 nijpoijjoijojgsg
|
How do I do this? SORT CARDS.. ICETOOL?
Thanks in advance. |
|
Back to top |
|
 |
Phantom Data Mgmt Moderator

Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
|
Posted: Wed Jul 27, 2005 12:13 am Post subject: |
|
|
Vkphani,
You have been in this forum for a long time. It would have been nice if you had followed the process/rules.
Please provide us complete information about the input file and the data.
1. LRECL & RECFM
2. what is the length of the DETAIL field
3. What is the maximum occurrences of a particular key?
You cannot concatenate running text as you have shown. The length of the detail field should be constant across records. You can concatenate the detail field as a string of 4 bytes each or 6 bytes each and so on as shown below.
Code: |
123 Abcd______pqrs______mnop______
124 nijpoi____jjoijojgsg
|
Treat "_" as spaces. The string "jjoijojgsg" is 10 bytes long and hence the shorter detail fields are padded with spaces.
Thanks,
Phantom |
|
Back to top |
|
 |
vkphani Intermediate

Joined: 05 Sep 2003 Posts: 483 Topics: 48
|
Posted: Mon Aug 08, 2005 10:41 pm Post subject: |
|
|
Phantom,
RECFM is FB and LRECL is 80.
Length of DETAIL field is 20.
Emp no. is unique. |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12388 Topics: 75 Location: San Jose
|
|
Back to top |
|
 |
|
|