Questions and Answers

Here are some answers to common questions that can apply to any relational database management system (RDBMS) data source supported by the Database Connectors™ family of interfaces.

I can't seem to get Database Connectors to create the files in my database. They keep coming up as indexed files.
Check to see that the DEFAULT_HOST variable is set in the ACUFH configuration file or the environment. Setting DEFAULT_HOST in the environment overrides the setting in the ACUFH configuration file.
Can I use both an RDBMS and the Micro Focus EXTFH file system at the same time?
Yes, you can. In the ACUFH configuration file, set DEFAULT_HOST to the file system you want the run-time system to use automatically. Then, for select files, assign them to an alternate file system with the variable filename_HOST. For example, to put CUSTFILE into a specified RDBMS and everything else into EXTFH, you would add:
DEFAULT_HOST   EXTFH
CUSTFILE_HOST  name_of_file_system

where name_of_file_system is one of the following: Oracle or DB2.

How can I find out what an error message is?
If you run your application with the FILE_TRACE ACUFH configuration variable, you will receive extended error numbers that include those returned by your RDBMS application.
Note: For Oracle, if you are using the OERR command-line utility, the error code must include five digits. If your error code does not already include five digits, you must add leading zeros to complete this requirement. For example, if your error code is code number 150, the syntax for this option would be OERR ORA 00150.

If you have sent the errors to an output file with the FILE_TRACE ACUFH configuration variable, the run-time system will also attempt to include the text that explains the errors. See the example in the section "Run-time System Errors" in the chapter Performance and Troubleshooting.

Do my eXtended File Descriptor (XFD) files have to be in the same directory as my object files?
No. You can instruct the Compiler to put the XFD files in an alternate directory with the CREATEXFD directive. Then at run time, make sure you have the ACUFH configuration variable XFD_PREFIX set to include that same directory.
Why aren't my KEYs being retrieved in the correct order?
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 XFD directive in front of the key field. This allows 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 example, for Oracle databases, variables declared as binary are stored as raw fields. Refer to your database documentation for information specific to your data source or RDBMS.

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.
At run time, 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 (such as CUST0001, CUST0002, and CUST0003). It's not necessary to have a separate XFD for each file, as long as their record definitions are the same. The individual files can all be mapped to the same XFD via the ACUFH configuration variable 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 XFD 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 ACUFH configuration file:

XFD_MAP  CUST* = CUST

The asterisk (*) in the example is a wildcard that matches any number of characters. 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 Database Connector used with the run-time system.