Page 1 of 1

need to match records of same file on the basis of one field

PostPosted: Fri Jan 06, 2012 9:35 pm
by rakesh086
Hi All,

I have a prob with matching records of a file on the basis of one field of that file. i just want to check all records.

my record layout is very huge and i dnt want to match each and every field.

is there any smart way to do it. please suggest me.

for example

cust acct -------------------------------
abc 123 -----------------------------
abc 234 -----------------------------
on the basis of cust and this diff accts i need to check for other fields.

Re: need to match records of same file on the basis of one f

PostPosted: Fri Jan 06, 2012 11:53 pm
by BillyBoyo
You need to look at Matched File Processing in the manual. If you look through this forum, I think you'll find some examples as well. Take one of those as a start and let us know if you have problems. If you don't find anything there search with google for "JOB INPUT" MATCHED and I'm sure you'll find some.

Re: need to match records of same file on the basis of one f

PostPosted: Mon Jan 09, 2012 1:37 pm
by rakesh086
Hi Billy,
Thanks for reply.

acctually i need to get only those fields value in output file which is diffrent(not matched) not the whole record.

I tried lots of search with google but i just get ans about whole record in output file.

Please help me out if there is any solution.

Re: need to match records of same file on the basis of one f

PostPosted: Mon Jan 09, 2012 3:05 pm
by BillyBoyo
That was the requirement I was answering to.

In "matched file processing" you define the keys on the records by which you can identify the connection from one file to the other. What you then do with the remaining fields is up to you.

JOB INPUT +
           FILE1 ( KEY KEY1 )  +
           FILE2 ( KEY KEY2 )

IF MATCHED
    do some matched logic
    GO TO JOB
END-IF
IF FILE1
    process records on file1 only
    GO TO JOB
END-IF
IF FILE2
    process records on file2 only
    GO TO JOB
END-IF