Working with IMS programs
Z Understand supports IMS transactions that is applicable for COBOL only with some limitations.
Limitations for Z Understand of IMS transactions
- IMS transactions can be displayed in the closure graph, but the IMS database cannot be shown.
- Identifying key conditions and slicing on programs that are part of IMS transactions work the same way as they do for CICS® transactions.
- Check
LINKAGE SECTIONfor additional limitations.
Steps after you refactor a COBOL program
-
Make a copy of the PSB file that is used by the main program and update the PSBNAME attribute with the name of your newly refactored program. For example, if the new program is called
NEWPGM.cbl, name the new PSB file asNEWPGM.psband set PSBNAME=NEWPGM inside the PSB file.If you are using VS Code extension, Z Understand attempts to download the PSB/DBD files and does the renaming step. However, if Z Understand cannot find the file, you still must manually download the file and rename it. Z Understand uses the settings that are shown in the image here to download PSB/DBD files.
Using the default values for PSB as an example, Z Understand attempts to search and download the corresponding PSB file for a program
PROG1234.cbl
from Z Understand, in the following order:../PSB/PROG1234.asm
../PSB/PROG1234.psb
./PROG1234.asm
./PROG1234.psbThese file paths are relative to the program's location.
File download only happens when generating the COBOL service program, and there's some code block that contains IMS CALL
CBLTDLI
statements. The files are placed into the workspace under specific directories.Z Understand retrieves multiple PSB files for the original IMS program, but it only performs the renaming steps on the first file. Users must merge the contents of all the files into the first one to ensure a single PSB file corresponds to the generated program.Note: Regardless of a file's original file extension, Z Understand always saves the downloaded files with.asm
extension.For more information, see the following help links: - You can modify any additional requirements to the new PSB file. For example, remove any PCBs not used in the newly refactored program, and ensure the order of the PCBs aligns with the order declared in the program.
- Inspect the
LINKAGE SECTIONof the newly refactored program to verify if all the variables that are specified in the IMS call statements are available, if not, move them from theWORKING-STORAGE SECTIONto theLINKAGE SECTION, and update thePROCEDURE DIVISIONaccordingly. For example, if theLTERMPCBrecord structure name is used in a CALL to IMS Transaction Manager (TM), then the record must be available in theLINKAGE SECTIONof the refactored program, and the refactored program is a sub-program that can be invoked. ThePROCEDURE DIVISIONstatement must be updated by specifying the record as part of theUSINGclause, for example,PROCEDURE DIVISION USING LTERMPCB. - Inspect the
PROCEDURE DIVISIONof the newly refactored program. If you find multiple ENTRY statements that are generated, you must edit them into a single statement.Note: There might be multiple ENTRY statements because it is possible to bring in code blocks that originate from different IMS programs. Hence, those programs have ENTRY statements that Z Understand will bring into the generated code.