Question: I can't seem to get Acu4GL to create the files in Oracle. They keep coming up as Vision files.
Answer: Check to see that the DEFAULT-HOST variable is set in the runtime
configuration file or the environment. Setting DEFAULT-HOST in the environment
overrides the setting in the runtime configuration file.
Type runcbl -vv and make sure that the version number of the Oracle interface
is reported. This tells you that the interface has been installed
successfully. If -vv does not return the Oracle interface, make sure the linked runtime
has the name you used, and is the first executable with that name on the PATH.
If the Oracle version does not show, make sure that USE_ORACLE is set to 1 in
the file FILETBL.C before you re-link the runtime.
Question: Can I use both Oracle and Vision at the same time?
Answer: Yes, you can. In the configuration file, set DEFAULT-HOST to the file
system you want the runtime to use automatically. Then, for selected files, assign
them to an alternate file system with the variable filename-HOST. For
example, to put CUSTFILE into Oracle and everything else into Vision, you would add:
DEFAULT-HOST Vision
CUSTFILE-HOST ORACLE
Question: What files do I need in order to link my C routines into Acu4GL?
Answer: You need to modify the file makefile.ora to add you C routines to the file and then relink your runtime with the common make -f makefile.ora
Question: How can I find out what the Oracle error message is?
Answer: If you run your application with the -x option, you will receive secondary
error numbers that include those returned by Oracle, in addition to the
ACUCOBOL-GT error.
Another option is to take a five digit error code and enter the following:
OERR ORA xxxxx
In this example xxxxx represents the received error code.
If you have sent the errors to an output file with the -e option, the runtime
will also attempt to include the text that explains the errors. See Oracle: Runtime Errors for additional details.
Question: Do my XFD files have to be in the same directory as my object files?
Answer: No. You can instruct the compiler to put the XFD files in a directory other than the current one with the -Fo option, or you can move the XFD files after they're created. Then at runtime, make sure you have the configuration variable XFD-DIRECTORY set to that same directory.
Question: Why aren't my keys being retrieved in the correct order?
Answer: If your key field is numeric or alphanumeric, you may have illegal data in
the field. For example, if you've used LOW-VALUES or HIGH-VALUES to mark control records, those values are
considered invalid and can cause the records containing them to be retrieved in
an unexpected sequence.
To enable special values such as these to be processed, use the BINARY
directive in front of the key field. This will allow data of any classification to be
processed. Either designate an individual field as binary, or specify USE
GROUP, BINARY in front of a group of fields.
The method of storing variables declared as binary is database-specific. For Oracle databases, with Acu4GL 1.1 and later, variables declared as binary are stored as raw fields.
Question: When I try to open a file for output, I get the error 9D,904 Invalid Column Name. Why?
Answer: One of your record's data items probably has the same name as an Oracle reserved word. Locate the column by comparing a file trace of the CREATE TABLE to Oracle's list of reserved words and then apply the NAME directive to the column in question.
Question: I created a table the last time I ran the application, and now I can't find it. Why?
Answer: This is probably a file (table) ownership problem. If you were running the application under a different user name when you created the file, that table may not be visible unless the creating user's name is listed in your USER-PATH configuration variable.
Question: Can the Acu4GL for Oracle interface support a full date/time format?
Answer: The finest time granularity that Oracle will support is one second. Fractions of a second are not supported. In order to achieve this, you must be sure the "xfd date" code is correct and specify a date-format-string in your COBOL application as opposed to just a date. See Date Directive for additional information.
Note: The 4.2 release of Acu4GL for Oracle may have caused the default time to be set to an incorrect value. This only affects users that use the XFD 'DATE' directive without hours and minutes. The following are some sample SQL statements that can be used as a "guideline" to modify affected databases. Your DBA should review these statements, and make modifications as necessary to assure that the corrections are incorporated properly into your database!
The following statement (or one similar) will highlight which rows are "at-risk" of being corrupt:
Select distinct table_name, column_name from user_tab_columns where data_type = 'DATE';
The following statement (or one similar) will "modify" the data to set the default time to the correct Oracle default value:
Update tablename set columnname = trunc(columnname,'DD');
Question: Is it possible to use the same XFD file for data files with different names, if they all have the same structure? This would be useful when I create several customer files that use the same record definitions.
Answer: At runtime, it is possible to use a single XFD for files that have different names. For example, suppose a site has customer files that have identical structures but different names (CUST0001, CUST0002, CUST0003, etc.). It's not necessary to have a separate XFD for each file, so long as their record definitions are the same.
The individual files can all be mapped to the same XFD via a runtime configuration variable called XFD-MAP . Here's how it works.
Suppose your COBOL application has a SELECT with a variable ASSIGN name, such as customer-file. This variable assumes different values (such as CUST0001 and CUST0002) during program execution.
Before compiling the application, you would use the FILE directive to provide a base name for the XFD. Suppose you provide CUST as the base. The compiler would then generate an XFD named cust.xfd. (The compiler always converts XFD names to lower case.)
To ensure that all customer files, each having a unique name, will use this same XFD, you make this entry in your runtime configuration file:
XFD-MAP CUST* = CUST
The asterisk (*) in the example is a wildcard that matches any number of characters. Note that the extension .xfd should not be included in the map. This statement would cause the XFD cust.xfd to be used for all files whose names begin with CUST.
The XFD-MAP variable has this syntax:
XFD-MAP [pattern = base-xfd-name] ...
where pattern consists of any valid filename characters and may include * or ?. These two characters have special meanings in the pattern:
* matches any number of characters
? matches a single occurrence of any character
For example:
CUST???? matches CUST0001 and CUSTOMER
does not match CUST001 or CUST00001
CUST* matches all of the above
CUST*1 matches CUST001 and CUST0001 and CUST00001
does not match CUSTOMER
*OMER matches CUSTOMER
does not match CUST001 or CUST0001
The XFD-MAP variable is read during the open file stage of any Acu4GL interfaces linked into the runtime.
This is the end of the Acu4GL for Oracle section. Click the Contents button at the top of this window to return to the Table of Contents page.