raghavmcs
Active User
Joined: 14 Jul 2005 Posts: 105
|
|
|
|
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
Code: |
COPY FROM(IN1) TO(T1) USING(CTL1)
COPY FROM(IN2) TO(T1) USING(CTL2)
SELECT FROM(T1) TO(OUT) ON(1,1000,CH) -
NODUPS USING(CTL3)
/*
//CTL1CNTL DD *
INREC OVERLAY=(1000:C'1')
/*
//CTL2CNTL DD *
INREC OVERLAY=(1000:C'2')
/*
//CTL3CNTL DD *
OUTFIL FNAMES=OUT,INCLUDE=(1000,1,CH,EQ,C'2'),
BUILD=(1,1000)
/*
|
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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. |
|