Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

IEDTEXE - Execute EDT statements without screen dialog

&pagelevel(4)&pagelevel

This call passes a statement or sequence of statements to EDT for execution.

It differs from the IEDTCMD function as follows:

  • EDT must already be loaded and initialized.

  • It is not possible to conduct a screen dialog (@DIALOG and @EDIT are not permitted).

  • EDT cannot be terminated or unloaded (@HALT, @RETURN and @MODE are not permitted).

  • It is not possible to start any EDT procedures (@INPUT and @DO are not permitted).

The following statements are permitted at the IEDTEXE interface.

Unlike in EDT V16.6, the flag EGLSTXIT in EDTGLCB is evaluated on every call via the IEDTEXE interface. On return to the calling program, the EDT interrupt routines are exited (if they have been requested). If the calling program is a statement or user routine then the status of interrupt handling is restored to its state before the call to the external routine when control returns to EDT.
If a syntax or runtime error occurs then execution is immediately interrupted with a corresponding return code and an error message. In the case of a syntax error, the EGLCMDS field (EDTGLCB) is used as an error pointer. This points to the start of the invalid statement within

the statement sequence. For reasons of compatibility, the first character after the record length field is numbered '1' (using this numbering convention, the first character in the passed statement sequence has the number '3'). Counting is always performed in characters not in bytes. The return code EUPSYERR or EUPRTERR is passed.

Unlike in the case of the IEDTCMD interface, the IEDTEXE interface may also be used in a routine which executes a user-defined statement or in a user routine (see the section on user-defined statements - @USE and user routines - @RUN) for statements sent to the calling EDT instance.

If the IEDTEXE function is called from the statement routine in a user-defined statement then no further user-defined statements may be entered.

Control structures

The following data areas must be defined before calling the IEDTEXE function in the user routine:

  • the control block (EDTGLCB)

  • the statement or statement sequence (COMMAND)

For a description of the control block EDTGLCB, see section “EDTGLCB - Global EDT control block”. For a description of the COMMAND buffer, see section “Sequence of statements in a buffer (COMMAND)”.
The control block EDTGLCB which is passed by EDT should be used in the statement routine in a user-defined statement.

Call

The following specifications are required (see overview):

  • Entry of values in the control block fields in EDTGLCB

  • Entry of the statement sequence in the COMMAND data field.

  • Call of the IEDTEXE entry point address with the parameter list

Overview

(For the control blocks, see section “Generation and structure of the control blocks”).

Entry point address     :     IEDTEXE

Parameter list         :     A (EDTGLCB, COMMAND)

Call parameter

Return parameter

EDTGLCB: 


EGLUNIT
EGLVERS
EGLINDB
EGLCCSN

EDTGLCB: 

EGLRETC
EGLRMSG
EGLCMDS
EGLFILE
EGLUSR1
EGLUSR2
EGLUSR3
COMMAND


Return codes

EGLMRET

EGLRS1

EUPRETOK
EUPSYERR
EUPRTERR
EUPEDERR
EUPOSERR
EUPUSERR
EUPPAERR

00
00
00
00
00
00
EUPPA04
EUPPA12
EUPPA20

The fields EGLMRET and EGLRS1 are fields in the control block EDTGLCB.
For the meaning of the return codes, see section “EDTGLCB - Global EDT control block”.

Call in the C program

Required include files:

#include <stdio.h>

#include <iedtgle.h>

The function IEDTEXE is also called in the C program with the address of EDTGLCB and the command for execution:

IEDTEXE(&glcb,&command);