I want to compare today's GDG file with that of yesterday's the purpose is to get the only the records which have bene changed as per the batch update. Both of the files are 1000 bytes LRECL. I don't have any keys to compare. I tried to achieve this using the where in1 and in2 are my 1000 lenght files. I'm not satisfied with the results as it doesn't appear correct to me. Both the files are around 1GB in production. Please suggest If I'm doing something wrong or this can be achieved by some other way, thanks
Since you put a '1' in position 1000 for file1 and a '2' in position 1000 file file2 and then used ON(1,1000,CH) every record from file1 and file2 will be a nonduplicate - they will all differ in position 1000.
Try using 1001 instead of 1000 for the id in the OVERLAY and ON operands.
If that doesn't work, then you need to show an example of the records in each input file (relevant fields only) and the expected output records, and explain what you're trying to do.