Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Need to Retreive details from two records

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
balukanna

New User


Joined: 09 Apr 2008
Posts: 41
Location: chennai

PostPosted: Tue Sep 23, 2008 8:51 pm    Post subject: Need to Retreive details from two records
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 Moderator


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

PostPosted: Tue Sep 23, 2008 10:24 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Join giving more records than expected Danielle.Filteau SYNCSORT 2 Thu Mar 09, 2017 3:28 am
No new posts TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am
No new posts Extract set of records matching on ac... bhaskar_kanteti DFSORT/ICETOOL 3 Mon Mar 06, 2017 7:19 am
No new posts Inserting records based on conditions vickey_dw DFSORT/ICETOOL 9 Wed Feb 22, 2017 1:33 pm
No new posts To Merge mutliple records into a sing... anandgbe DFSORT/ICETOOL 6 Wed Feb 22, 2017 8:49 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us