Trailing-Edge
-
PDP-10 Archives
-
LCG_Integration_Tools_Clearinghouse_T20_v7_30Apr86
-
tools/com/check.com
There are 3 other files named check.com in the archive. Click here to see a list.
$ save_Verify := 'F$Verify(0)
$!
$! CHECK file [return] - Checks to see if file exists
$! - if p2 is non-null success or failure is
$! returned in CHECK_ERROR
$ if p1 .eqs. "" Then goto ERROR
$!
$ file := 'p1'
$ if f$locate("+",p1) .ne. f$length(p1) then goto END
$!
$!
$ file := 'f$search(p1,1)' !in case of wild card
$ if file .eqs. "" Then Goto ERROR
$!
$ Open/Read/Error=error temp 'file' !try to open the file
$ Close temp
$!
$END:
$ Check_Error :== 0
$ save_Verify := 'F$Verify(Save_Verify)
$ Exit !return to caller
$!
$!
$ERROR:
$ Check_Error :== 1
$ WRITE sys$output "%Error, File ""''p1'"" not found."
$ save_Verify := 'F$Verify(Save_Verify)
$ If p2 .eqs. "" Then STOP !all levels of command procedures
$ EXIT !give an error return.