Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for VARCHAR DB data type #89

Open
GitMensch opened this issue May 17, 2023 · 1 comment
Open

Support for VARCHAR DB data type #89

GitMensch opened this issue May 17, 2023 · 1 comment

Comments

@GitMensch
Copy link
Contributor

GitMensch commented May 17, 2023

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.

@n-isaka
Copy link
Member

n-isaka commented May 24, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants