Open-COBOL-ESQL
Open-COBOL-ESQL copied to clipboard
Support for VARCHAR DB data type
I'd like to read and write to data defined as VARCHAR(100).
Ideally the data should always be padded to the COBOL field size on reading via SELECT and have an auto-trim on write / when used in the WHERE clause.
How to achieve that?
Note: using procob this was solved by defining the data asCHAR/VARCHAR in the database and using
EXEC SQL VAR COBFIXNAME IS CHARF END-EXEC.
EXEC SQL VAR COBVARNAME IS VARCHAR2 END-EXEC.
in the COBOL program. Ideally this could be used with ocesql, too.
We were able to confirm the operation with PROCOB here as well. I too think it would be a good idea to create a similar specification. I will consider adding the feature.