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 

Concatenate specific fileds from two recs in a single rec

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


Joined: 24 Mar 2006
Posts: 27
Topics: 14

PostPosted: Fri Jul 11, 2008 4:36 pm    Post subject: Concatenate specific fileds from two recs in a single rec Reply with quote

The input file:
Code:

<---10----><---10----><---10----><---10----><---10----><-1>
1111      --------     ------     ------    XXXXXXX     A
1111      AAAA         BBBB       CCCC      -------     B
1122      --------     ------     ------    YYYYYYY     A
1122      DDDD         EEEE       FFFF      -------     B


The output should be:

Code:

<---10----><---10----><---10----><---10----><---10----><-1>
1111      AAAA         BBBB       CCCC    XXXXXXX        A
1122      DDDD         EEEE       FFFF    YYYYYYY        A

Based on the Key (1111,1122) and the last indicator we need to populate the filed 2,
field 3 and filed 4 from 2nd record to first record.

Field 2, 3, 4 in the 1st record will always be blank.

Can we do it using SYNCSORT?

Thanks!
-Dip.
Back to top
View user's profile Send private message Yahoo Messenger
Dip
Beginner


Joined: 24 Mar 2006
Posts: 27
Topics: 14

PostPosted: Fri Jul 11, 2008 5:09 pm    Post subject: Reply with quote

adding one more point:

Records where keys are not repeating should be untouched:

Code:

<---10----><---10----><---10----><---10----><---10----><-1>

1111      --------     ------     ------    XXXXXXX     A
1111      AAAA         BBBB       CCCC      -------     B
1122      --------     ------     ------    YYYYYYY     A
1122      DDDD         EEEE       FFFF      -------     B
1133      ABNS         NBAS       SDSF      SDSFFF      A




The output should be:

Code:

<---10----><---10----><---10----><---10----><---10----><-1>

1111      AAAA         BBBB       CCCC    XXXXXXX     A
1122      DDDD         EEEE       FFFF    YYYYYYY     A
1133      ABNS         NBAS       SDSF    SDSFFF      A


Thanks!
Dip.
Back to top
View user's profile Send private message Yahoo Messenger
hari_uss
Beginner


Joined: 19 Dec 2002
Posts: 78
Topics: 6
Location: Trivandrum, India

PostPosted: Sat Jul 12, 2008 7:06 am    Post subject: Reply with quote

See whether this helps you.
http://www.mvsforums.com/helpboards/viewtopic.php?t=7997&highlight=select
Back to top
View user's profile Send private message Send e-mail
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