Acu4GL for Microsoft SQL Server now supports tables that contain identity columns.
Acu4GL can use the IDENTITY-COLUMN XFD directive to create an identity column in a new or existing table, or it can handle tables with existing identity columns.
When reading a row with READ, READ NEXT, or READ PREVIOUS, the field specified by the IDENTITY-COLUMN is filled in with the value in the row.
When writing a row with WRITE, the field specified by the IDENTITY-COLUMN is ignored, allowing the server to fill in the value.
When updating a row with REWRITE, the field specified by the IDENTITY-COLUMN will be used as the WHERE clause of the UPDATE statement. Similarly, when deleting a row with DELETE, the field specified by the IDENTITY-COLUMN will be used as the WHERE clause of the DELETE statement.
In both cases, the desired row must be identified by the COBOL program setting the field specified by the IDENTITY-COLUMN correctly. Otherwise, an error 23 could be returned, or the wrong row updated or deleted.
Because there can only be one IDENTITY column in a table, the interface will not add an internally-used IDENTITY column to the table if there is a column already identified as the IDENTITY-COLUMN.