Page 1 of 1

Getting matched and unmatched records from two files

PostPosted: Tue Nov 10, 2015 11:44 am
by Papya01234
Hello Team,

I tried to find out in the forum but was not able to find anything which can be used to fulfill my requirement.

I have two files: File1 - 80 Byte and File2- 80 Byte

File1:

ABCDEF 12345
PQRSTU 23568

File2:

ABCDEF 98453
LANOPD 23568

Key used for join key is:

JOINKEYS FILES=F1,FIELDS=(1,6,A)
JOINKEYS FILES=F2,FIELDS=(1,6,A)

Output that I am looking for is:

IF MATCHED the record should be picked from File1, IF NOT MATCHED the record should be picked from File2.

ABCDEF 12345 -----> From File1
LANOPD 23568 -----> From File2

would you please suggest/guide me to get this done?

Regards,
Balesh

Re: Getting matched and unmatched records from two files

PostPosted: Tue Nov 10, 2015 3:00 pm
by NicC
Not a JCL question but a sort question. Topic moved.

Perhaps you shuold search the correct forum section for a solution. An please use the code tags when coding data and code or anything else that you would see on the screen.