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
 

 

How to call REXX program from assembler

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
anki

New User


Joined: 04 Apr 2008
Posts: 23
Location: Pune

PostPosted: Wed Sep 29, 2010 5:56 pm    Post subject: How to call REXX program from assembler?
Reply with quote

Hi,
Thanks for above details, what if i would like to do vice versa... calling REXX program from assembler? and also want to pass a string message from Assembler to REXX program.

Thanks,
Ankit
Back to top
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Wed Sep 29, 2010 5:58 pm    Post subject: Reply to: Calling Assembler programs from Rexx execs or vice
Reply with quote

what happened when You googled for calling rexx from assembler icon_question.gif icon_evil.gif
Back to top
View user's profile Send private message
anki

New User


Joined: 04 Apr 2008
Posts: 23
Location: Pune

PostPosted: Wed Sep 29, 2010 9:21 pm    Post subject: Not able to execute TSO commands in REXX when called by othr
Reply with quote

I am calling REXX program from my assembler but now it is giving me error on TSO commands so tried using "ADDRESS TSO" in REXX program before using first ALLOC but no success. Please advise.
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1738
Location: Bloomington, IL

PostPosted: Wed Sep 29, 2010 9:33 pm    Post subject:
Reply with quote

Did you establish a TSO environment?
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Wed Sep 29, 2010 9:39 pm    Post subject: Reply to: How to call REXX program from assembler
Reply with quote

I wonder if Assembler supports the same calls to IKJTSOEV and IKJEFTSR that COBOL does?
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Wed Sep 29, 2010 9:41 pm    Post subject: Reply to: How to call REXX program from assembler
Reply with quote

Ankit, I think you need to clarify if you wan to call TSO (and/or TSO commands) from Assembler, REXX (I would think it would be a simple call to IRXJCL), or some mixture of both, and if you need to establish a linkage between the two (for passing data).
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Wed Sep 29, 2010 9:47 pm    Post subject: Reply to: How to call REXX program from assembler
Reply with quote

The IBM website has this document available:

http://publib.boulder.ibm.com/infocenter/zos/v1r9/index.jsp?topic=/com.ibm.zos.r9.rexa100/h1981605296.htm
Back to top
View user's profile Send private message
anki

New User


Joined: 04 Apr 2008
Posts: 23
Location: Pune

PostPosted: Wed Sep 29, 2010 9:54 pm    Post subject:
Reply with quote

I need to do following things:
1. Call rexx program from assembler
2. In Rexx program need to execute TSO command.

Assembler >> Rexx >> TSO command

First point is working perfectly as suggested earlier. But I am getting error RC(-3) when trying to execute "ALLOC" or similar TSO command from REXX.

I am not familiar with IKJTSOEV or IKJEFTSR.
Q. Do we need to create a TSO enviorment in this case? If yes, how?
Q. Why in this case, when we are calling rexx from assembler TSO enviorment is not available in rexx program, while it normally available when REXX executed standalone?
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Wed Sep 29, 2010 10:18 pm    Post subject: Reply to: How to call REXX program from assembler
Reply with quote

I personally don't know Assembler, but I'm curious as to what TSO commands can't be handled directly, or even better, with Assembler.
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Wed Sep 29, 2010 10:20 pm    Post subject: Reply to: How to call REXX program from assembler
Reply with quote

Chapter 23. Using the TSO/E Service Facility IKJEFTSR.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Sep 29, 2010 10:24 pm    Post subject:
Reply with quote

why don't you try invoking the assembler module via IKJEFT..

it is a simple test and you don't have to change any code......
but you still need the ADDRESS TSO in the Rexx Script (i think). won't hurt.
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1738
Location: Bloomington, IL

PostPosted: Wed Sep 29, 2010 10:24 pm    Post subject:
Reply with quote

anki wrote:
Q. Do we need to create a TSO enviorment in this case?

Yes
Quote:
If yes, how?

I want you to contemplate for what the highlighted letters in IKJTSOEV could possibly stand. Please take as much time as needed to be certain of your answer.
Quote:
Q. Why in this case, when we are calling rexx from assembler TSO enviorment is not available in rexx program, while it normally available when REXX executed standalone?

Are you actually executing Rexx standalone -- i.e., by invoking IRXJCL -- or through some other program? Perhaps IKJEFT01, 1A, or 1B?
Back to top
View user's profile Send private message
anki

New User


Joined: 04 Apr 2008
Posts: 23
Location: Pune

PostPosted: Wed Sep 29, 2010 11:26 pm    Post subject:
Reply with quote

Quote:
I want you to contemplate for what the highlighted letters in IKJTSOEV could possibly stand. Please take as much time as needed to be certain of your answer.


TSOEV is for TSO Enviorment and IKJTSOEV is used to setup TSO env.

Quote:
Are you actually executing Rexx standalone -- i.e., by invoking IRXJCL -- or through some other program? Perhaps IKJEFT01, 1A, or 1B?

I also tried executing REXX program by IRXJCL also but TSO command in REXX program is not working.



[/quote]
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: Thu Sep 30, 2010 12:13 am    Post subject:
Reply with quote

Hello,

Suggest you run a trace and post the info shown by the trace.
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1738
Location: Bloomington, IL

PostPosted: Thu Sep 30, 2010 12:19 am    Post subject:
Reply with quote

anki wrote:
Quote:
I want you to contemplate for what the highlighted letters in IKJTSOEV could possibly stand. Please take as much time as needed to be certain of your answer.


TSOEV is for TSO Enviorment and IKJTSOEV is used to setup TSO env.


Very good; you now know how to create a TSO environment.

Quote:
Quote:
Are you actually executing Rexx standalone -- i.e., by invoking IRXJCL -- or through some other program? Perhaps IKJEFT01, 1A, or 1B?

I also tried executing REXX program by IRXJCL also but TSO command in REXX program is not working.

If you do not have a TSO environment -- because you are not executing your exec from TSO (IKJEFT*) and have not established one via IKJTSOEV -- why would you expect a TSO command to work?
Back to top
View user's profile Send private message
anki

New User


Joined: 04 Apr 2008
Posts: 23
Location: Pune

PostPosted: Thu Sep 30, 2010 12:27 am    Post subject:
Reply with quote

I am able to run my REXX program using IKJEFT01.

Also I came across one para which would make it hard to create TSO enviorment in REXX. Copy pasted below. thanks.

Quote:
REXX ADDRESS TSO Support Requirementsv
If you want REXX ADDRESS TSO support, you must ensure that no REXX
language processor environment exists in your address space when you invoke
IKJTSOEV. If you invoke IKJTSOEV from an address space that already contains
a REXX language processor environment and the REXX environment does not
include the ADDRESS TSO host command environment, the REXX language
processor environment will continue to be available without ADDRESS TSO
support.
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1738
Location: Bloomington, IL

PostPosted: Thu Sep 30, 2010 12:38 am    Post subject:
Reply with quote

anki wrote:
I am able to run my REXX program using IKJEFT01.

Just so. IKJEFT01 is TSO; thus, if you run your exec using IKJEFT01, you are ipso facto running it in a TSO environment.

Quote:
Also I came across one para which would make it hard to create TSO enviorment in REXX. Copy pasted below. thanks.

Quote:
REXX ADDRESS TSO Support Requirementsv
If you want REXX ADDRESS TSO support, you must ensure that no REXX
language processor environment exists in your address space when you invoke
IKJTSOEV. If you invoke IKJTSOEV from an address space that already contains
a REXX language processor environment and the REXX environment does not
include the ADDRESS TSO host command environment, the REXX language
processor environment will continue to be available without ADDRESS TSO
support.

Indeed. So, then, you won't create the environment by invoking IKJTSOEV from Rexx, but by invoking it from your assembler program before executing the exec, won't you?
Back to top
View user's profile Send private message
anki

New User


Joined: 04 Apr 2008
Posts: 23
Location: Pune

PostPosted: Thu Sep 30, 2010 2:04 am    Post subject: THANK YOU
Reply with quote

THANK YOU.

I am able to setup TSO enviorment in Assembler program and succesfully called REXX program which is executing TSO commands.

APPRECIATE YOUR HELP..!!..
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 I can not compile my program PL1 V3.R... Miguel Fernandez PL/I & Assembler 13 Tue Dec 06, 2016 8:30 pm
No new posts IMS BMP program causes 878 system abend Artemk IMS DB/DC 7 Tue Nov 22, 2016 8:26 pm
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 6 Fri Nov 18, 2016 1:48 pm
This topic is locked: you cannot edit posts or make replies. Rexx to create GDG by scanning JJ result krish.deepu CLIST & REXX 5 Tue Oct 25, 2016 5:32 pm
No new posts Replace repeated JCL with looping REXX prino CLIST & REXX 3 Thu Oct 13, 2016 5:30 am


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