Previous Topic Next topic Print topic


Library Names

You can include library names in a multiple path environment variable. For example, if you have issued the command

Windows:
set test=c:\apdir;d:\aplbr\aplbr.lbr;d:\aplbr\aplbr1.lbr
the filename $test\app.dat would be resolved to d:\aplbr\aplbr.lbr\app.dat if c:\apdir\app.dat did not exist.
UNIX:
set test=/apdir;/aplbr/aplbr.lbr;/aplbr/aplbr1.lbr
the filename $test/app.dat would be resolved to /aplbr/aplbr.lbr/app.dat if /apdir/app.dat did not exist.

The libraries are searched in the order they appear in the environment variable.

You can also specify a library as part of the search path for program calls. For example, if you have issued the command

Windows:
set appath=d:\apdir\progs1.lbr;d:\appdir\progs2.lbr 
UNIX:
set appath=/apdir/progs1.lbr;/appdir/progs2.lbr 

you can use the format

Windows:
call "$appath\prog"
UNIX:
call "$appath/prog"

Your COBOL development system will search the libraries progs1.lbr and progs2.lbr for the program prog1. The libraries are searched in the order they appear in the environment variable. Any library searched remains open during the execution of the application, unless the application itself explicitly closes it.

Previous Topic Next topic Print topic