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

Calling another REXX exec from one REXX exec


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
kalyan Kumar Yallamraju

New User


Joined: 05 Mar 2008
Posts: 4
Location: Hyderabad

PostPosted: Thu May 08, 2008 10:51 am
Reply with quote

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
View user's profile Send private message
rexx77

New User


Joined: 14 Apr 2008
Posts: 78
Location: Mysore

PostPosted: Thu May 08, 2008 11:46 am
Reply with quote

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
View user's profile Send private message
kalyan Kumar Yallamraju

New User


Joined: 05 Mar 2008
Posts: 4
Location: Hyderabad

PostPosted: Thu May 08, 2008 12:18 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu May 08, 2008 12:22 pm
Reply with quote

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
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Mon May 12, 2008 10:31 pm
Reply with quote

> 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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon May 12, 2008 11:41 pm
Reply with quote

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
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Tue May 13, 2008 3:42 am
Reply with quote

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
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 -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
No new posts run rexx code with jcl CLIST & REXX 15
Search our Forums:

Back to Top