Quantcast
Channel: Visual COBOL - Forum - Recent Threads
Viewing all articles
Browse latest Browse all 4356

RE: Record Locking in Visual Cobol

$
0
0

I don't think there is a compiler directive, but there is a file handler configuration option for ignoring locks at run time when a file is open for input.  The default name for the file handler configuration file is extfh.cfg or you can set the EXTFH environment variable to point to a file of your choosing, as in, "set EXTFH=c:\mydir\test.cfg".  The format of the configuration file is explained in the documentation (square backets surround tags).  There are tagged sections that let you set an option based on the file's extension, file's folder,  file's name, file's path and name,   An example would be, if all your data files are in folder c:\files\app1datafiles\, then the configuration file would contain (note the doubled "\" characters):

[FOLDER:C:\\files\\appl1datafiles]
IGNORELOCK=ON

or, if the files all have the same extension ".inx":

[*.inx]
IGNORELOCK=ON

The configuration file could be added to the customer site(s) without having to redistribute your application.  (I know still a nuisance, but likely easier than a full distribution.)

Here's the documentation on the IGNORELOCK configuration option:

IGNORELOCK

The IGNORELOCK option specifies whether to ignore locks when reading files open for input.

Syntax:

IGNORELOCK= { ON } { OFF }

Parameters:

ON
Ignore locks when reading files open for input.
OFF
Do not ignore locks when reading files open for input.

Properties:

Default:OFF

Viewing all articles
Browse latest Browse all 4356

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>