ContentsIndexPreviousNext

C.2.8 Acu4GL for 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 do not 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 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 Chapter 2 in Book 1, User's Guide of the ACUCOBOL-GT compiler documentation). 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 attempt to open for I/O the file myfile, the runtime 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.