Example of using the assembler CALL macro (CCNUAAT)

Figure 1. Using the assembler CALL macro
***********************************************************************
*                                                                     *
*  This assembler routine demonstrates DD Name renaming               *
*  (Dynamic compilation) using the Assembler CALL macro.              *
*                                                                     *
*  In this specific scenario, a subset of all the DDNAMES are         *
*  renamed.  This renaming is accomplished by shortening              *
*  the list of ddnames.                                               *
*                                                                     *
*  The Compiler and the Library should be either in the LPA or        *
*  specified on the STEPLIB DD in your JCL                            *
*                                                                     *
***********************************************************************
*
LINK     CSECT
         STM   14,12,12(13)
         USING LINK,15
         LA    3,MODE31
         O     3,=X'80000000'
         DC    X'0B03'
MODE31   DS    0H
         USING *,3
         LR    12,15
         ST    13,SAVE+4
         LA    15,SAVE
         ST    15,8(,13)
         LR    13,15
*
*   Invoke the compiler using CALL macro
*
         LOAD  EP=CCNDRVR
         LR    15,0
         CALL  (15),(OPTIONS,DDNAMES),VL
         L     13,4(,13)
         LM    14,12,12(13)
         SR    15,15
         BR    14
*
*   Constant and save area
*
SAVE     DC    18F'0'
OPTIONS  DC    H'2',C'SO'
*   For C++, substitute the above line with
*   OPTIONS  DC    H'6',C'CXX SO'
DDNAMES  DC    H'96'
         DC    CL8'NEWIN'
         DC    CL8'NEWLIN'
         DC    CL8'DUMMY'       PLACEHOLDER - NO LONGER USED
         DC    CL8'NEWLIB'
         DC    CL8'NEWRLIB'
         DC    CL8'NEWPRINT'
         DC    CL8'NEWCPRT'
         DC    CL8'NEWPUNCH'
         DC    CL8'NEWUT1'
         DC    CL8'NEWUT4'
         DC    CL8'NEWUT5'
         DC    CL8'NEWUT6'
         END