Focal Point
How to lock .FOC from MODIFY

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/6271018331

December 06, 2004, 07:16 PM
<leftcoastuser>
How to lock .FOC from MODIFY
How can we lock old .FOC data files so that they cannot be inadvertently updated with MODIFY? Running on W2K.
December 06, 2004, 07:22 PM
drew billingslea
you might try to change the Windows file attributes to Read Only for those files

or

Add a USE to EDASPROF for each of those files with READ to make Focus use them read only

hth,

drew
December 06, 2004, 08:00 PM
susannah
Best to read chapter 9 in the manual "describing data". Page 9-3 describes Data base security.
You can set up in the master all sorts of security options, including who has the right to Update.
December 07, 2004, 11:20 AM
Carol Dobson
I had mutiple user's updated our Focus databases that needed modify access. I added code to each process, when the Focus Databases get's opened I wtite "Y" or "N" to a flag file (like update.flg)

Then I coded a check in the other modify programs to read the flag file before update and display a message the file is being updated by another user. Of course, you have to unlock the file at the end of the update.

I know it's an old fashioned approach but it works and keeps you from getting corrupt databases.

Good Luck,
Carol
December 07, 2004, 01:18 PM
<chris>
You can add a line to the ACX file which reads: WRITE=NO .
December 09, 2004, 12:30 PM
Carol Dobson
FOCUS Databases don't have Access File Descriptions!
December 09, 2004, 01:26 PM
<chris>
Yikes... sorry about that. WRITE=NO can be used only in ACX files and FOCUS files do not have ACX files.

Sorry for ay confusion that may have caused.
December 09, 2004, 02:35 PM
David Briars
Hi leftcoastuser,

I protect FOCUS databases from changes, by issuing the USE comand with the read parameter.

For example, in the z/OS environment:



DYNAM ALLOC DD CAR DS SYSID.FOCUS.CAR SHR REUSE
-RUN
USE
CAR READ
END

This will protect your file from updates via the FOCUS MODIFY command.

If you do not need operating system level security, this might be something to look at.

USE could be used in conjunction with the other techniques listed previously.

Regards,
Dave

This message has been edited. Last edited by: <Mabel>,