MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

SORT Help

 
Post new topic   This topic is locked: you cannot edit posts or make replies.   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
vkphani
Intermediate


Joined: 05 Sep 2003
Posts: 483
Topics: 48

PostPosted: Tue Jul 26, 2005 10:04 pm    Post subject: SORT Help Reply with quote

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
View user's profile Send private message Send e-mail
Phantom
Data Mgmt Moderator
Data Mgmt Moderator


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Wed Jul 27, 2005 12:13 am    Post subject: Reply with quote

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
View user's profile Send private message
vkphani
Intermediate


Joined: 05 Sep 2003
Posts: 483
Topics: 48

PostPosted: Mon Aug 08, 2005 10:41 pm    Post subject: Reply with quote

Phantom,

RECFM is FB and LRECL is 80.
Length of DETAIL field is 20.
Emp no. is unique.
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12388
Topics: 75
Location: San Jose

PostPosted: Tue Aug 09, 2005 3:39 am    Post subject: Reply with quote

Topic locked by Admin

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   This topic is locked: you cannot edit posts or make replies.   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group