Highlighted
Absent Member.
Absent Member.
1000 views

Acu4GL - loading spaces to ORACLE 'varchar2 not null' column

[Migrated content. Thread originally posted on 16 February 2011]

Am encountering a problem using Acu4GL on the update of a column on an ORACLE table with spaces. The column is defined as - VARCHAR2(30 BYTE) NOT NULL - which we are attempting to populate with spaces. Acu4gl appears to be changing the value from spaces to null prior to the update - causing the update to fail.
Has anyone had the same problem/know of any resolution (other than removing the NOT NULL from the table definition)?
Thanks.
0 Likes
2 Replies
Highlighted
Absent Member.
Absent Member.

RE: Acu4GL - loading spaces to ORACLE 'varchar2 not null' column

I don't know how your program is working with ORACLE: is it just batch program to update TABLE or online program?

If batch program, how about give the space to a special value such as "WHATEVER",
after running your code, you could trigger another SQL in ORACLE to update all "WHATEVER" to space.

If online program, how about still give the space a special value such as "WHATEVER",
after that, send a SQL through "sql.acu": call "sql.acu" using sql-command to update "WHATEVER" to space.
0 Likes
Highlighted
Visitor.

RE: Acu4GL - loading spaces to ORACLE 'varchar2 not null' column

How is this field defined in your COBOL program, and is it a key field? Also are any XFD directives placed on this field? It's possible that Acu4GL sees the spaces as an illegal value for the particular field type (regardless of how it's defined in the Oracle table). If so, for a non-key field Acu4GL will (by default) convert the data to NULL. To override this, you can set the runtime config variable 4GL_ILLEGAL_DATA to CONVERTED. For a numeric field, this will cause it to convert SPACES to ZERO.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.