Date: Thu, 28 Mar 2024 14:20:03 -0700 (PDT) Message-ID: <2038137735.329.1711660803325@wiki.srpcs.com> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_328_1485727645.1711660803324" ------=_Part_328_1485727645.1711660803324 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
Creates a table access variable (a file handle).
Open ["DICT",] expression To table_var Th= en | Else statements
The Open statement has the following parameters.
Parameter | Description |
---|---|
expression | Designates the native table that is to be opened= . To open the dictionary, use DICT as the first part of the table name (exa= mple: "DICT.CUSTOMERS"); and to open the data portion of the table, use onl= y the table name (example: "CUSTOMERS"). Use separate Open statements to op= en the DICT and data portions of each table. |
table_var | After a successful Open operation, table_var con= tains information about the table. From that point on, refer to the table w= ith table_var, not with the actual table name. |
Then | The statement(s) following Then are executed if = a table is opened successfully. |
Else | The statement(s) following Else are executed if = the table cannot be opened. The Status() function indicates the severity of the error, and= the system variable @FILE_ERROR contains detail about the nature of the er= ror. |
You must Open a table before attempting to Read or Write rows from/to that table. As long as a table ha= s been opened once, it does not need to be opened again each time you want = to Read or Write to it.
Each table must be opened with a separate Open statement. Any number of = tables may be opened at any point in the program.
Tables opened with the Open command need not and cannot be closed.
Index.Open subroutin= e, Attach_Ta= ble
/* The following p= rogram demonstrates file opening and subsequent processing. */ table =3D "CAR_PARTS" Open table To tablevar Then Open "DICT", table To @DICT Else null End Else * error processing: cannot open table End Select tablevar Done =3D 0 Printer On Loop ReadNext @ID Else done =3D 1 Until done Read @RECORD From tablevar, @ID Then report =3D {PART_NAME}:" ":{PART_TYPE}:" ":{PART_NO} Print report End Repeat Printer Off