SA_FilePI
SA_FilePI enqueues one or more file control blocks providing exclusive access to the calling program.
int SA_FilePI ( SA_FH TxtFH[]);
Note the following:
This function will lock the files specified causing other programs using the Sunaccess modules or Sunbelt PL/B programs to wait until the locks are released before performing any file operations on the specified files.
It is only necessary to perform a SA_FilePI when a record is read and re-written (updated). If the SA_FilePI is performed prior to the read and released after the update, it is not possible for other processes to have accessed the files during that period.
Performing a SA_FilePIEnd terminates the enqueue.
Function return codes are as follows:
|
Value |
Meaning |
|
1 |
Success. |
|
0 |
No SA_FilePI in effect. |
|
-nn |
Error as described in Sunaccess Errors |
![]() |