MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Number of records before sort and after sort .

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
pkarthik@email.com
Beginner


Joined: 29 Mar 2005
Posts: 34
Topics: 18
Location: Canada

PostPosted: Sat Aug 27, 2005 12:22 pm    Post subject: Number of records before sort and after sort . Reply with quote

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
View user's profile Send private message Send e-mail
Phantom
Data Mgmt Moderator
Data Mgmt Moderator


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Sat Aug 27, 2005 11:31 pm    Post subject: Reply with quote

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
View user's profile Send private message
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Sun Aug 28, 2005 9:56 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
pkarthik@email.com
Beginner


Joined: 29 Mar 2005
Posts: 34
Topics: 18
Location: Canada

PostPosted: Sun Aug 28, 2005 12:02 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
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


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group