contents.gifindex.gifprev1.gifnext0.gif

DBMaker: Common Questions and Answers

Question: I can't seem to get Acu4GL to create the files via DBMaker. 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 (for ACUCOBOL-GT Version 4.2 and later), and make sure that the version number of the DBMaker interface is reported. This tells you that the interface has been installed successfully. If -vv does not return the DBMaker interface 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 an DBMaker interface version number using -vv, you will have to create one by relinking the runtime.

If you need to do that, make sure that USE_DBMAKER is set to 1 in the file filetbl.c before you relink.

Question: Can I use both DBMaker and Vision at the same time?

Answer: Yes, you can. In the runtime 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 DBMaker and everything else into Vision, you would add:

DEFAULT-HOST Vision
CUSTFILE-HOST DBMAK

Question: Which files do I need in order to link my C routines into Acu4GL?

Answer: You will need everything in the LIB directory of your ACUCOBOL-GT runtime media.

From your Acu4GL media you need:

dbmak32.obj (Windows)
dbmaker.o (UNIX)

From CaseMaker you need:

libdmapic.a (UNIX)
dmapi30.lib (Windows)

Instructions for linking are given in the DBMaker UNIX installation topic of this appendix.

Question: How can I find out what the DBMaker error message is?

Answer: If you run your application with the -x option, you will receive secondary error numbers that include those returned by DBMaker, 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 the Troubleshooting topic of this appendix for additional details.

You can also retrieve error codes from within your COBOL program by using library routine C$RERR. See this appendix's Troubleshooting topic 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 -Zo 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.

Question: Can I open tables in different databases and share the data?

Answer: Yes. But you must set up the databases one at a time, as described in this topic.

Remember, you can set up databases dynamically at runtime by adding a line like this before the statement that opens the file:

SET ENVIRONMENT "A-DBM-DATABASE" TO "database name"

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.

This is the end of the DBMaker section. Click the Help Topics button at the top of this window to return to the Contents page.