View previous topic :: View next topic
|
Author |
Message |
Bobby86
New User
Joined: 16 Oct 2010 Posts: 3 Location: Hyderabad
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
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 |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
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
Sorry for deviating from the main topic |
|
Back to top |
|
|
Bobby86
New User
Joined: 16 Oct 2010 Posts: 3 Location: Hyderabad
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
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
a different wording could be penultimate |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
You have a long and windy road ahead
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 |
|
|
Bobby86
New User
Joined: 16 Oct 2010 Posts: 3 Location: Hyderabad
|
|
|
|
. No. There wont be such differences other than the Proc name. |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
Hi Arun!
as usual the language barrier ... |
|
Back to top |
|
|
|