open
The EGL open statement creates a list from a database, based on selection criteria you provide, and creates a pointer that you can use to move through the list. The open statement currently works only with SQL databases, where it produces a result set and a cursor.
Syntax

- listID
- A character string of your choice that you use to identify the list the open statement creates. Once you open the file, you can use the listID with a positional get statement, or with the replace, delete, or close statements.
- openOptions
- Additional options for customizing the open statement, based on the data access technology you are using. See the related references for information on the data access technologies available to you.
- explicitCode
- Explicit code embedded in the open statement, where your data access technology permits it (as SQL does).
- into field
- The EGL host variables that receive values from the list (see Host variables).
- preparedStatementID
- The identifier for the code created with an EGL prepare statement, allowing dynamic processing. For more information, see prepare.
- using field
- The EGL host variables that are made available to the prepared statement at run time.
- recordVariable
- The name of a record variable. If you do not specify explicitCode, EGL derives the necessary information for the open from the properties and contents of this variable.
For examples and error conditions, see the topic for a particular data access technology in the related references at the end of this topic.