I have no idea what you are really ultimately trying to do, but the following
POC worked for me in batch:
IDENTIFICATION DIVISION
PROGRAM-ID. TST01.
ENVIRONMENT DIVISION.
DATA DIVISION.
LINKAGE SECTION.
01 FLD1 PIC X(08).
01 FLD2 PIC X(08).
01 FLD3 PIC X(20).
PROCEDURE DIVISION USING FLD1 FLD2 FLD3.
MOVE ALL '1' TO FLD1
MOVE ALL '2' TO FLD2
MOVE ALL '3' TO FLD3
GOBACK.
/* REXX */
CBLPGM = 'TST01'
FLD1 = SUBSTR('AAAAAAAAAAAAAAAA',1,80)
FLD2 = SUBSTR('BBBBBBBBBBBBBBBB',1,80)
FLD3 = SUBSTR('CCCCCCCCCCCCCCCC',1,80)
SAY 'FLD1 =' FLD1
SAY 'FLD2 =' FLD2
SAY 'FLD3 =' FLD3
ADDRESS LINKPGM CBLPGM "FLD1 FLD2 FLD3"
SAY 'FLD1 =' FLD1
SAY 'FLD2 =' FLD2
SAY 'FLD3 =' FLD3
EXIT
-----Original Message-----
From: IBM Mainframe Discussion List <[email protected]> On Behalf Of
Cameron Conacher
Sent: Monday, March 22, 2021 11:53 AM
To: [email protected]
Subject: Re: [IBM-MAIN] Can I use a REXX PLIST when calling a COBOL program?
Paul,
when you say that my COBOL program must be coded Rexx-aware, do you mean I need
to work with IRXEXCOM to tease the parameters out from REXX?
I appreciate everyone's input.
I don't know if the "appropriate" path forward is to use ADDRESS LINK or
ADDRESS LINKMVS or if I should continue to try to make the CALL work.
I don't want to waste anyone's time (other than my own).
I will keep playing around to see if I can figure this out.
On Mon, Mar 22, 2021 at 2:09 PM Paul Gilmartin <
[email protected]> wrote:
> On Mon, 22 Mar 2021 17:50:00 +0000, Seymour J Metz wrote:
>
> >You are using CALL, which is intended for REXX procedures and
> >REXX-aware
> procedure that are written to accept an external function parameter
> list (EFPL).
> >
> Which may be OK if REXXEXCI is coded Rexx-aware and reformats it
> argument as required by EXCI.
>
> > ... Use ADDRESS LINK or ADDRESS LINKMVS to call a main program and
> ADDRESS LINKPGM to call a subroutine. Note that if the subroutine is
> written in COBOL then you also have the issue of LE to deal with.
> >
> LINKMVS generates a 2-byte length à la JCL "PARM=". LINKPGM , like
> Assembler CALL, requires the programmer to supply the length
> ("d2c(length( PARM ), 2) || PARM") but can be used for subroutines not
> expecting such a length.
>
> -- gil
>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions, send
> email to [email protected] with the message: INFO IBM-MAIN
>
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send email to
[email protected] with the message: INFO IBM-MAIN
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN