Restriction: This topic applies only when a Database Connectors license has been installed via the
Micro Focus License Management System.
The following 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
ACUFH configuration file to create the files in my database. They keep coming up as indexed files.
- Check to see that you have the correct IDXFORMAT in effect. Specify it in the source code, on the command line or in the project properties during compilation, or at run time in an EXTFH configuration file.
- Can I use both an RDBMS and the Micro Focus EXTFH file system at the same time?
- Yes, you can. In fact, you can configure both from the same EXTFH configuration file. For example, the following excerpt shows that any files within the two specified folders are configured to use their respective formats, and any other files are configured to use IDXFORMAT 8:
[XFH-DEFAULT]
IDXFORMAT=8
[FOLDER:C:\\files\\db2]
IDXFORMAT=20
[FOLDER:C:\\files\\oracle]
IDXFORMAT=19
See
Configuring the File Handler for more information.
- How can I find out what an error message is?
- If you run your application with the
FILE_TRACE
ACUFH configuration file variable, you 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 is OERR ORA 00150.
If you have sent the errors to an output file with the
FILE_TRACE ACUFH configuration variable, the run time system also attempts to include text that explains the errors. See the example in the section
Runtime 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 file 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 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, use this same XFD, enter the following in your 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 with the run time system.
- I'm unsuccessful in trying to create a table in MSSQL Server, and when I check the trace log, I find the following "File Error:9k":
-
ssinit_connection sss
-
Trying to open a connection to server
MyBadServer
-
report_status called from 1176
-
[1] 08001 17 – [DBNETLIB]SQL Server does not exist or access denied.
-
[2] 01000 53 – [DBNETLIB]ConnectionOpen (Connect()).sssssss
- where
MyBadServer is the value set in my configuration file for
A-MSSQL-DEFAULT-CONNECTION.
- You might be using the wrong server name in the
A-MSSQL-DEFAULT-CONNECTION variable. One way you can verify the server name is by following the steps below. This method is useful if you don't have the client tools for SQL Server installed.
- Create a new ODBC Datasource for SQL Server.
- When prompted for the server name, select your local server from the drop-down list of available servers.
- Connect to this server using ODBC Administrator.
This gives the server name you need to use in the
A-MSSQL-DEFAULT-CONNECTION variable.