LOAD

Loads an application table or map set from a disk directory into shared main storage. For TXSeries for Multiplatforms regions, programs cannot be loaded by use of the LOAD command. If an application program issues a LOAD command for another program, the request is ignored. If the command includes the SET option or ENTRY option, the value that is returned in each case is a null pointer.

Syntax

LOAD

Read syntax diagramSkip visual syntax diagramLOADPROGRAM( name)SET( ptr-ref)LENGTH( data-area)FLENGTH( data-area)ENTRY( ptr-ref)HOLD

Conditions: NOTAUTH, PGMIDERR

 

Description

LOAD fetches an application table or map set, if no copy is in storage, from the disk directory where it resides and loads it into shared main storage. If a copy of the resource is already resident in storage, a pointer to this copy is returned if the command includes the SET option. This facility is used to load an application table (to which control is not to be passed), or to load a map set that is to be used in a mapping operation.

If you omit HOLD, the table or map set remains in main storage only until the task that issued the load terminates or issues a RELEASE command.

For further details about map sets, see Coding BMS map sets using BMS macros.

The following example shows how to load a user-prepared table called TB1:
EXEC CICS LOAD PROGRAM('TB1') SET(PTR)

Options

ENTRY(ptr-ref)
Specifies a pointer reference that is to be set to the address of the entry point in the application table or map set that has been loaded.

If the LOAD command specifies a program, TXSeries for Multiplatforms returns a null pointer for the ENTRY option. Note that this option is provided for portability.

FLENGTH(data-area)
Specifies a 32-bit binary field that is to receive the length of the loaded application table or map set. This option must be used if the length of the loaded application table or map set is greater than 32767 bytes.
HOLD
Specifies that the loaded application table or maps et is not to be removed from main storage when the task that is issuing the LOAD command terminates; deletion is to occur only in response to a RELEASE command, from this task or from another task.
LENGTH(data-area)
Specifies a 16-bit binary field that is to receive the length of the loaded application table or map set. Use the FLENGTH option instead if the length of the loaded application table or map set is likely to exceed 32767 bytes. See LENGTH for more information about using this option.
PROGRAM(name)
Specifies the name of the application table or map set that is to be loaded. The name can consist of up to eight alphanumeric characters, and must be defined appropriately in the Program Definitions (PD).
SET(ptr-ref)
Specifies a pointer reference that is to be set to the address at which the application table or map set is loaded. For more information about using this option, see INTO and SET.

If the LOAD command specifies a program, CICS® returns a null pointer for the SET option.

Conditions

LENGERROR
Occurs if the LENGTH parameter exceeds 32 KB in size.

Default action: Terminates the task abnormally.

NOTAUTH
Occurs if a resource security check has failed on PROGRAM(name).

Default action: Terminates the task abnormally.

PGMIDERR
Occurs in any of the following conditions:
  • The application table or map set has no entry in the Program Definitions (PD) (RESP2=1).
  • The application table or map set is disabled (RESP2=2).
  • A request has been made to load a program, not a table or a map set (RESP2=3).

Default action: Terminates the task abnormally.