The table below shows the mappings used by Acu4GL when interacting with Microsoft SQL Server.
Data type | Generated using... |
---|---|
DATETIME | The DATE XFD directive, specifying both date and time information. |
DATE | The DATE XFD directive, specifying only date information. |
TIME | The DATE XFD directive, specifying only time information. |
BINARY(n) | The BINARY XFD directive, specifying a COBOL field 8000 bytes or less. n refers to the number of bytes. |
IMAGE | The BINARY XFD directive, specifying a COBOL field greater than 8000 bytes. |
CHAR(n) or NCHAR(n) | A COBOL field of type PIC X(n), where
n is less than 8000 characters/digits.
Notes for NCHAR:
|
GUID | A COBOL field of type PIC X(36).
Note: Support is only for existing tables containing this type;
Acu4GL cannot create a new column of this type. If required, use the A_MSSQL_IGNORE_GUID_COLUMNS configuration variable to ignore
the GUID column in a table.
|
TEXT | A COBOL field of type PIC X(n), where n is 8000 characters/digits or more. |
VARCHAR(n) or NVARCHAR(n) | The VAR_LENGTH XFD directive and specifying a COBOL field of type PIC X(n), where
n refers to the size of the COBOL field.
For NVARCHAR, the Unicode and COBOL conversion is also dependent on the COBOL_CHARACTER_SET configuration variable. |
FLOAT | A COBOL field of type DOUBLE. |
REAL | A COBOL field of type FLOAT. |
TINYINT | A COBOL field of type PIC 9 or PIC 99. |
SMALLINT | A COBOL field of type PIC 9(3) or PIC 9(4). |
INT | A COBOL field of type of PIC 9(5) to PIC 9(8). |
BIGINT | A COBOL field of type PIC 9(9) to PIC 9(18). |
DECIMAL(n,0) | A COBOL field of type PIC(19) or larger, where n is the number of digits. |
DECIMAL(n,m) | A decimal COBOL field, where n refers to the number of digits to the left of the decimal point and m refers to the number of digits to the right of the decimal point. |