IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to compare a proc with all other procs in a PDS.


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Bobby86

New User


Joined: 16 Oct 2010
Posts: 3
Location: Hyderabad

PostPosted: Sat Oct 16, 2010 12:55 pm
Reply with quote

Hi, I need to compare a Proc with all the other Procs in a PDS and note it down in a output file, if it is in sync with any other Proc. This must be done for all the Procs. Could you let me know, how to start on this? What is the easiest procedure to suffice my requirement?
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Sat Oct 16, 2010 1:07 pm
Reply with quote

Quote:
What is the easiest procedure to suffice my requirement?

just to start with, express more clearly Your requirement
Quote:
I need to compare a Proc with all the other Procs in a PDS and note it down in a output file, if it is in sync with any other Proc.

the requirement is quite foggy, what is that You want to keep in sync?
it really makes no sense to compare procs with different names,
unless Your shop has a <bit> of disorder in its standards, naming,procedure content

a usual requirement is to compare different PDSs to see if like named members match

sort does not seem the best choice for source compares
SUPERC would be the my choice

but, as said before, until You clarify, we cannot give any help
if You really mean what You say the only way is to build by hand or with a REXX script the appropriate jcl
if there are N members You will have (N-1)! compares to run and check...
pretty illogic
(*)
the first member will have to be compared to N-1 members
the second member will have to be compared to N-2 members
....
the next to last member will have to be compared to 1 members

do the math and You will get the number I told You before
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Sat Oct 16, 2010 1:22 pm
Reply with quote

Quote:
last member will have to be compared to 1 members
The last member need to be compared with 0 members? coz the member left is the last member itself icon_smile.gif

Sorry for deviating from the main topic
Back to top
View user's profile Send private message
Bobby86

New User


Joined: 16 Oct 2010
Posts: 3
Location: Hyderabad

PostPosted: Sat Oct 16, 2010 1:30 pm
Reply with quote

Yeah. Need to make (N-1)! number of compares. The reason for doing so is, similar procs are present in the PDS with differerent names (Similar / Sync here means, the proc executes the same steps as others, but the name could be different). So need to delete these procs, as only one proc would be sufficient for me.
I know that i cannot find any proc in sync with other, as the Procname inside the procs varies with other. But, my idea is to give a condition like, After compare, if difference count is < 4, Note the proc name. (These differences could be procname, inside procs). I am not sure whether this would work?
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Sat Oct 16, 2010 1:32 pm
Reply with quote

my sentence was
Quote:
the next to last member will have to be compared to 1 members

if You want to question the wrong plural, no issue, but I beg to stand by my opinion on the combinatorics icon_biggrin.gif

a different wording could be penultimate
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Sat Oct 16, 2010 1:51 pm
Reply with quote

You have a long and windy road ahead icon_biggrin.gif
what if...
spacing is different,
ddnames/keywords have been shuffled around
...
...

for a scientific approach the procedures should be normalized/reformatted
see for example ibmmainframes.com/viewtopic.php?t=32494&highlight=jcl+reformatter
after that it might make sense to compare them, otherwise You might have to do everything by visual inspection
Back to top
View user's profile Send private message
Bobby86

New User


Joined: 16 Oct 2010
Posts: 3
Location: Hyderabad

PostPosted: Sat Oct 16, 2010 2:19 pm
Reply with quote

icon_biggrin.gif . No. There wont be such differences other than the Proc name.
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Sat Oct 16, 2010 7:02 pm
Reply with quote

enrico

You meant penultimate and i read it as "last". Thanks for making it clear.

back to the topic i wonder why multiple procedures exist with exactly same content except for the proc name.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Sat Oct 16, 2010 7:11 pm
Reply with quote

Hi Arun!
as usual the language barrier ... icon_biggrin.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Compare two files with a key and writ... SYNCSORT 3
No new posts Compare latest 2 rows of a table usin... DB2 1
Search our Forums:

Back to Top