Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

@LOAD - Load program

&pagelevel(3)&pagelevel

The @LOAD statement terminates the EDT session and loads the specified program.

Operation

Operands

F mode, L mode

@LOAD

string

string

String specifying the name of the program that is to be loaded. The system
expects the name of a BS2000 file which contains the program that is to be
loaded. It is not possible to specify a library element.

The @LOAD statement is one of the EDT statements with security implications (see also section “Access protection”). The statement is rejected in uninterruptible system procedures in interactive mode and on input from a file (read with RDATA from SYSDTA not equal to SYSCMD, execution of a start procedure).

The @LOAD statement always causes EDT to be terminated irrespective of whether the specified program file exists or contains a valid program.

As far as the handling of unsaved files and the related security queries is concerned, @LOAD acts in the same way as the @HALT statement (see section “Terminating an EDT session”). Since EDT is always terminated, save queries may, unlike in the case of @HALT, also be issued if the statement was entered in the screen dialog (started with @DIALOG).

If EDT was loaded as a subroutine and the EDT screen dialog has been activated with @DIALOG, the @LOAD statement does not result in the continuation of the user program. Instead, the user program is also unloaded.

It is therefore possible to prohibit users from issuing the @LOAD statement when EDT is called as a subroutine. In this case, calls are rejected with the message EDT4976.

Note

If @DIALOG was issued in a system procedure, then the remaining procedure commands after @LOAD are executed while the specified program is loaded instead of EDT. This may result in unwanted effects.

Example

The example assumes that the records present in the work file have not yet been saved.

EDT is to be terminated and LMS is to be loaded.

Since the work file has not yet been saved, EDT queries (in the same way as in @HALT), whether it should really terminate.
Since @LOAD was specified rather than @EXEC, a slash indicates that further system commands are expected. LMS is not started until the /RESUME-PROGRAM command is issued.