View previous topic :: View next topic |
Author |
Message |
pkarthik@email.com Beginner
Joined: 29 Mar 2005 Posts: 34 Topics: 18 Location: Canada
|
Posted: Sat Aug 27, 2005 12:22 pm Post subject: Number of records before sort and after sort . |
|
|
Hi,
Didi no : of records processed in a sort statement can be determined.This is appplicable to REPRO too.
Straight Forward Question is the number of records before sort and after sort should be compared. is there any provision in JCL.If it is Please give me the JCL. _________________ For any type of complex problems there will be multiple easiest solutions |
|
Back to top |
|
|
Phantom Data Mgmt Moderator
Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
|
Posted: Sat Aug 27, 2005 11:31 pm Post subject: |
|
|
pkarthik,
I am just going to guide you on this. Try completing the JCL and let us know how it works. This could be accomplish in 3 steps or 1 step-3 pass using Synctool/ICETOOl.
Step1:
Use SORT, and write a sysin card as shown below. This will write the number of records in the input file Before SORT.
Code: |
SORT FIELDS=COPY
OUTFIL TRAILER1=(COUNT),NODETAIL,REMOVECC
|
Step2:
SORT the input file on whatever conditions you have. Unless you use any INCLUDE/OMIT, the number of records will not vary. At the same time use OUTFIL TRAILER1 again to write the number of records in another output file. SORTOUT will have the sorted data and CNTFILE will have the number of records written to SORTOUT.
Code: |
SORT FIELDS=(start,end,format,order)
INCLUDE COND=(........)
OUTREC FIELDS=(.......)
OUTFIL FNAMES=SORTOUT
OUTFIL FNAMES=CNTFILE,TRAILER1=(COUNT),NODETAIL,REMOVECC
|
Step 3:
Compare Step. You can use any Compare tools to do this. COUNT will write a 8 byte count to the output file starting from position 1. All you need to do is to compare the first 8 bytes in both the files.
Hope this helps,
Thanks,
Phantom |
|
Back to top |
|
|
Frank Yaeger Sort Forum Moderator
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
|
Posted: Sun Aug 28, 2005 9:56 am Post subject: |
|
|
Quote: | the number of records before sort and after sort should be compared |
Can you give us a little more background on why you want to do this? What's the situation that requires this kind of comparison? I'm just curious. _________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort |
|
Back to top |
|
|
pkarthik@email.com Beginner
Joined: 29 Mar 2005 Posts: 34 Topics: 18 Location: Canada
|
Posted: Sun Aug 28, 2005 12:02 pm Post subject: |
|
|
Hi,
I am getting files from two different sources I am not sure about the inputs received.Two different sources are from totally independent systems due to recent Modifications we have a doubt that there is data redency.In order to avoid this we are planning to check whether the inputs are completely independent other than the relative field.This step is needed before doing further processing on the data.If the records before sort and after sort (without duplicates) .If they are equal we will go ahead else the Job will be intimating the user that the two systems are processing same info,Which the system holders should take note and rectify it .
Thanks for your timely help.We are working on this issue based on the idea given by Phantom.
Thanks,
P.Karthik _________________ For any type of complex problems there will be multiple easiest solutions |
|
Back to top |
|
|
|
|