There are three different ways to run an IMS batch program. These are:
The way that the program is run and the JCL that you need to provide to run the program in batch depend on which of these three methods that you plan to use to run your program.
Running an IMS batch program as a DLI is the simplest and least efficient way of running the program.
To be able to run a program this way your database administrator must first create the DBD and run a DDGEN and you (or your database administrator) must create the PSB descriptions and run a PSBGEN. This will create the files that you need to reference via the DBDLIB and PSBLIB statements in your JCL. You must also include the statements in your JCL to reference the necessary databases.
The actual program that you include to be run in your JCL is DFSRRC00 and this is run with a series of parameters, the first parameter is DLI, the second is the name of the IMS batch program, and the third is the name of the PSB that your program is to use.
If you are running an online IMS environment then the databases that your program references will need to be stopped in order for the program to run.
Running a program as a DBB instead of as a DLI involves only a couple of additional steps. After running the DBDGEN and PSBGEN you (or your database administrator) needs to run an ACBGEN. You then substitute DBB for DLI in the first parameter passed to the program and substitute an ACBLIB statement for the DBDLIB and PSBLIB statements.
The program will run slightly faster this way than as a DLI because the program is being given the ACB rather than having to build it for itself.
If you are running MPP regions on your system in order to run IMS online programs then you can save yourself from having to shut down your databases before accessing them from batch programs by running those batch programs as BMPs.
In this instance you specify BMP in the first parameter and supply the ACBLIB statement but you do not reference the databases in the JCL. The program will run in an MPP region assigned to batch programs and will have access to all of the databases that are attached to your online environment from there.
This short glossary will help you understand some of the IMS terminology used above.
This article written by Stephen Chapman, Felgall Pty Ltd.