z/OS Language Environment Programming Reference
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


General usage notes for callable services

z/OS Language Environment Programming Reference
SA38-0683-00

  • You can invoke callable services from any Language Environment-conforming HLL except where otherwise noted.
  • You might receive feedback codes from services other than the one you are invoking. This is because the callable services invoke other callable services that might return a feedback code.
  • Callable services that are intended to be available on any platform that Language Environment supports are prefixed with CEE. Callable services defined only for S/370 are prefixed with CEE3.
  • Routines that invoke callable services do not need to be in 31-bit addressing mode. 31-bit addressing mode switching is performed implicitly without any action required by the calling routine, if you specify the ALL31(OFF) runtime option (see ALL31).

    However, if AMODE switching occurs and your program makes many calls to Language Environment callable services, the switching time can slow down your application. Run with AMODE(31), if possible, to avoid unnecessary mode switching.

  • Under Language Environment, all parms are passed by reference, indirectly. The code in Figure 1 and Figure 2 might cause unpredictable results:
    Figure 1. An invalid COBOL CALL that omits the fc parameter
    CALL CEEDATE USING X,Y,Z.  **Invalid**
    Figure 2. An invalid PL/I CALL that omits the fc parameter
    DCL CEEDATE ENTRY OPTIONS(ASM);
    CALL CEEDATE(x,y,z);      /* invalid */

    Figure 3 and Figure 4 illustrate valid calls. The COBOL examples are valid only for COBOL for MVS & VM Release 2 or later.

    Figure 3. Valid COBOL CALLs that use the optional fc parameter
    CALL CEEDATE USING X,Y,Z,OMITTED.
    CALL CEEDATE USING X,Y,Z,FC.
    Figure 4. Valid PL/I CALLs that use the optional fc parameter
    DCL CEEDATE ENTRY(*,*,*,* OPTIONAL) OPTIONS(ASM);
    CALL CEEDATE(x,y,z,*);    /* valid   */
    CALL CEEDATE(x,y,z,fc);   /* valid   */

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014