Invoking a single SQL program through ISPF and DSN

When you invoke a single SQL program through ISPF and DSN, you should first invoke ISPF, which displays the data and selection panels. When you select the program on the selection panel, ISPF calls a CLIST that runs the program.

About this task

A corresponding CLIST might contain:
DSN
    RUN PROGRAM(MYPROG) PLAN(MYPLAN)
END
The application has one large load module and one plan.
Disadvantages: For large programs of this type, you want a more modular design, making the plan more flexible and easier to maintain. If you have one large plan, you must rebind the entire plan whenever you change a module that includes SQL statements. To achieve a more modular construction when all parts of the program use SQL, consider using packages. See Preparing an application to run on Db2 for z/OS. You cannot pass control to another load module that makes SQL calls by using ISPLINK; rather, you must use LINK, XCTL, or LOAD and BALR.
If you want to use ISPLINK, then call ISPF to run under DSN:
DSN
    RUN PROGRAM(ISPF) PLAN(MYPLAN)
END
You then need to leave ISPF before you can start your application.

Furthermore, the entire program is dependent on Db2; if Db2 is not running, no part of the program can begin or continue to run.