LOAD

Restriction: This topic applies to Windows environments only.

[label] LOAD EP=program-name|EPLOC=program-address|DE=list-entry-addr

[,DCB=dcb-addr]

[,ERRET=err-rtn-addr]

[,LSEARCH=NO|YES]

[,LOADPT=addr]

[,RELATED=value]

Parameters

EP= program-name
Name of the program to be loaded, up to a maximum of eight characters. A file extension is not required; the LOAD routine first attempts to load a file with the extension .390 and then a file with the extension .mod. If it fails to find either, it generates a stub Assembler program that loads and links to a COBOL program called program-name.
EPLOC= program-address
Name of the data element that contains the address of the program name.
ERRET=err-rtn-addr
The address of an exit to receive control when an error condition is detected. err-rtn-addr is an A-type address or register (2) through (12).
LOADPT=addr
The starting address at which the program was loaded. addr is an A-type address or register (2) through (12).

Comments

Loads the specified program into memory.

Assembler LOADs:

The LOAD macro loads the program in memory above or below the line depending on its RMODE setting. At the completion of the LOAD, register 15 has a binary value of zero, register 0 has the address of where the program was loaded, register 1 contains the length of the program, and the high order bit of register 0 is set to indicate the AMODE setting of the loaded program, as follows:

0=AMODE(24)

1=AMODE(31)

COBOL LOADs:

The LOAD macro loads the stub Assembler program below the line. When the stub Assembler program is executed, it loads the COBOL program above or below the line depending on its AMODE setting; a COBOL program's Working-Storage Section may be loaded separately if the program's DATA directive does not match its AMODE directive. If an AMODE(31) Assembler program LOADs an AMODE(24) COBOL program, then an 0C5 abend occurs at the time the stub code is executed, since the 31-bit Assembler parameter addresses cannot be successfully passed to the 24-bit COBOL program.

DOS/VSE compatibility:

If the VSECOMP compiler directive is specified, Enterprise Developer Assembler support includes emulating the DOS/VSE version of this macro. In this case the first positional parameter is the name of a program to load (the EP keyword is not required). At the completion of the LOAD, register 1 has the address of where the program was loaded, with the high order bit set to indicate the AMODE setting of the loaded program.

Examples

LOAD EP=MYPROG

LOAD  EPLOC=PNAME
    PNAME    DC    CL8'MYPROG'