Keyword | Purpose |
---|---|
add | Places a record in a file, message queue, or database; or places a set of records in a database. |
call | Transfers control to another program and optionally passes a series of values. Control returns to the caller when the called program ends. If the called program changes any data that was passed by way of a variable, the storage area available to the caller is changed, too. |
case | Marks the start of multiple sets of statements, where at most only one of those sets is run. The case statement is equivalent to a C or Java™ switch statement that has a break at the end of each case clause. |
close | Disconnects a printer; or closes the file or message queue associated with a given record; or, in the case of an SQL record, closes the cursor that was opened by an EGL open or get statement. |
continue | Transfers control to the end of a for, forEach, openUI, or while statement that itself contains the continue statement. |
converse | Presents a text form in a text application or presents a VGUI record in a Web application. |
delete | Removes either a record from a file or a row from a database. |
display | Adds a text form to a runtime buffer but does not present data to the screen; but is available only in VisualAge® Generator compatibility mode. |
execute | Lets you write one or more SQL statements; in particular, SQL data-definition statements (of type CREATE TABLE, for example) and data-manipulation statements (of type INSERT or UPDATE, for example). |
exit | Leaves the specified block, which by default is the block that immediately contains the exit statement. |
for | Begins a statement block that runs in a loop for as many times as a test evaluates to true. |
forEach | Marks the start of a set of statements that run in a loop. The first iteration occurs only if a specified result set is available and continues (in most cases) until the last row in that result set is processed. |
forward | Used primarily to display a Web page with variable information; but also can access a URL or can invoke a servlet or Java program that runs in the Web application server. |
freeSQL | Frees any resources associated with a dynamically prepared SQL statement, closing any open cursor associated with that SQL statement. |
get | Rerieves a single file record or database row and provides an option that lets you replace or delete the stored data later in your code. In addition, this statement allows you to retrieve a set of database rows and place each succeeding row into the next SQL record in a dynamic array. The get statement is sometimes identified as get by key value and is distinct from the get by position statements like get next. |
get absolute | Reads a numerically specified row in a relational-database result set that was selected by an open statement. |
get current | Reads the row at which the cursor is already positioned in a database result set that was selected by an open statement. |
get first | Reads the first row in a database result set that was selected by an open statement. |
get last | Reads the last row in a database result set that was selected by an open statement. |
get next | Reads the next record from a file or message queue, or the next row in a database result set. |
get next inParent | As used for DL/I access, reads the next child segment that has the same parent as the segment at the current database position. |
get previous | Reads the previous record in the file that is associated with a specified EGL indexed record; or reads the previous row in a database result set that was selected by an open statement. |
get relative | Reads a numerically specified row in a database result set that was selected by an open statement. The row is identified in relation to the cursor position in the result set. |
goTo | Causes processing to continue at a specified label, which must be in the same function as the statement and outside of a block. |
if, else | Marks the start of a set of statements (if any) that run only if a logical expression resolves to true. The optional keyword else marks the start of an alternative set of statements (if any) that run only if the logical expression resolves to false. The reserved word end marks the close of the if statement. |
move | Copies data, either byte by byte or by name. The latter operation copies data from the named items in one structure to the same-named items in another. |
open | Selects a set of rows from a relational database for later retrieval with get by positionstatements like get next. The open statement may operate on a cursor or on a called procedure. |
openUI | Allows the user to interact with a program whose interface is based on consoleUI. The openUI statement defines user and program events and specifies how to respond to each. |
prepare | Specifies an SQL PREPARE statement, which optionally includes details that are known only at run time. You run the prepared SQL statement by running an EGL execute statement or (if the SQL statement returns a result set) by running an EGL open or get statement. |
Adds a print form to a runtime buffer. | |
replace | Puts a changed record into a file or database. |
return | Exits from a function and optionally returns a value to the invoking function. |
set | Has various effects on records, text forms, and fields. |
show | Presents a text form from a main program along with any other forms buffered using the display statement; ends the current program and optionally forwards the input data from the user and state data from the current program to the program that handles the input from the user. |
transfer | Gives control from one main program to another, ends the transferring program, and optionally passes a record whose data is accepted into the receiving program's input record. You cannot use a transfer statement in a called program. |
try | Indicates that the program continues running if an input/output (I/O) statement, a system-function invocation, or a call statement results in an error and is within the try statement. |
while | Marks the start of a set of statements that run in a loop. The first run occurs only if a logical expression resolves to true, and each subsequent iteration depends on the same test. The reserved word end marks the close of the while statement. |
Related reference
EGL statements