What the OP needs is a PL/I routine that creates some control blocks and calls 
REXX, and a second routine that is called by REXX and has access to the control 
blocks created by the first. I don't kno whther the OP requires that the two 
routines be running in the same LE context.


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3

________________________________________
From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
Dave Jones [d...@vsoft-software.com]
Sent: Sunday, March 20, 2022 7:13 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: looking for 'how to' developing Rexx host command

>From my notes:
Re: Calling PL/I from Rexx

    Yes, that should work.

    I would add NOEXECOPS to the main's options, to avoid the need for the
    leading '/', as the '/' tends to get forgotten.

    My personal preference is to specify:
    *PROCESS SYSTEM (TSO);
    PLIMOD: PROC (CPPLPTR)
    OPTIONS (MAIN REENTRANT) REORDER;

    DCL CPPLPTR PTR,
    1 CPPL BASED (CPPLPTR),
    3 CPPLCBUF PTR, /* MAPPED BY CBUF BELOW */
    3 CPPLUPT PTR, /* MAPPING: SEE SYS1.MACLIB(IKJUPT) */
    3 CPPLPSCB PTR, /* MAPPING: SEE SYS1.MACLIB(IKJPSCB) */
    3 CPPLECT PTR; /* MAPPING: SEE SYS1.MACLIB(IKECPT) */

    DCL 1 CBUF BASED (CPPL.CPPLCBUF),
    3 CBUFLEN FIXED BIN (15),
    3 CBUFOFFS FIXED BIN (15),
    3 CBUFCMD CHAR (32767); /* ACTUAL LENGTH IS CBUFLEN - 4 */

    DCL PARM CHAR (CBUF.CBUFLEN - CBUF.CBUFOFFS - 4) VAR
    INIT ((SUBSTR (CBUF.CBUFCMD, CBUF.CBUFOFFS + 1,
    CBUF.CBUFLEN - CBUF.CBUFOFFS - 4)));

    so as to be able to write a TSO command processor.

    In the above code, I've also included the declaration for PARM that will
    give you the same effect as on your example, but without the 100 character
    limit.

Good luck.
DJ

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

Reply via email to