


Question: I can't seem to get Acu4GL to create the files in Sybase. 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.
Use the runtime's "-vv" option and make sure that the version number of the Sybase Acu4GL product is reported (for example, if your runtime were named runcbl, you would type runcbl -vv). This tells you that the Acu4GL product has been installed successfully.
If "-vv" does not return the Sybase Acu4GL product information, make sure the linked runtime has the name you used, and is the first so-named executable on the PATH.
If you cannot locate a runtime that displays a Sybase Acu4GL product version number using "-vv", you must create one by re-linking the runtime. If you must do that, make sure that USE_SYBASE is set to "1" in the file filetbl.c before you re-link.
Question: What files do I need in order to link my C routines into Acu4GL?
Answer: Relinking is not necessary on Windows platforms. To add your own C routines to the runtime, relink the runtime as discussed in the runtime manual. You do not need to add anything special to use Acu4Gl for Sybase.
(UNIX only)
all files in the lib subdirectory of your ACUCOBOL-GT distribution
sub.c
sub85.c
filetbl.c
config85.c
sub.h
From your Acu4GL media you need:
sybase.o
From Sybase you need the platform-specific Open Client DB-Library/C product.
Instructions for linking are given in the installation portion of this appendix.
Question: How can I find out what the Sybase error message is?
Answer: If you run your application with the "-x" option, you will receive secondary error numbers that include those returned by Sybase, in addition to the ACUCOBOL-GT error.
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 section E.8.1, "Acu4GL for Sybase: Runtime Errors", for additional details.
You can also retrieve error codes from within your COBOL program by using library routine C$RERR. See section E.8.1, "Acu4GL for Sybase: 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 runtime configuration file variable XFD_DIRECTORY set to that same directory.
Question: Why aren't my keys being retrieved in the correct order?
Answer: You may have illegal data in the field. For example, if you've used LOW-VALUES or HIGH-VALUES in a numeric key to mark control records, those values are considered invalid and can cause the records containing them to be retrieved in an unexpected sequence.
Signed numeric data in key fields can also be a problem; the records may not sort, or be retrieved, in the same sequence as under the Vision file system.
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.
Question: When I try to open a file for output, I get the error 9D,2714. There is already an object named * in the database. Why?
Answer: One of your record's data items probably has the same name as a Sybase reserved word. Locate the column by comparing a file trace of the CREATE TABLE to Sybase's list of reserved words. Apply the NAME directive to the field in the FD that is associated with the invalid column, then recompile the program to create a new XFD file.
Question: Can I open tables in different databases?
Answer: Yes. Use a file name like:
database.owner.tablename
Note that, because Acu4GL for Sybase automatically determines an owner, you can also specify a file name like "database..tablename". The two dots are mandatory in this case.
Question: Can I use multiple servers (on the same machine or on different machines) on my network?
Answer: Yes. Each server has a unique name. To see if the necessary setup has been done, enter:
isql -S servername
If this connects you to the server you want, you can open tables on that server by giving them a name like servername.database.owner.tablename. Note that this naming can be done in your runtime configuration file.
Question: I'm getting an error 9D,11 ACUCOBOL-GT lock table missing. I know that I added the lock table during installation.
Answer: This is probably a permissions problem. All users must have READ, WRITE, UPDATE, and DELETE access to AcuLocks (and therefore to the database that contains it). Be sure to check your permissions.
Question: I keep receiving an error message saying that my login is invalid. But I'm sure I'm using the correct username and password.
Answer: All usernames, passwords, and database names are case sensitive. Be sure that you are typing the names exactly as they are set up.
Question: The runtime system can't seem to locate my XFD file, but when I check the XFD directory, the file is definitely there.
Answer: Check the case of the XFD filename. The Acu4GL product may be looking for upper case on the base name.
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 |
| 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 |
Question: Are there any ACUCOBOL-GT library routines that do not work with or would not make sense to use with Acu4GL for Sybase?
Answer: Yes. There are two ACUCOBOL-GT library routines that either don't work with or do not make sense to use with Acu4GL for Sybase: C$COPY and C$RECOVER.