Dave Odom wrote:
> I'm trying to pass some indicator actions, in this case F3 and F12,
> from an RPG program which has been called by a CL program, back to the
> CL program so I can take appropriate action there.  What's the
> appropriate code in both environments?   Inside the CL program I'm doing
> the following:
> PGM        PARM(&USER)
> DCL        VAR(&USER) TYPE(*CHAR) LEN(10)
> DCL        VAR(&RTNCDE) TYPE(*CHAR) LEN(1)   */
> DCL        VAR(&RTNCD) TYPE(*DEC) LEN(5 0)   */
> DCL        VAR(&RECS) TYPE(*DEC) LEN(10 0)
> DCL        VAR(&INKC)     TYPE(*LGL)  LEN(1)
> DCL        VAR(&INKL)     TYPE(*LGL)  LEN(1)
>             Other logic
> IF         COND(&INKL) THEN(DO)
>               the rest of the program

The RPG program would receive two parameters, defined as either 1-byte
character or indicator.  If you want the CL program to get the values of
the RPG *IN03 and *IN10, then your RPG code should assign *in03 to parm1
and *in12 to parm2 before it returns.  (Or maybe *INKC and *INKL)

Something like this: 

c *entry plist
c        parm        parm1     1
c        parm        parm2     1
c        eval    parm1 = *in03
c        eval    parm2 = *in12
c        return

And if you want the RPG program to use the input values of the parms for
its indicators, code something like this at the beginning of the

c        eval    *in03 = parm1
c        eval    *in12 = parm2

Or you could code the parm opcodes like this, and skip the assignments:
c *entry plist
c *in03  parm *in03  parm1     1
c *in12  parm *in12  parm1     1

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.