Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

@END - Exit current work file or terminate the EDT session

&pagelevel(3)&pagelevel

In L mode, @END causes the current work file to be exited. Processing returns to the work file in which the @PROC statement activating the current work file was issued. In F mode, @END terminates the EDT session or terminates the screen dialog.

Operation

Operands

F mode, L mode

@END

[comment]

comment

The comment operand may contain any text as a comment. It may only be
input in L mode.

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

If the @END statement is entered in work file 0 in L mode then the message EDT4939 is output. In batch mode and in EDT procedures, the next statement is then read. In interactive mode, behavior after the warning message EDT4939 is the same as for the @HALT statement without operands except that even if job switch 4 is set, the queries EDT0900 and EDT0904 are still output.

In F mode, the @END statement is always processed in the same way as @HALT without operands independently of the current work file, i.e. the EDT session or screen dialog is terminated and, if EDT was called as a subroutine, control returns to the calling program (see @HALT statement).

If the current work file (not equal to work file 0) in L mode was not set by means of a
@PROC statement but with @SETF or implicitly after a switch from F mode to L mode then processing switches back to work file 0.

@END cannot be used to make a work file in which a @DO procedure is running (active work file) the current work file. Any such attempt is rejected with the message EDT4959.

Example 1

1.     @PROC 1 ------------------------------------------------------- (1)
1.     @ @SET #S1 = DATE
2.     @ @SET #S2 = TIME      ---------------------------------------- (2)
3.     @ @PRINT #S1.-#S2 N
4.     @END ---------------------------------------------------------- (3)
(1)Processing switches to work file 1.
(2)An EDT procedure is entered in work file 1.
(3)

Processing returns to work file 0. The procedure located in work file 1 can be called with @DO 1.


Example 2

   1.     @PROC 7 ------------------------------------------------------- (1)
   1.     @PROC --------------------------------------------------------- (2)
<07>
   1.     @ @SET #S7 = 'THIS IS PROC 7'
   2.     @ @PRINT #S7
   3.     @PROC 8 ------------------------------------------------------- (3)
   1.     @ @SET #S8 = 'THIS IS PROC 8'
   2.     @PROC USED
<07>     1.0000 TO    2.0000   ------------------------------------------ (4)
<08>     1.0000 TO    1.0000
   2.     @END ---------------------------------------------------------- (5)
   3.     @PROC --------------------------------------------------------- (6)
<07>
   3.     @END ---------------------------------------------------------- (7)
   1.     @PROC --------------------------------------------------------- (8)
<00>
(1)Processing switches to work file 7.
(2)Queries the current work file.
(3)Processing switches to work file 8.
(4)Work files 7 and 8 are in use.
(5)

EDT returns to work file 7 (from where processing branched to work file 8 due to @PROC).

(6)The query of the current work file confirms the return to work file 7.
(7)Processing returns to work file 0 again.
(8)Repeated query of the active work file confirms the return to work file 0.