Writing procedures that can run unattended
In QMF batch mode, you can run both linear procedures and procedures with logic while you perform other work on your system.
You can run procedures in batch mode at any time, and you do not have to interact with QMF while the procedure is running. ISPF is required to use the QMF BATCH application. ISPF is not available in CICS®.
To run a procedure in batch mode, first create and save the procedure, just as you would to run it interactively. Then use the QMF batch application, which simplifies batch processing. The application prepares and submits the batch job from information that you enter on the BATCH Command Prompt panel. You only need to know the name of the procedure and a few details about the batch machine on your system. However, it still might be necessary to tailor the application to your needs.
If you are using QMF for TSO, you can also run the procedure using the QMF stored procedure interface. This interface allows any software program that can call a stored procedure to start QMF as a Db2® for z/OS® stored procedure and run a QMF query or procedure. The procedure that is passed to the interface can also start a batch job, which allows any Db2 client that can issue a CALL statement to access QMF for TSO batch services. If you run a procedure, commands that display panels or require user interaction are not allowed.
The following terms are used in these guidelines for writing a procedure that will be used in batch mode, start a batch job through the stored procedure interface, or will be run through the QMF stored procedure interface.
- The main procedure is the procedure that is identified on the CALL statement or the ISPSTART command.
- A subordinate procedure is any procedure that is called directly from the main procedure or from another subordinate procedure.