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

How to call REXX program from assembler


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10888
Location: italy

PostPosted: Wed Sep 29, 2010 5:58 pm
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
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: 1787
Location: Bloomington, IL

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

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

Global Moderator


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

PostPosted: Wed Sep 29, 2010 9:39 pm
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

Global Moderator


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

PostPosted: Wed Sep 29, 2010 9:41 pm
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

Global Moderator


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

PostPosted: Wed Sep 29, 2010 9:47 pm
Reply with quote

The IBM website has this document available:

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
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

Global Moderator


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

PostPosted: Wed Sep 29, 2010 10:18 pm
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

Global Moderator


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

PostPosted: Wed Sep 29, 2010 10:20 pm
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
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: 1787
Location: Bloomington, IL

PostPosted: Wed Sep 29, 2010 10:24 pm
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
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

Moderator Emeritus


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

PostPosted: Thu Sep 30, 2010 12:13 am
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: 1787
Location: Bloomington, IL

PostPosted: Thu Sep 30, 2010 12:19 am
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
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: 1787
Location: Bloomington, IL

PostPosted: Thu Sep 30, 2010 12:38 am
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Run rexx with JCL Job CLIST & REXX 1
No new posts Run rexx in batch job CLIST & REXX 7
No new posts Does anyone know rexx for VSE CLIST & REXX 3
No new posts TSO ALLOC In REXX Needs Improvement JCL & VSAM 3
No new posts REXX/CMS How to place command console... CLIST & REXX 4
Search our Forums:

Back to Top