The LOAD Command is used to load a program or table which is independently compiled or assembled & link-edited and registered in PPT.
This command is useful for loading a table or application program dynamically. That is, as an application, a table can be coded in Assembler, assembled and link-edited. Then COBOL program can load it as a table.
EXEC CICS LOAD PROGRAM(Program Name) SET(Pointer Reference) LENGTH(Data Area Length) ENTRY(Pointer Reference) HOLD END-EXEC. |
Program to be loaded into CICS address space
Pointer reference to the address of Table/Program/Map
S9(4) COMP. Length of module (if length < 32 k)
Module resident in memory even when task terminates
EXEC CICS LOAD PROGRAM(PGM1) SET(ADDRESS OF LK-ITEM) LENGTH(WS-LENGTH) END-EXEC. |
Program PGM1 is loaded and the address of the program or table is mapped to LK-ITEM and so the table can be accessed using the linkage are LK-ITEM. The size of the linkage item is WS-LENGTH.
If ‘HOLD’ keyword is coded in the LOAD command, then loaded program or table will be permanently resident until explicitly released. If it is not mentioned, then termination of the task release the program or table.
We will see CICS RELEASE control command in next chapter...
PGMIDERR - Program not found
LENGERR - Load module > 32 K
NOAUTH - Security check error
If you have any doubts or queries related to this chapter, get them clarified from our Mainframe experts on ibmmainframer Community!