Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
Posted: Wed Jan 20, 2010 1:01 pm Post subject:
rkarthik22,
The following DFSORT JCL will set an RC=4 if the counts from the 2 files vary by 5%. If the return code from the step is 4 send the email in next step.
Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
Posted: Thu Jan 21, 2010 12:01 pm Post subject:
rkarthik22,
I created a 9 byte files for both current and last month files using JNF1CNTL and JNF2CNTL. The first 8 bytes will have a numeric 1 and 9th byte is a space. The space is used as a key for sum sorting and matching.
F1=lastmon is used to indicate that the JOINKEYS statement applies to the F1 input file.
F2=currmon is used to indicate that the JOINKEYS statement applies to the F2 input file.
For complete details on JOINKEYS and the other new functions available with the Nov, 2009 DFSORT PTF, see:
Here is another flavour of the same logic. Of course I had to use Kolusu's percentage logic.
Here we first create 2 intermediate count files for PREV and CURR month files and save them in T1 and T2 respectively. I am also creating 1 byte key C'1' in both the files to be used in JOINKEY.
Finally using JOINKEYS we join both the files and perform % logic.
The only difference between 2 logic is Kolusu's version is using INREC and SUM FIELDS to create COUNT where as this version is using REMOVECC...COUNT.
Figured that out when I did volume test with the test file today morning.
During the weekend I didn't get time to do volume testing and compare run times and/or cpu consumption.
Lesson learnt. In the future, will try to test efficiency before posting.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum