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 

Merge multiple records to single record

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
chandra
Beginner


Joined: 26 Sep 2003
Posts: 130
Topics: 36

PostPosted: Thu Oct 16, 2008 10:56 am    Post subject: Merge multiple records to single record Reply with quote

Hi All,

I have a file with LRECL=80, RECFM=FB and the input data as shown. The column 1 to 39 is key. column 40 will tell the sequence number for key.

----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
XZ41A1900110011979*****99999 0010000015000099999999999*** PRKY ENF 32A
XZ41A1900110011979*****99999 002C10000000000000000000 ** LANY8OU ** NOOA
XZ41A1900110011979*****99999 0119999999999999999999999*** FGW656IU78H FF
XZ41A1900110011979*****99999 012C01500000000000000000 &&& JAKJNN **AS
XZ41A1900110011979*****99999 013D0163456700000000000000000 GWYJ4TH 4545
XZ41A1900210151999*****04499 0210000015000099999999999***SJHRTU6U323565H
XZ41A1900210151999*****04499 022C00000000000000000000 0110011979*****9 *
XZ41A1900210151999*****04499 0310000030000099999999999*** FGHRHFS465735
XZ41A1900210151999*****04499 032C00000000000000000000 01100ACFGGEF*****9
XZ41A1900210151999*****04499 0330000045000099999999999***
XZ41A1900210151999*****04499 034C00000000000000000000 01100SFDREHG*****9
XZ41A1900210151999*****04499 0510000075000099999999999***

I want to merge same key records into single record as follows (Exclude the 40 the column)

Output :-

XZ41A1900110011979*****99999 0010000015000099999999999*** PRKY ENF 32AC10000000000000000000 ** LANY8OU ** NOOA
XZ41A1900110011979*****99999 0119999999999999999999999*** FGW656IU78H FFC01500000000000000000 &&& JAKJNN **ASD0163456700000000000000000 GWYJ4TH 4545
XZ41A1900210151999*****04499 0210000015000099999999999***SJHRTU6U323565HC00000000000000000000 0110011979*****9 *
XZ41A1900210151999*****04499 0310000030000099999999999*** FGHRHFS465735 C00000000000000000000 01100ACFGGEF*****90000045000099999999999*** C00000000000000000000 01100SFDREHG*****9
XZ41A1900210151999*****04499 0510000075000099999999999***

Can any one please let me know how to do it with SORT utility. I have SYNCSORT.
_________________
Regards,
Chandra
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   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