issues comparing two files and writing outputs



Unicenter CA-Easytrieve Plus Report Generator: CA's information retrieval and data management tool

issues comparing two files and writing outputs

Postby samara8609 » Sat Jun 13, 2009 1:03 am

I am attempting to compare 2 files, lets say file A and file B, on a key that is 7 bytes long and starts at position 1. Both files have already been sorted in the following format: (1,7,bi,a). The main problem is that file B has duplicate keys. I need to output all records from file b that have a matching key in file A to one file and all the records from file b that do not have a matching key in file A to another file. Both file a and file b are sequential files. Any help with this would be greatly appreciated
samara8609
 
Posts: 3
Joined: Wed Jun 03, 2009 1:38 am
Has thanked: 0 time
Been thanked: 0 time

Re: issues comparing two files and writing outputs

Postby dick scherrer » Sat Jun 13, 2009 3:10 am

Hello,

What have you written so far?

Which version of Easytrieve is used on your system?

Suggest you refer to the information about "synchronized file processing" if you have the current release.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: issues comparing two files and writing outputs

Postby samara8609 » Mon Jun 15, 2009 7:14 pm

i am currently using ca-easytrieve/Plus for os/390
I have only written the encironment and library sections, i have not done the activity section because i am not sure how to handle the duplicate files with the matches statement. I've done this program on COBOL, but have decided to try it on EZT as a learning experience.
samara8609
 
Posts: 3
Joined: Wed Jun 03, 2009 1:38 am
Has thanked: 0 time
Been thanked: 0 time

Re: issues comparing two files and writing outputs

Postby dick scherrer » Wed Jun 17, 2009 5:21 am

Hello,

i am currently using ca-easytrieve/Plus for os/390
Somewhere (probably near the top of the Ezt output) will be a number (i.e. 6.3, 6.4, 11 etc).

Near the top of the COBOL part of the forum is a Sticky titled:
2-file match/merge sample code


This contains working logic for what you want to do. You should be able to re-code that sample in Ezt using 2 input file definitions. This approach would not use any built-in function to match.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times


Return to CA-Easytrieve

 


  • Related topics
    Replies
    Views
    Last post