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 

Compare 2 Files using sort
Goto page Previous  1, 2, 3
 
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
hari108
Beginner


Joined: 03 Feb 2006
Posts: 16
Topics: 4

PostPosted: Mon Jul 21, 2008 12:58 am    Post subject: Thank you!! Reply with quote

Frank!! This is simply cool!!

It would be great if you can spare some time help me understand the sort card which you have used Smile

Thanks once again for your guidance!!
_________________
Thanks,
Hari
Back to top
View user's profile Send private message Yahoo Messenger
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


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

PostPosted: Mon Jul 21, 2008 11:20 am    Post subject: Reply with quote

We are multiplying the first count (count1) by -1, adding it to the second count (count2), writing a record to OUT1 if the result is 0, and setting the return code based on whether the record was included or not.

The WHEN=INIT puts a sequence number in position 12. So the first record will have seqnum 1 and the second record will have seqnum 2. The WHEN=(12,1,ZD,EQ,1) finds the first record by its seqnum of 1 and multiplies count1 by -1. So now the first record has -count1 and the second record has +count2. SUM gets one record with count = -count1 + count2. If count1 and count2 are equal, the result is 0. If count1 and count2 are not equal, the result is not zero. The OUTFIL INCLUDE includes the record if count is 0 or omits the record is count is not 0. NULLOFL=RC16 sets RC=16 if no records are included (count is not 0).

Does that help?
_________________
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
hari108
Beginner


Joined: 03 Feb 2006
Posts: 16
Topics: 4

PostPosted: Tue Jul 22, 2008 1:02 am    Post subject: Reply with quote

Thanks Frank!!
_________________
Thanks,
Hari
Back to top
View user's profile Send private message Yahoo Messenger
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
Goto page Previous  1, 2, 3
Page 3 of 3

 
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