Previous Topic

Next Topic

Book Contents

Book Index

CTMBLT Example 5

The following, simplified example calls CTMBLT from another program and passes required control statements to CTMBLT. CTMBLT uses a table in memory to force the MYJOB job.

In this example, a DAINPRM DD statement was not needed to execute the JCL. Usually, situations require CTMBLT control statements to be read from an external file or dynamically constructed into a GETMAIN area within the program. Also, any output normally routed to DD name DATABERR is written to DD name ERROR.

In addition, CTMBLT returns replies from itself and from the CTMJOB utility, which is invoked to perform the job order. For a look at the format of the reply areas, see the CTMBAPO member.

Figure 24 CTMBLT – Example 5

          CALL    CTMBLT,(FOUR,0,TBLADDR,ALTDDP,RPLYP)

          LTR     R15,R15

          BNZ     error-routine

          ...

FOUR DC   H'4'                           4 PARAMETERS

TBLADDR   DC    A(INCORETB)

ALTDDP    DC    A(ALTDDL)

ALTDDL    DC    CL8' '

          DC    CL8' '

          DC    CL8' '

          DC    CL8'ERROR'

*

RPLYP     DS    6A                       (see CTMBAPI details)

          DC    A(RPLYAREA)              BAPIRPLS

          DC    A(RPLYAREA+(10*64)-1)    BAPIRPLE

          DS    F                        BAPIRPL#

          DS    A

          DS    26C

          DS    H                        BAPIRSN

          DS    H                        BAPIURC

          DS    XLn                      (n=remaining length)

RPLYAREA  DS    10CL64              (see CTMBAPO for details) Room for 10 replies

*

INCORETB  DS    0CL80  TABLE OF CTMBLT CARD-IMAGE CONTROL STMTS

          DC    CL80’LIBRARY=*INCORE* ‘

          DC    CL80’MEM-OVERWRITE=FORCE ‘

          DC    CL80’TABLE=MYTABLE ‘

          DC    CL80’MEMLIB=GENERAL ‘

          DC    CL80’MEMNAME=MYJOB ‘

          DC    CL80’END ‘   (a linecount parameter is not necessary)

Parent Topic

Examples for CTMBLT