z/OS TSO/E REXX Reference
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Parameters

z/OS TSO/E REXX Reference
SA32-0972-00

In register 1, you pass the address of a parameter list, which consists of one address. The high-order bit of the address in the parameter list must be set to 1 to indicate the end of the parameter list. Table 1 describes the parameter for IRXJCL.

Table 1. Parameter for calling the IRXJCL routine
Parameter Number of bytes description
Parameter 1 variable A buffer, which consists of a halfword length field followed by a data field. The first two bytes of the buffer is the length field that contains the length of the data that follows. The length does not include the two bytes that specify the length itself.

The data field contains the name of the exec, followed by one or more blanks, followed by the argument (if any) to be passed to the exec. You can pass only one argument on the call.

Figure 1 shows an example PL/I program that invokes IRXJCL to run a REXX exec. Note that the example is for PL/I Version 2.
Figure 1. Example PL/I version 2 program using IRXJCL
JCLXMP1 : Procedure Options (Main);
/* Function: Call a REXX exec from a PL/I program using IRXJCL        */

  DCL IRXJCL EXTERNAL OPTIONS(RETCODE, ASSEMBLER);
  DCL 1 PARM_STRUCT,               /* Parm to be passed to IRXJCL     */
        5 PARM_LNG BIN FIXED (15), /* Length of the parameter         */
        5 PARM_STR CHAR (30);      /* String passed to IRXJCL         */
  DCL PLIRETV BUILTIN;             /* Defines the return code built-in*/
  PARM_LNG = LENGTH(PARM_STR);     /* Set the length of string        */
/*                                                                    */
  PARM_STR = 'JCLXMP2 This is an arg to exec'; /* Set string value
                                      In this case, call the exec named
                                      JCLXMP2 and pass argument:
                                      'This is an arg to exec'        */
  FETCH IRXJCL;                    /* Load the address of entry point */
  CALL IRXJCL (PARM_STRUCT);       /* Call IRXJCL to execute the REXX
                                      exec and pass the argument      */
  PUT SKIP EDIT ('Return code from IRXJCL was:', PLIRETV) (a, f(4));
                                   /* Print out the return code from
                                      exec JCLXMP2.                   */
  END ;                            /* End of program                  */

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014