isCOBOL Database Bridge : EDBI Routines : EDBI Routines for Microsoft SQL Server
EDBI Routines for Microsoft SQL Server
Data mapping (any COMP type could be used, mapping is done according to the digits):
PIC X(n)
VARCHAR(n)
PIC 9(1-4)
SMALLINT
PIC 9(5-9)
INT
PIC 9(>9)
BIGINT
PIC 9(n)V9(m)
DECIMAL(n+m,m)
PIC S9(n)V9(m)
DECIMAL(n+m,m)
Peculiar jdbc settings:
iscobol.jdbc.cursor.concurrency = 1009
Lock Timeout:
By default the SQL Server JDBC driver waits for locks to be released. If you wish to receive a ‘record locked’ error, you can configure the lock timeout in the connection URL, for example:
iscobol.jdbc.url=jdbc:sqlserver://my-server:1433;user=sa;password=manager;lockTimeout=1000
Locking Tables:
The statements OPEN EXCLUSIVE I-O and OPEN I-O WITH LOCK have no effect on empty tables. In order to acquire a lock on the whole file, at least one record must be present.
Note - the above peculiar settings and the need of setting the lock timeout are required only if you wish to manage locks natively on the database. If you're working in a Application Server (Thin Client) or File Server environment and you wish to have a full support for locking features (including OPEN EXCLUSIVE and OPEN I-O WITH LOCK), then you may consider handling locks through the Internal lock management.