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: 19245
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 rexx pgm to create multiple ps file IBM Tools 4
No new posts Print report for each record from mul... CA Products 1
No new posts Add column to existing records using ... JCL & VSAM 2
No new posts Syncsort- Merging two records into on... SYNCSORT 3
No new posts How to find orphaned MCDS D records. JCL & VSAM 18
Search our Forums:

Back to Top