Example of calling applications in a command procedure

As an alternative to foreground or batch calls to an application, you can run a TSO or batch application by using a command procedure (CLIST).

The following CLIST calls a DB2® application program named MYPROG. ssid represents the DB2 subsystem name, or group attachment or subgroup attachment name.

PROC 0                        /* INVOCATION OF DSN FROM A CLIST      */
  DSN SYSTEM(ssid)            /* INVOKE DB2 SUBSYSTEM ssid           */
  IF &LASTCC = 0 THEN         /* BE SURE DSN COMMAND WAS SUCCESSFUL  */
    DO                        /* IF SO THEN DO DSN RUN SUBCOMMAND    */
      DATA                    /* ELSE OMIT THE FOLLOWING:            */
        RUN PROGRAM(MYPROG)
        END
      ENDDATA                 /* THE RUN AND THE END ARE FOR DSN     */
    END
EXIT

IMS™: To run a message-driven program

First, ensure that you can respond to the program's interactive requests for data and that you can recognize the expected results. Then, enter the transaction code that is associated with the program. Users of the transaction code must be authorized to run the program.

To run a non-message-driven program

CICS®To run a program

First, ensure that the corresponding entries in the SNT and RACF® control areas allow run authorization for your application. The system administrator is responsible for these functions.

Submit the job control statements that are needed to run the program.

Also, be sure to define to CICS the transaction code that is assigned to your program and the program itself.

Make a new copy of the program

Issue the NEWCOPY command if CICS has not been reinitialized since the program was last bound and compiled.