I am trying to test the running of a program through Rexx that I normally
run in batch JCL. This is usually an easy effort, making sure the proper
allocations for the files are done first.
However, I am stumped about the actual program call. I need to have two
loadlibs in my execute path - one that has the main program, and another
that has the subprogram. I cannot merge the two libraries, as they must be
kept separate.
In order to set up the loadlibs, I used LIBDEF ISPLLIB EXCLLIBR
ID('MY.LOADLIB1',MY.LOADLIB2') as directed in the Rexx doc.
I tried to run Address LINK "PGMNAME", Address LINKMVS "PGMNAME", and
Address ATTACH "PGMNAME" with all of them getting this:
IRX0250E System abend code 806, reason code
00000004.
IRX0255E Abend in host command PGMNAME or address environment routine
LINKPGM.
+++ RC(-2054)
+++
I know the module exists in MY.LOADLIB2, and there is no difference in the
order of the libs in the LIBDEF.
I believe this must be a simple thing, and I am just overlooking something
here.
Can someone point me in the right direction, and as a bonus, explain briefly
the differences in the LINK, LINKMVS, ATTACH and any other program calls
from REXX? The doc wasn't clear for me.
Thank you in advance for your paitnce and assistance!
D
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LIST...@VM.MARIST.EDU with the message: INFO TSO-REXX
:>I am trying to test the running of a program through Rexx that I normally
:>run in batch JCL. This is usually an easy effort, making sure the proper
:>allocations for the files are done first.
:>However, I am stumped about the actual program call. I need to have two
:>loadlibs in my execute path - one that has the main program, and another
:>that has the subprogram. I cannot merge the two libraries, as they must be
:>kept separate.
:>In order to set up the loadlibs, I used LIBDEF ISPLLIB EXCLLIBR
:>ID('MY.LOADLIB1',MY.LOADLIB2') as directed in the Rexx doc.
:>I tried to run Address LINK "PGMNAME", Address LINKMVS "PGMNAME", and
:>Address ATTACH "PGMNAME" with all of them getting this:
:>IRX0250E System abend code 806, reason code
:>00000004.
:>IRX0255E Abend in host command PGMNAME or address environment routine
:>LINKPGM.
:> +++ RC(-2054)
:>+++
:>I know the module exists in MY.LOADLIB2, and there is no difference in the
:>order of the libs in the LIBDEF.
:>I believe this must be a simple thing, and I am just overlooking something
:>here.
You are using ISPF library services but using native execution.
:>Can someone point me in the right direction, and as a bonus, explain briefly
:>the differences in the LINK, LINKMVS, ATTACH and any other program calls
:>from REXX? The doc wasn't clear for me.
You will need to do
address ispf "SELECT CMD("PGMNAME")"
SELECT PGM will not work since you are using dynamic link in your program.
Note that the client program will receive a CPPL and not a normal O/S plist.
Alternatively, you can allocate ISPLLIB before starting ISPF.
--
Binyamin Dissen <bdi...@dissensoftware.com>
http://www.dissensoftware.com
Director, Dissen Software, Bar & Grill - Israel
Should you use the mailblocks package and expect a response from me,
you should preauthorize the dissensoftware.com domain.
I very rarely bother responding to challenge/response systems,
especially those from irresponsible companies.
First, I think you need to change EXCLLIBR to DATASET:
LIBDEF ISPLLIB DATASET ID('MY.LOADLIB1',MY.LOADLIB2')
if you use EXCLLIBR, the search for ISPF program and
command load modules will only consider the ISPLLIB
dataset(s), ignoring any user and ISPF system libraries
Although the Link Pack Area and Linklist data sets
will still be searched for programs invoked dynamically
by these programs (and the ISPLLIB will not be searched)
[the last phrase is the telling one]
So, code DATASET instead of EXCLLIBR in your case.
[The above is discussed in our five day course
"Developing Dialog Manager Applications in z/OS"; see
http://www.trainersfriend.com/TSO_Clist_REXX_Dialog_Mgr/a810descrpt.htm ]
As far as the alternative calling schemes:
ADDRESS LINK
- pass zero or one parm string
- called program receives a pointer to
a pair of pointers: 1) pointer to a pointer
to the parm string and 2) pointer to a fullword
binary containing the length of the parm string
- called program cannot update the value in parm string
- called program is at the same task level as the caller
ADDRESS ATTACH
- pass zero or one parm string
- called program receives a pointer to
a pair of pointers: 1) pointer to a pointer
to the parm string and 2) pointer to a fullword
binary containing the length of the parm string
- called program cannot update the value in parm string
- called program is at a lower task level than the caller
ADDRESS LINKMVS
- pass variable number of parm strings
- called program receives a pointer to
a table of pointers, each pointing to
a halfword prefixed string
- called program can update the value in any
of the parm strings, including the length
- called program is at the same task level as the caller
ADDRESS ATTCHMVS
- pass variable number of parm strings
- called program receives a pointer to
a table of pointers, each pointing to
a halfword prefixed string
- called program can update the value in any
of the parm strings, including the length
- called program is at a lower task level than the caller
ADDRESS LINKPGM
- pass variable number of parm strings
- called program receives a pointer to
a table of pointers, each pointing to
a string (you must know the length of each parm)
- called program can update the value in any
of the parm strings, but cannot change lengths
- called program is at the same task level as the caller
ADDRESS ATTCHPGM
- pass variable number of parm strings
- called program receives a pointer to
a table of pointers, each pointing to
a string (you must know the length of each parm)
- called program can update the value in any
of the parm strings, but cannot change lengths
- called program is at a lower task level than the caller
[The above is discussed in our two day course
"Introduction to TSO and REXX APIs"; see
http://www.trainersfriend.com/TSO_Clist_REXX_Dialog_Mgr/a780descrpt.htm ]
--
Kind regards,
-Steve Comstock
The Trainer's Friend, Inc.
303-393-8716
http://www.trainersfriend.com
* z/OS application programmer training
+ Instructor-led on-site classroom based classes
+ Course materials licensing
+ Remote contact training
+ Roadshows
+ Course development
--------------------------------------------------
From: "Donald Johnson" <dej...@GMAIL.COM>
Sent: Monday, April 12, 2010 5:35 PM
To: <TSO-...@VM.MARIST.EDU>
Subject: [TSO-REXX] Calling programs with loadlib concatenation