View previous topic :: View next topic
|
Author |
Message |
riju_luvjust
New User
Joined: 04 Oct 2006 Posts: 18
|
|
|
|
I am new to easytrieve so dont have that much knowledge on this topic.
Right now i am facing a problem in coding an easytrieve. Could you please guide me
I want to compare two files based on some condition. But the files are comparing as 1:1 basis. I mean to say that 1st record is being compared to 1st record of 2nd file not with all the records of 2nd file. and because of this i am not getting desired results.
JOB INPUT NULL
****************
GET INFILE
IF EOF INFILE
STOP
END-IF
****************
GET INFILE1
IF EOF INFILE1
STOP
END-IF
I think there is some problem in reading the files. please correct me |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
Are you saying that you want to compare every record of one file with every record in another?
How many records in each file?
what sort of keys are you comparing in each file?
what sort of result do you expect to produce upon a match?
what sort of result do you expect to produce upon a mis-match? |
|
Back to top |
|
|
riju_luvjust
New User
Joined: 04 Oct 2006 Posts: 18
|
|
|
|
yes i want to compare every record of infile with all the records of infile1
It has some 50000 records.
The format of the infile is
VON(8) and Family(3)
for Infile1
Family(3) and VON(8)
If the record match then i want those records need to be dropped from Infile. |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
Are you saying that you want to compare every record of one file with every record in another?
riju_luvjust wrote: |
yes i want to compare every record of infile with all the records of infile1 |
OK...
How many records in each file?
Quote: |
It has some 50000 records. |
Combined or each?
what sort of keys are you comparing in each file?
Quote: |
The format of the infile is
VON(8) and Family(3)
for Infile1
Family(3) and VON(8) |
OK...
what sort of result do you expect to produce upon a match?
Quote: |
If the record match then i want those records need to be dropped from Infile. |
OK...
what sort of result do you expect to produce upon a mis-match?
Kept?
This sounds like it would work a whole lot quicker and easier if this was done with a sort, something like summing and splitting out all the non dups? |
|
Back to top |
|
|
riju_luvjust
New User
Joined: 04 Oct 2006 Posts: 18
|
|
|
|
Each file have more then 50000 records.
If the records mis match then we will keep the records.
If its sorting then please let me know how to code.
when i tried to do it with easytrieve (both sequencial file). when i tried the search for all the records of 2nd file. now the problem is the counter need to reset. so that for 2nd record of 1st file it will search from 1st record of the 2nd file |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
riju_luvjust wrote: |
when i tried to do it with easytrieve (both sequencial file). when i tried the search for all the records of 2nd file. now the problem is the counter need to reset. so that for 2nd record of 1st file it will search from 1st record of the 2nd file |
EZT can not do that.
Take a look at Create files with matching and non-matching records in Smart DFSORT Tricks.
Then repost any questions in a new thread in the DFSORT/ICETOOL forum. |
|
Back to top |
|
|
riju_luvjust
New User
Joined: 04 Oct 2006 Posts: 18
|
|
|
|
Thanks i will check the pdf. will update the results. |
|
Back to top |
|
|
|