View previous topic :: View next topic
|
Author |
Message |
kalyan Kumar Yallamraju
New User
Joined: 05 Mar 2008 Posts: 4 Location: Hyderabad
|
|
|
|
Hi,
I've a Rexx exec E1 in a PDS say PDS1 which executes another exec E2 in PDS2.
If I create an exec in PDS1 with the same name E2 as the one present in PDS2 then E1 is executing E2 in PDS1 but not the one in PDS2.
If I change the name of E2 in PDS1 then E1 is again executing E2 from PDS2.
How can I restrict E1 to execute E2 from PDS2 and not E2 from PDS1 even if PDS1 have a member with name E2. |
|
Back to top |
|
|
rexx77
New User
Joined: 14 Apr 2008 Posts: 78 Location: Mysore
|
|
|
|
Code like below
Address TSO "EXEC(PDS2(E2))"
If you have coded like above then i am sure the code will not take the E2 from PDS1. |
|
Back to top |
|
|
kalyan Kumar Yallamraju
New User
Joined: 05 Mar 2008 Posts: 4 Location: Hyderabad
|
|
|
|
Hi rexx77,
I agree with your suggestion. In this case there is no scope of executing E2 from any other location apart from PDS2.
My code is using CALL statement as CALL E2. In this case we are not referring any location to pick E2 for execution.
Hence its starting search from the PDS in which E1 is present.
As it finds E2 is the same PDS its executing from PDS1 only.
I would like to know is there any way to specify the order in which it searches for E2 instead of standard order. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
why use for different things the same name ?
it will only confuse people who will have to mantain Your work after You change job
the general assumption is that if two objects have the same name, they should perform the same actions
it would be better to review the requirements/standards |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
> the general assumption is that if two objects have the same name, they should perform the same actions
I agree, but only in general. If they have the same name, they should perform similar actions, but they do not have to be exactly the same. I frequently override system panels / execs with my own customized versions.
I think Kalyan wants to have PDS2 be first in the standard search order. Or perhaps he wants to have an ALTLIB that specifies PDS2 then PDS1, but only for the life of E2. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
I frequently override system panels / execs with my own customized versions. |
Might be ok for your own personal use. . . When things like this are done in "production", it creates a maintenance nightmare (as Enrico mentioned) for those who inherit the code.
Unless/Until you are required to fix something that you did not create in the middle of the night or some other "period of intensity", you will probably not understand this. It is bad enough to have something "critical" be down, but to be hampered because some long-gone coder got "too cute" is exasperating. |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
Yes, I understand 'production'.
Another reason to have like named parts is to test something before going into production. Not everyone has their own test LPARs or test IMS systems. |
|
Back to top |
|
|
|