IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Merging multiple records onto single record based on key


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
vinu78

Active User


Joined: 02 Oct 2008
Posts: 179
Location: India

PostPosted: Fri Aug 09, 2013 8:30 pm
Reply with quote

Hi Dick,

Thanks for the motivation.
From a record with 10 byte, whenever first 6 byte matches (can be 3 or 4 records), I would like to merge the 8th column data, 9th column data and 10th column data onto a single record.

Code:
Input is

ABCDEF X 
ABCDEF   Y
ABCDEF     Z
MNOPQR   Y
MNOPQR
UVWXYA

Output is
ABCDEF XYZ
MNOPQR  Y 
UVWXYZ


Thanks
Vinu
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Aug 09, 2013 9:47 pm
Reply with quote

Hello,

Quote:
Thanks for the motivation.
You're most welcome icon_smile.gif

To do what you want, use your key (1-6) and in the INREC use IFTHEN, WHEN INIT, and PUSH the "x,y,z" values. Then in the OUTFIL, BUILD your re-formatted output records.

There should be examples here in the forum.
Back to top
View user's profile Send private message
vinu78

Active User


Joined: 02 Oct 2008
Posts: 179
Location: India

PostPosted: Mon Aug 12, 2013 6:05 pm
Reply with quote

Thanks Dick for the guidance. I will try that.

Thanks
Vinu
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM Goto page Previous  1, 2

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts Compare only first records of the fil... SYNCSORT 7
Search our Forums:

Back to Top