Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

@HALT - Terminate EDT

&pagelevel(3)&pagelevel

The @HALT statement terminates the EDT session, the screen dialog after @DIALOG or EDT if it has been called as a subroutine with or without transferring a text to the calling program (see section “Terminating an EDT session” for the general consequences of terminating EDT).

Operation

Operands

F mode, L mode

@HALT

[{ ABNORMAL | message}]

ABNORMAL

If EDT was called as a main program, it is terminated abnormally. In
procedures, processing continues at the next JOB-STEP or in an ERROR-BLOCK.

If EDT was called as a subroutine then the entire string as of the first
nonblank character after @HALT is passed to the calling program as a
message text (see also message operand). If this string starts with
'ABNORMAL' then a special return code (0008002C instead of 00080000) is
set.

message

String which is passed to the calling program when EDT is called as a
subroutine. This operand may only be specified if EDT is called as a
subroutine.

If this string starts with 'ABNORMAL' then a special return code (0008002C
instead of 00080000) is set.

In this statement, it is obligatory for at least one blank to be entered between the statement name and any specified operands.

The @HALT statement causes the termination of the EDT session in interactive or batch mode, if EDT was started as a main program with the /START-EDT or /START-EDTU command or equivalent /START-PROGRAM command (see section “Starting EDT”) and is not in screen dialog mode after @DIALOG. The EDT session is also terminated if @HALT is entered via the subroutine interface's CMD function (see the Subroutine Interfaces User Guide [1]).

In interactive mode, if the screen dialog is started with the @DIALOG statement from within a system procedure or via the subroutine interface then @HALT simply terminates the screen dialog and the system procedure or calling program is continued. The content of the work files is retained and there is consequently no save confirmation query (see below). In this case, specifying ABNORMAL has no special effect apart from informing the calling program.

If there are still any unsaved work files then, in interactive mode, the numbers of the work files with unsaved data are output after the message EDT0900 before EDT is terminated.

In addition, if they exist, the local @FILE entry (see the statements @FILE, @READ,
@GET and @OPEN, format 2) or the name of an open file or the library and element name of an open library element (see the statements @OPEN and @XOPEN) is output for each of these work files.

In interactive mode, the user then sees the query:

% EDT0904 TERMINATE EDT? REPLY (Y=YES, N=NO)?

If the user responds N then, in F mode, the work window is displayed. In L mode, the prompt is displayed again. The user may close or write back unsaved work files. If the user replies Y then unsaved work files are lost. EDT is terminated.

If job switch 4 is set before EDT is called, the save query is not issued. The save query is also not output if F mode has been called with @DIALOG (see also section “Terminating an EDT session”).

Example

1.     @HALT
%  EDT0900 EDITED FILE(S) NOT SAVED!
  LOCAL FILE ( 0) :
  LOCAL FILE ( 1) :
  LOCAL FILE ( 4) : L= EDT164
                    E= HALT(001),X
%  EDT0904 TERMINATE EDT? REPLY (Y=YES; N=NO)?

@HALT terminates EDT in L mode. Since unsaved files are still present, the message EDT0900 is output together with a list of the work files.