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 don't need to do anything more to access the file. However, if you want to access files that are owned by other users on the system and do not have public synonyms, you must provide the run time system with information on how to locate these files.

The USER_PATH ACUCOBOL-GT run-time system configuration file variable is used by the run time system to locate files. The syntax for this variable is:

USER_PATH  user1 [user2]...

where the user argument may be either 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 attempt to open for I/O the file myfile, the run time system uses 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.