Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Calling LE program from REXX

15 views
Skip to first unread message

Sam Baugh

unread,
Aug 19, 2004, 3:29:24 PM8/19/04
to
I am trying to call an LE environment program "CEEDAYS" from REXX and
get and 0C4 no matter what I try. I can do this by calling a COBOL
program that calls the routine, but would rather call this directly from
REXX. I believe my parameters are defined correctly and have tried
passing the data at maximum variable string lengths (256) also. I
apologize if this has been covered in the list before. I'm new to this
list and was not able to get the search to work. Thanks!



My REXX program is coded as follows:



p_dt_in = '0028'x || 'January 1, 2005 ' /* 40
char, variable length */

p_ft_in = '0028'x || 'Mmmmmmmmm ZD, YYYY ' /* 40
char, variable length */

lilian = '00000000'x /*
binary value returned */

fc = '00000000'x || ' ' || '00000000'x /*
feedback code */

address LINKPGM "CEEDAYS p_dt_in p_ft_in lilian fc"




-----------------------------------------
The information in this communication, including any attachments, is intended only for the person or entity to which it is addressed and may contain confidential, proprietary, and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all computers.


----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LIST...@VM.MARIST.EDU with the message: INFO TSO-REXX

Ryerse, Robin

unread,
Aug 19, 2004, 4:07:12 PM8/19/04
to
not sure about CEEDAYS, but you probably have to ensure "halfword" values
as in:

p_dt_in = left('28'x,2,'00'x)

Stephen E. Bacher

unread,
Aug 19, 2004, 6:08:49 PM8/19/04
to
Sam Baugh wrote:

>I am trying to call an LE environment program "CEEDAYS" from REXX and
>get and 0C4 no matter what I try. I can do this by calling a COBOL
>program that calls the routine, but would rather call this directly from
>REXX. I believe my parameters are defined correctly and have tried
>passing the data at maximum variable string lengths (256) also. I
>apologize if this has been covered in the list before. I'm new to this
>list and was not able to get the search to work. Thanks!
>
>
>
>My REXX program is coded as follows:
>
>
>
>p_dt_in = '0028'x || 'January 1, 2005 ' /* 40
>char, variable length */
>
>p_ft_in = '0028'x || 'Mmmmmmmmm ZD, YYYY ' /* 40
>char, variable length */
>
>lilian = '00000000'x /*
>binary value returned */
>
>fc = '00000000'x || ' ' || '00000000'x /*
>feedback code */
>
>address LINKPGM "CEEDAYS p_dt_in p_ft_in lilian fc"

It looks to me like you are trying to use CEEDAYS to return
values into your REXX exec. That means essentially providing
data areas for CEEDAYS to store these values. You can't do
that by passing a parameter list from REXX; those parameters
have to be considered as read-only data.

There's no way I can think of to pass, say, the address of the storage
location of a REXX variable. Perhaps you can identify some updatable
storage in your region and pass the address of that. (I used to play
tricks like that with CLISTs of subcommands of TSO TEST, storing
values into fields in the TSO ECT.) But that's playing with fire.

- seb

Steve Comstock

unread,
Aug 19, 2004, 6:32:27 PM8/19/04
to
In a message dated 8/19/2004 2:10:07 PM Mountain Daylight Time,
Sam....@MOTION-IND.COM writes:

> I am trying to call an LE environment program "CEEDAYS" from REXX and
> get and 0C4 no matter what I try. I can do this by calling a COBOL
> program that calls the routine, but would rather call this directly from
> REXX. I believe my parameters are defined correctly and have tried
> passing the data at maximum variable string lengths (256) also. I
> apologize if this has been covered in the list before. I'm new to this
> list and was not able to get the search to work. Thanks!
>
>
>
>

There is no connection between REXX and LE. The REXX developers have,
apparently, been invited to participate in LE but have chosen not to. You can't call
LE services from REXX since the LE environment is not established under REXX.

Kind regards,

-Steve Comstock

Bob Hamilton

unread,
Aug 20, 2004, 6:51:50 AM8/20/04
to
What kinds of processing are you looking for that aren't
provided by REXX?

bob h

Jeremy C B Nicoll

unread,
Aug 20, 2004, 8:33:16 AM8/20/04
to
In article <200408192208...@support1.draper.com>,

Stephen E. Bacher <s...@DRAPER.COM> wrote:

> >address LINKPGM "CEEDAYS p_dt_in p_ft_in lilian fc"

> It looks to me like you are trying to use CEEDAYS to return values
> into your REXX exec. That means essentially providing data areas for
> CEEDAYS to store these values. You can't do that by passing a
> parameter list from REXX; those parameters have to be considered as
> read-only data.

> There's no way I can think of to pass, say, the address of the storage
> location of a REXX variable.

Yes there is - that's exactly what the OP is doing. When he defines a
variables as - say -

p_dt_in = '0028'x || 'January 1, 2005 '

he's set up an area 40 bytes long (at least the comment said that) and
given it a name. When he says

address linkpgm "CEEDAYS p_dt_in p_ft_in lilian fc"

the linkpgm interface builds a parameter list that contains the
addresses of the four named variables, and then links to the named
program. IF the named program want to return a value it can in theory
write that value into any of the locations whose addresses have been
passed. Maybe this doesn't work with LE routines, but it certainly
does in general.

One problem here might be that although the call sets up a 40-byt
buffer, the program might be writing more than 40 bytes back.

--
Jeremy C B Nicoll - my opinions are my own.

0 new messages