On Mon, 22 Mar 2021 19:41:10 +0000, Jeremy Nicoll wrote: >On Mon, 22 Mar 2021, at 19:27, Rich Tabor wrote: > > LINKAGE SECTION. > 01 FLD1 PIC X(08). > 01 FLD2 PIC X(08). > 01 FLD3 PIC X(20). > ... > /* 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" > > >The logic inside support for "linkpgm" knows that the first value it >receives is the program name, not a variable containing it, and the >other values are the name of variables. Linkpgm will )in this case) >build the parm list with three parm addresses in it. > The lengths don't match. Is this an invitation to buffer overflow? Is it simply incumbent on the programmer to ensure that the actual parameters are no shorter than the formal parameters?
I assume the names don't matter; only the addresses. I'm not a COBOL programmer. GIYF -- I found: http://www.simotime.com/cblpar01.htm ***************************************************************** LINKAGE SECTION. 01 PARM-BUFFER. 05 PARM-LENGTH pic S9(4) comp. 05 PARM-DATA pic X(256). ***************************************************************** With declarations of that form, would it work to use ADDRESS LINKMVS rather than LINKPGM? -- gil ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN