Re: Sv: Execute Rexx from Cobol

2024-05-07 Thread Glenn Knickerbocker
On Tue, 7 May 2024 18:27:08 +, Lars Höglund  wrote:
>We had a program called JOBINFO (in allocated STEPLIB)
>Didn't realize that jobinfo = jobinfo() in a Rexx will trying to start, and 
>maybe executing the cobolmodule
>We also have a Rexx called jobinfo, and that the one I want to execute.

Oh!  Here's what I didn't know about the REXX function/subroutine search order 
on TSO until just now:

https://www.ibm.com/docs/en/zos/3.1.0?topic=subroutines-search-order
>If a match to the function name is not found, the function search order flag 
>(FUNCSOFL) is checked. The FUNCSOFL flag (see Flags and corresponding masks) 
>indicates whether load libraries are searched before the search for a REXX 
>exec.
>
>If the flag is off, check the load libraries. If a match to the function name 
>is not found, search for a REXX program.
>
>If the flag is on, search for a REXX program. If a match to the function name 
>is not found, check the load libraries.
>
>By default, the FUNCSOFL flag is off, which means that load libraries are 
>searched before the search for a REXX exec.

¬R

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Sv: Execute Rexx from Cobol

2024-05-07 Thread Willy Jensen
You found the solution, fine. Fyi, I recently wrote a assembler subroutine, it 
can be called from COBOL, C, PL/I and probably other, to access REXX variables 
and the TSO stack, and it can also start a REXX. It is available on request.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Sv: Execute Rexx from Cobol

2024-05-07 Thread Lars Höglund
Seems that problem solved.

We had a program called JOBINFO (in allocated STEPLIB)
Didn't realize that jobinfo = jobinfo() in a Rexx will trying to start, and 
maybe executing the cobolmodule
We also have a Rexx called jobinfo, and that the one I want to execute.
//Lasse

-Ursprungligt meddelande-
Från: IBM Mainframe Discussion List  För Glenn 
Knickerbocker
Skickat: den 7 maj 2024 17:36
Till: IBM-MAIN@LISTSERV.UA.EDU
Ämne: Re: Execute Rexx from Cobol

On Tue, 7 May 2024 11:33:21 +, Lars Höglund  wrote:
> An error has occurred in Rexx module: XMAIL
> Error Type: SYNTAX
> Error Line Number : 299
>   Instruction   :   jobinfo = JOBINFO()
>   Return Code   : 44
>   Error Message text: Function did not return data

So, the error here is pure REXX and has nothing to do with the COBOL caller 
(except that maybe it didn't provide something in the argument that XMAIL 
expected, or didn't set up something in the environment that JOBINFO was 
looking for).

XMAIL called JOBINFO as a function, and JOBINFO didn't return data--not even a 
null value.  The main routine of JOBINFO must have an EXIT or RETURN 
instruction somewhere with no expression specified on it, or it reached the end 
of the exec without executing a RETURN or EXIT instruction at all.

¬R

--
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
lists...@listserv.ua.edu with the message: INFO IBM-MAIN

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Sv: Execute Rexx from Cobol

2024-05-07 Thread Lars Höglund
I'll try that, but the problem for me is that my rexx is executing but stops 
(with error) when that rexx is trying to execute another rexx

-Ursprungligt meddelande-
Från: IBM Mainframe Discussion List  För Sri Hari 
Kolusu
Skickat: den 7 maj 2024 14:49
Till: IBM-MAIN@LISTSERV.UA.EDU
Ämne: Re: Execute Rexx from Cobol

Lasse,

Try the example listed here.

https://www.ibm.com/docs/en/zos/2.4.0?topic=service-cobol

Thanks,
Kolusu

--
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
lists...@listserv.ua.edu with the message: INFO IBM-MAIN

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN