----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LIST...@VM.MARIST.EDU with the message: INFO TSO-REXX
p_dt_in = left('28'x,2,'00'x)
>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
> 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 h
> >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.