Technical Reference
The following provides information specific to Script-IV, Dictionary-IV, Thoroughbred Basic, and MariaDB views.
Script-IV/Dictionary-IV
Section titled “Script-IV/Dictionary-IV”The following information is specific to Script-IV and Dictionary-IV
DATA-FILE IS, SORT-FILE IS
Section titled “DATA-FILE IS, SORT-FILE IS”This feature will be supported but the object referenced by this command must be a Link rather than a local data file. The Link can then reference either a server table or a local file. The file type set in this Link must be “M”.
Access Subset of Columns
Section titled “Access Subset of Columns”By defining a format that contains a subset of the columns that are defined in a table, access to tables that contain unsupported data types (BIGINT,IMAGE,NTEXT, etc.) is possible. All of the possible I/O directives are supported with no effect on the unreferenced fields.
Soft Includes
Section titled “Soft Includes”When an OPEN is executed on a server Link, the Format referenced in the Link header is soft included. This means that the Format data area is defined in memory. However, the Format name will not appear in the FMTNL list and will not interfere with any hard includes that take place. The soft include is executed internally as a FORMAT INCLUDE #format-name, OPT=”NONE” so that any data defined in a Format data area at the time of an OPEN of a server Link that references this Format is preserved.
If however a READ or a WRITE is executed using an IOLIST, the Format data area will be modified since the I/O operation uses the Format data area to parse the data into the proper variable values.
Enhanced Access to Tables
Section titled “Enhanced Access to Tables”Where possible, sequential access to tables may provide faster access times during READ operations. This is possible because a particular I/O statement will generate a result set on the server. Subsequent READ operations will simply move through the result set and return the data to Basic. The area where this is most obvious is when a table is sorted by Basic in a way that no index exists in MariaDB. The initial READ will force the sort to take place, but all READs that follow will get the data from the result set without the need to sort again. If any other I/O statement had occurred between READs another result set would have been created forcing a re-sort on the next READ statements. The following is NOT considered a sequential READ:
K$ = KEY(CH); READ (CH,KEY=K$)
This code generates two separate result sets. Each READ that specifies a specific key generates a new result set. A sequential READ looks like:
READ (CH,ERC=2)
Reestablish a Connection
Section titled “Reestablish a Connection”To reestablish a connection, use the following command:
ENABLE disk-no,”RECONNECT”
Where disk-no is the DEV line designation to the MariaDB server.
SET CTC and CTC()
Section titled “SET CTC and CTC()”These functions allow setting and retrieving the current Commit Count from Basic.
A = CTC(“DQ”)
This retrieves the current commit count for database connection associated with DEV DQ.
SET CTC “DQ”,1000
This sets the commit count to 1000 for the database connection associated with DEV DQ.
Tables
Section titled “Tables”MariaDB Views
Section titled “MariaDB Views”Where possible the use of a MariaDB view as the table in Link definition should be avoided. Views will not support all of the SQL statements that are generated by Basic statements. The most common of these will be the SELECT FOR UPDATE which is the EXTRACT directive in Basic. Therefore, it is possible that server errors (ERR=150) will occur accessing Views which will interrupt normal program functioning.
Also, for the View data to be returned in a sorted order, the sort must be explicitly defined in the definition of the view in MariaDB. Merely defining key fields will not produce sorted results. A sort must be defined in the link header and then used in all I/O statements.
From the TS DataServer for MariaDB Reference, version 8.9.1. Open this page in the PDF