Welcome Serena Central users! CLICK HERE
The migration of the Serena Central community is currently underway. Be sure to read THIS MESSAGE to get your new login set up to access your account.
SMartin_accela_com Regular Contributor.
Regular Contributor.
433 views

running cobol applications accessing oracle tables

in acucobol

Primary Key prhead-key 9(10)  

move 0 to prhead-key 

start file not < prhead-key 

works when accessing vision file translates 0 to 0000000000 (I believe)

and finds all records

 

 

Oracle Table  

move 0 to prhead-key   returns a status = 23  because it interprets key as 0sssssssss where s = a space

Also empty 'temporary' files return a '92' error when read

 

Is there a configuration variable to handle these little quirks? 

 

Thank you

0 Likes
3 Replies
GeorgeK Absent Member.
Absent Member.

RE: running cobol applications accessing oracle tables

I'm wondering if in the xfd it is treating prhead-key as alpha-numeric as group level which is the default for group-level. So in other words, it may be looking at it as PIC X(10) rather than PIC 9(10). Check the oracle table first make sure it is numeric, then you may have to add a specific xfd definition for the group level. You can do this without creating a conversion program simply by using a redefines instead. However, you'll have to check the xfd and you may need to add and xfd definition for that field.
0 Likes
DougP Outstanding Contributor.
Outstanding Contributor.

RE: running cobol applications accessing oracle tables

I don't see this behavior with my test program. It may have something to do with your XFD. Please attach your test program, the XFD file, and configuration file.
0 Likes
Gege54 Frequent Contributor.
Frequent Contributor.

RE: running cobol applications accessing oracle tables

I do not know if it can solve your problem but I have solved sorting problems between mixed numeric data and not
with the following command

CALL "SQL" USING "ALTER SESSION SET NLS_SORT=BINARY"

This is the defination of NLS_SORT in Oracle

NLS_SORT specifies the collating sequence for ORDER BY queries.

If the value is BINARY, then the collating sequence for ORDER BY queries is based on the numeric value of characters
(a binary sort that requires less system overhead).
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.