basic.retrieval.locks
Description of retrieval locks.
Description
overview of restricting access to accounts or files.
If any process, such as a TCL command or a Pick/BASIC program is executed from an account that does not have retrieval and/or update privileges for a file, and then attempts to read and/or write to that file, the process terminates with an error message indicating that the file is 'access protected'.
To read from or write to a retrieval/update protected file, the retrieval and update lock codes must match those of the file that is opened. This is a system function and cannot be accomplished from Pick/BASIC. If the file is retrieval protected, the file cannot be opened and the program will terminate.
Example
list payroll
At 'tcl', the following message occurs if 'payroll' is
access protected.
[210] File 'payroll' is access protected.
file payroll
If a file called 'payroll' has an access retrieval lock which does
not match the lock codes (keys) for the current user, this statement aborts the
program with the following message:
[210] in program 'enter-payroll', File 'payroll' is access
protected.
open 'payroll' to payroll.file else stop 201,'payroll'
If the file is access protected, the 'else' clause is taken and the
following message prints:
[201] 'payroll' is not a file name.
See Also
User Comments
What do you think?
Share your experience or ask a question by using the form below.
Login to leave your comments.
