Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

Calling an EDT procedure in a BS2000 system procedure

&pagelevel(4)&pagelevel

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 SET-JOB-STEP.

(02)

Set job switches 4 and 5 (see section “Job switches”).

(03)

Call EDT.

(04)

Processing switches to work file 20.

(05)

The EDT statements in the @DO procedure are stored in work file 20.

(06)

Processing returns to work file 0.

(07)

Call the @DO procedure located in work file 20 (read in a file, distinguish between uppercase and lowercase, output a column counter, output an information line, set data window and mark column to overwritable).

(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.