


According to specification, ODBC programs retrieve data exclusively through Structured Query Language (SQL) queries or statements. For this reason, one of the functions performed by AcuODBC is to translate SQL statements into I/O verbs that can be executed and interpreted by the COBOL data file system.
SQL is a very complex language, and AcuODBC does not try to support every SQL statement. Rather, AcuODBC supports the most common commands needed to write a query: SELECT, INSERT, DELETE, and UPDATE. In addition to these commands, AcuODBC supports several SQL reserved words. These are described in Section 6.4, SQL Reserved Words Supported by AcuODBC.
The following section describes the SQL syntax of the four main commands supported by AcuODBC. It uses notation to describe the syntax, and follows the conventions used in most ANSI standards.
Upper-Case
UPPER-CASE WORDS are keywords.
Brackets and Vertical Bars
Brackets ( [] ) enclose optional elements.
Vertical stacked entries enclosed in vertical bars indicate that you may select one or more entries. Any number of entries can be selected, but no entry may be selected more than once.
Ellipses
Ellipses (. . .) indicate repetition. The element immediately preceding an ellipsis may be repeated any number of times.
Other Characters
All the other characters, like commas and dots, are required when they appear.
Numeric and Nonnumeric Literals
A numeric literal is a character string selected from the digits, the plus sign, the minus sign, and the decimal point. The following rules govern the formation of numeric literals:
1. A literal must contain at least one digit.
2. It must contain no more than one sign character and, if one is used, it must be the leftmost character of the string.
3. A literal must not contain more than one decimal point.
A nonnumeric literal or alphanumeric literal is a character string delimited at the beginning and at the end by quotation marks or apostrophes. The beginning and ending delimiters must be the same (that is, either both quotes or both apostrophes).
To place the delimiter character in a nonnumeric literal, use two contiguous delimiter characters (either two quotes or two apostrophes). These two characters represent a single occurrence of that character.
More: