The @DIALOG statement can be used to switch EDT to screen dialog mode when input is read from SYSDTA
(usually in BS2000 system procedures or from the subroutine interface). In screen dialog, the preceding read operation is interrupted and EDT reads its input from the terminal in F mode (or in L mode after the entry of @EDIT). The screen dialog can be exited again with @HALT, @END, @RETURN or [K1]. EDT then continues the interrupted read operation.
Operation | Operands | F mode, L mode |
@DIALOG |
The statement is ignored in F mode. If, in L mode, @DIALOG is entered from a medium other than SYSDTA
(e.g. if statements are read from an EDT procedure or if input is read from the terminal with the line number as the prompt) or if it is called in batch mode then the statement is rejected with the error message EDT5400
or EDT4920
.
If screen dialog mode is called from a BS2000 system procedure then the statements @SYSTEM without operands and @EDIT ONLY are prohibited and are rejected with the message EDT4976
. In this case, the only way to switch to the operating system is to press [K2] provided that the BS2000 system procedure has not been protected against this with the option INTERRUPT-ALLOWED=NO
see section “Access protection”).
The screen dialog is terminated with @HALT, @END, @RETURN or [K1]. If @DIALOG is called via the subroutine interface or from a BS2000 procedure then processing continues with the statement that follows @DIALOG. If there are no further statements at the subroutine interface after @DIALOG then control passes to the calling program. If it is called from SYSDTA
(after @EDIT ONLY) then the next input is requested from SYSDTA
. In all cases, EDT remains loaded and all the EDT parameter settings remain as they were at the point screen dialog mode was exited.
Example
BS2000 procedure PROC.DIALOG
/BEGIN-PROCEDURE LOGGING=A,PARAMETERS=YES(/ PROCEDURE-PARAMETERS=(&FILE1=,&FILE2=),/ ESCAPE-CHARACTER='&') /ASSIGN-SYSDTA TO-FILE=*SYSCMD /MODIFY-JOB-SWITCHES ON=(4,5) ------------------------------------------- (1) /START-EDTU @PROC 1 ----------------------------------------------------------------- (2) @COPY FILE=&FILE1 ------------------------------------------------------- (3) @PAR SCALE=ON ----------------------------------------------------------- (4) @DIALOG ----------------------------------------------------------------- (5) @SETF(1) ---------------------------------------------------------------- (6) @WRITE FILE=&FILE2 ------------------------------------------------------ (7) @HALT ------------------------------------------------------------------- (8) /MODIFY-JOB-SWITCHES OFF=(4,5) /ASSIGN-SYSDTA TO-FILE=*PRIMARY /END-PROCEDURE
(1) | Job switch 5 is set before EDT is loaded. This sets L mode and the input is read from |
(2) | Processing switches to work file 1. |
(3) | A file is to be read in. The file name is queried while the procedure is running. |
(4) | The display of the column counter is activated. |
(5) | EDT is to be switched to the F mode screen dialog and the work window is to be output on the screen. It is then possible to input all F and L mode statements in this dialog mode. The F mode screen dialog is terminated with @END, @HALT or @RETURN or K1 and processing continues with the statement following @DIALOG. |
(6) | Work file 1 is again set as the current work file. This is necessary because the user may have set a different work file in the F mode screen dialog. |
(7) | Work file 1 is written to a SAM file. The file name is queried while the procedure is running. |
(8) | EDT is terminated. |
The procedure PROC.DIALOG
is started. This requests the name of the file that is to be read in. EDT then switches to F mode screen dialog.
The column counter is displayed in accordance with the default values specified under (4). @HALT terminates the F mode screen dialog again and the procedure which was interrupted by @DIALOG continues.
The procedure then queries the name of the file to which the work file is to be written. Depending on the actions performed in the F mode screen dialog, other messages may be output.