LOAD


LOAD is used to load application program from disk memory to main memory. Load makes a copy of an application program, table or map available to the invoking task by loading it to main memory.

An application program can’t load another application program by issuing LOAD command. Programs can’t be loaded by using LOAD command in Multi region environments.

If the copy of the program is not there in main memory, LOAD fetches the application program or map set from disk storage and loads it to the main directory.

If SET option coded with LOAD command, then it will return the pointer of the load. If the command is issued by a program that is running under a task for an application, CICS searches first for the named program in the private program directory for the application. If the named program is not found there, CICS then searches the public program directory.

Syntax -


LOAD Syntax

Parameters -


PROGRAM (program-name) -

Program name is mandatory entry in LOAD command. Program name specifies the identifier of a program, table or map to be loaded.

Program name is of 8 characters length that includes alphanumeric characters. The application program, table or map set should be defined in definition tables.

SET (ptr-ref) -

SET is an optional entry in LOAD command. SET operator specifies the address pointer reference to be set at which a program, table or map is loaded.

LENGTH(data-area) -

LENGTH is an optional entry in LOAD command. LENGTH specifies the length of the loaded program, table or map to be set.

LENGTH is a half word binary value. The program, table or map length that can be provided for the LENGTH parameter is up to 32K. If it crosses 32K, use FLENGTH parameter for LOAD command.

ENTRY(ptr-ref) -

ENTRY is an optional entry in LOAD command. ENTRY operator is used to set the address of the entry point of application program, table or map that has been loaded. If ENTRY option used in multiplatform environment, then LOAD will return a NULL pointer.

HOLD -

HOLD is an optional entry in LOAD command. HOLD specifies the loaded program, table or map should not get released even if LOAD command terminated and lasts until the RELEASE command issued.

If HOLD omitted, the program, table or map is released when the LOAD command terminated. HOLD will be used for the repetitively executing programs or map sets which reduces the loading time before execution.

FLENGTH(data-area) -

FLENGTH is an optional entry in LOAD command. FLENGTH is same as LENGTH option but used for larger programs, tables or maps which are more than 32k length. FLENGTH is a 4-byte(full word binary area) field.

Error Conditions -


Below are the list of error conditions may occur in combination. If more than one occurs, only the first is passed to the application program.

Error ConditionRESP2, Description & SolutionSystem Action
16 INVREQ
30 - The program manager domain is not yet initialized.
Solution -This might be because the load request was made in a first stage PLT. Contact the system administrator to resolve the error.
Task abnormally terminated
22 LENGERR
19 - LENGTH is used and the length of the loaded program is greater than 32 KB.
Solution -Modify the application program to change the LENGTH option to FLENGTH.
Task abnormally terminated
70 NOTAUTH
101 - A resource security check has failed on PROGRAM(program-name).
Solution -Application programmer doesn’t need to do anything. Contact system administrator team to check whether the appropriate access added for the user or group. It will resolve the problem.
Task abnormally terminated
27 PGMIDERR
1 - A program, table or map has no installed resource definition or program auto install was switched off.
Solution -Contact system administrator to make the definition installed.

2 - A program is disabled.
Solution -Contact system administrator to make the entry enabled.

3 - A program was not loaded because the load not found or load new copy not issued.
Solution -To reset the load status, the load module must be in the DFHRPL concatenation and a SET PROGRAM NEWCOPY is required.

9 - The installed program definition is for a remote program.
Solution -Remote programs can’t be loaded with LOAD command. Modify the program to include the local program name.

21 - The program auto install control program failed.
Solution -Contact system administrator to resolve the error.

22 - The model returned by the program auto install control program was not defined to CICS or was not enabled.
Solution -Contact system administrator to resolve the error.

23 - The program auto install control program returned invalid data.
Solution -Contact system administrator to resolve the error.

24 - Define for the program failed because auto install returned an invalid program name or definition.
Solution -Contact system administrator to resolve the error.
Task abnormally terminated