contents.gifindex.gifprev1.gifnext1.gif

Oracle: Setting Up the Search Path

If you own a file because you created it with OPEN OUTPUT from COBOL, or because you created it using SQL, you will not need to do anything additional to access the file. However, if you want to access files which are owned by other users on the system and do not have public synonyms, you must provide the runtime with information on how to locate these files.

The USER-PATH configuration variable is used by the runtime to locate files. It functions in much the same way as ACUCOBOL-GT's FILE-PREFIX variable (see the ACUCOBOL-GT User's Guide, Chapter 2, Compiler and Runtime) The syntax for this variable is:

USER-PATH user1 [user2]...

Where the user argument may either be the name of a user on the system, or a period (.), which indicates the files owned by yourself. For example, if you have the following settings:

ORA-LOGIN = OPS$ORACLE

ORA-PASSWD = DATA_FERIT

USER-PATH = barbara scott.

and then attempted to open for I/O the file myfile, the runtime would use the following search path:

OPEN I-O barbara.myfile

OPEN I-O scott.myfile

OPEN I-O ops$oracle.myfile

Remember that another option for allowing access to a file to all users on the system is to create a public synonym for the file.