NET/MASTER Network Control Language (NCL) Reference Manual

&SYS.FILE.ERROR
System Variables
5–38 106126 Tandem Computers Incorporated
&SYS.FILE.ERROR The &SYS.FILE.ERROR system variable contains a Guardian file system error. When
use of a FILE verb (other than FILE OPEN, FILE CLOSE, or FILE SET) returns a
Guardian file system error, &SYS.FILE.ERROR contains the error number.
&SYS.FILE.ERROR
Considerations
Except for the FILE OPEN, FILE CLOSE, and FILE SET verbs, NCL additionally
sets the &SYS.FILE.RC system variable to 8 whenever a FILE verb encounters a
Guardian file system error.
See also &SYS.FILE.RC, which contains the return code of a file processing
function.
For more information on Guardian file system errors, refer to the Guardian
Procedure Errors and Messages Manual.
Example
In the following example, a procedure (FILE1) opens a file, reads a record, and
displays the &SYS.FILE.ERROR and &SYS.FILE.RC system variables:
FILE1:PROCEDURE
/* open the file TEST1 */
FILE OPEN ID=TEST1
/* then read that record */
FILE GET OPT=SEQ ARGS
SAY &SYS.FILE.RC "IS THE FILE ERROR CODE"
SAY &SYS.FILE.ERROR " IS THE GUARDIAN FILE ERROR"
IF &SYS.FILE.RC = 8 AND &SYS.FILE.ERROR = 73 THEN
SAY "Record was LOCKED"
END FILE1