Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 MXG - Processing Compressed DB2 SMF r... vasanthz All Other Mainframe Topics 2 Thu May 10, 2018 12:47 am
No new posts Extract the records with a PD field's... sudhakar84 DFSORT/ICETOOL 11 Mon Apr 02, 2018 7:26 pm
No new posts Merge 2 records sancraig16 SYNCSORT 19 Tue Mar 27, 2018 8:17 pm
No new posts Copy set of records based on condition krish.deepu SYNCSORT 2 Thu Mar 08, 2018 11:39 am
No new posts add sequence number for duplicate rec... SRUTHI DRAVIDAMANI COBOL Programming 11 Thu Feb 22, 2018 5:37 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us