


- The identifier of a host variable may have a maximum length of 32 characters (upper limit: see COBOL compiler).
- A host variable must not begin with 'SQ' nor must it end on '-'.
- The declaration of a host variable must be global for all SQL statements in which it is used.
- A host variable can be a record or a table (up to 4 dimensions).
- A record can contain records or tables.
- The format 999... or XXX... can also be chosen instead of 9(..) or X(..) in the PICTURE string.
The host variables can be contrasted with the corresponding ADABAS data types:

If the data types do not correspond to each other but are of the same category (numeric or character string), then they will be converted. Also numeric values are converted into character strings and vice versa. At precompilation time, the precompiler tests whether the target variable can receive the maximum value of the source variable when values are transferred between database and program. If this is not the case, a warning is issued in the precompiler listing. The contents of all character string host variables are taken as they were specified, i.e., upper- and lowercases are not converted.
ADABAS columns of type DATE hold information about the date in the form YYYYMMDD (year, month, day); ADABAS columns of type TIME hold information about the time in the form HHHHMMSS (hour, minute, second), ADABAS columns of type TIMESTAMP hold information about the timestamp in the form YYYYMMDDHHMMSSMMMMMM (year, month, day, hour, minute, second, microsecond). The type TIMESTAMP is only valid in SQLMODE ADABAS.
Options set during precompilation allow you to vary the representation of DATE, TIME, and TIMESTAMP.
The following table indicates the conversion possibilities (x) and the errors and warnings which may occur:

1 An OVERFLOW can occur in this case (SQLCODE < 0).
2 In such a case, any places after the decimal point, as well as any mantissa places, will be truncated if necessary (indicator value: > 0).
3 In this case, any characters to the right will be truncated, if necessary; whereby SQLWARN1 will be set and the length of the associated ADABAS output column will appear in the indicator (indicator value > 0).
4 Not allowed (SQLCODE NOT = 0).
5 An OVERFLOW can occur when numeric values are converted into character values (SQLCODE < 0).
6 An OVERFLOW or an invalid number (SQLCODE < 0) can occur when character values are converted into numeric values.
7 The value zero is mapped to 'false', all values not equal to zero are mapped to 'true'.


