Open-COBOL-ESQL icon indicating copy to clipboard operation
Open-COBOL-ESQL copied to clipboard

Support for VARCHAR DB data type

Open GitMensch opened this issue 2 years ago • 1 comments

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.

GitMensch avatar May 17 '23 10:05 GitMensch

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.

n-isaka avatar May 24 '23 08:05 n-isaka