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

Need to Retreive details from two records


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
balukanna

New User


Joined: 09 Apr 2008
Posts: 41
Location: USA

PostPosted: Tue Sep 23, 2008 8:51 pm
Reply with quote

Hi,

I need to retrieve details from two records if a value of both the record matches.

For Ex:

I/P File:

12345 CB CLAIM CLRD 01
12345 Invoice 2222 RR 02
13675 AB RTVNO CLRD 01
13675 Invoice 2908 XX 02
29876 DD DATAR OPEN 01
29876 Invoice 3452 ZS 02

The last two fields of the record may contain only 01 or 02
If position 1 to 5 of record having 01 as the last field matches with position 1 to 5 of record having 02 as the last field,
I need to move all the values from Record having 02 as last field and position 10 to 15 from the record having 01 as last field and to remove 02 from that record.

O/P File:

12345 Invoice 2222 RR CLAIM
13675 Invoice 2908 XX RTVNO
29876 Invoice 3452 ZS DATAR
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Tue Sep 23, 2008 10:24 pm
Reply with quote

Quote:
If position 1 to 5 of record having 01 as the last field matches with position 1 to 5 of record having 02 as the last field


All of the records you show in your example satisfy this condition. Is that always true? Will you always have an 01 and 02 pair of records for each key in order? Or are there other variations such as an 01 without an 02, or an 02 without an 01 or something else?

Please show a better example of your input records with ALL possible variations and what you expect for output. Explain the "rules" for getting from input to output. Give the RECFM and LRECL of the input file. Give the starting position of 01 and 02 in their respective records.
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Join multiple records using splice DFSORT/ICETOOL 5
Search our Forums:

Back to Top