An EDT procedure can be dynamically constructed and called within a BS2000 system procedure.
Example of an EDT procedure in a BS2000 system procedure
/SET-PROCEDURE-OPTIONS DATA-ESCAPE-CHAR=*STD /BEGIN-PARAMETER-DECLARATION /DECLARE-PARAMETER FILE,TYPE=STRING,INITIAL-VALUE=*PROMPT /END-PARAMETER-DECLARATION /SHOW-FILE-ATTRIBUT &FILE ----------------------------------------------(01) /MODIFY-JOB-SWITCHES ON=(4,5) ------------------------------------------(02) /START-EDT -------------------------------------------------------------(03) @PROC 20 ---------------------------------------------------------------(04) @ @READ '&FILE' @ @PAR LOWER=ON @ @PAR SCALE=ON --------------------------------------------------------(05) @ @PAR INFORMATION=ON @ @PAR EDIT FULL=ON @END -------------------------------------------------------------------(06) @DO 20 -----------------------------------------------------------------(07) @DIALOG ----------------------------------------------------------------(08) @HALT ------------------------------------------------------------------(09) /SET-JOB-STEP /MODIFY-JOB-SWITCHES OFF=(4,5) -----------------------------------------(10)
(01) | Check whether the file specified via the procedure parameter is present. If not, processing branches to |
(02) | Set job switches 4 and 5 (see section “Job switches”). |
(03) | Call EDT. |
(04) | Processing switches to work file |
(05) | The EDT statements in the @DO procedure are stored in work file |
(06) | Processing returns to work file |
(07) | Call the @DO procedure located in work file |
(08) | Switch to F mode dialog. After termination of interactive mode with @HALT or @RETURN, the system procedure run is continued at the point where it was interrupted. |
(09) | Terminate EDT |
(10) | Reset the job switches. |