Simple data items are modeled as described in the following table.
-
There is no exact mapping in SQL for unsigned data items. However, MCPSQL will preserve the unsigned attribute. All negative values stored by INSERT or UPDATE queries will be made positive (the negative sign will be discarded), per DASDL specification and COBOL and ALGOL tradition.
-
If precision 'p' has the value 11, a full INTEGER value can be stored (after scaling by 's' when applicable). Otherwise, MCPSQL will enforce compliance with the precision defined in DASDL and report a truncation error for data values stored using INSERT or UPDATE queries which exceeds the specified range.
-
MCPSQL will use the full value stored in the database (de-scaled by scale 's' when appropriate) for all calculations, comparisons and output (effectively ignoring the precision 'p' specification). Values that exceed the range implied by the 'p' precision can only be stored into the database by software other than MCPSQL. See note (2).
-
Data items specified as REAL(p, s) and REAL(Sp, s) are output as NUMERIC(12, s) values.
The data item options REQUIRED and INITIALVALUE are modeled in SQL as NOT NULL and DEFAULT column constraints, respectively.

