Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Calling another REXX exec from one REXX exec

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
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    Post subject: Calling another REXX exec from one REXX exec
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: 74
Location: Mysore

PostPosted: Thu May 08, 2008 11:46 am    Post subject: Calling another REXX exec from one REXX exec
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    Post subject: Reply to: Calling another REXX exec from one REXX exec
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10232
Location: italy

PostPosted: Thu May 08, 2008 12:22 pm    Post subject: Reply to: Calling another REXX exec from one REXX exec
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

Senior Member


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

PostPosted: Mon May 12, 2008 10:31 pm    Post subject: Reply to: Calling another REXX exec from one REXX exec
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

Site Director


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

PostPosted: Mon May 12, 2008 11:41 pm    Post subject:
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

Senior Member


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

PostPosted: Tue May 13, 2008 3:42 am    Post subject: Reply to: Calling another REXX exec from one REXX exec
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    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts REXX cdoe to purge a JOB from spool a... Sulabh Agrawal CLIST & REXX 11 Thu Mar 09, 2017 11:36 am
No new posts Overriding PS data in rexx Shaheen Shaik CLIST & REXX 8 Fri Mar 03, 2017 5:08 pm
No new posts REXX compiled via RXTCOMP sergeyken CLIST & REXX 7 Tue Feb 07, 2017 9:41 pm
No new posts Calling procedure with multiple entri... steve-myers PL/I & Assembler 5 Fri Jan 27, 2017 3:33 pm
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us