Previous Topic: PL/I ConsiderationsNext Topic: Using the Online Debugger with PL/I


Transferring Control

:p In order to pass parameters in a LINK or XCTL statement, you must include the following PL/I declarative in your program:

DECLARE IDMSP ENTRY;

If you pass parameters to a PL/I program from a non-PL/I program (CA ADS dialog, or a COBOL or Assembler program), you must include special parameters in order to establish addressability to the passed data.

The program excerpt below shows the extra code necessary to transfer from a non-PL/I program to a PL/I program.

The parameters F1, F2, and F3 provide the addresses on which to base the structures that are passed.

TESTPROC: PROCEDURE (F1,F2,F3) OPTIONS (MAIN,REENTRANT);
DCL  (EMPSS01T SUBSCHEMA, EMPSCHEM SCHEMA) MODE (IDMS_DC) DEBUG;
DCL  IDMS ENTRY OPTIONS (INTER,ASM);
DCL  IDMSP ENTRY;
DCL  ADDR BUILTIN;
DCL  (F1,F2,F3) FIXED;
DCL  PASSED_FIELD_1 FIXED BIN(31) BASED (ADDR(F1));
INCLUDE IDMS (SUBSCHEMA_CTRL BASED (ADDR(F2)));
INCLUDE IDMS (RECORD_AA BASED (ADDR(F3)));
 .
 .
 .

For more information on passing parameters to a PL/I program from an Assembler program, see CA IDMS DML Reference Guide for PL/I.