SAS Component Language Dictionary |
Validates a path string
rc= LNAMECHK(path-string);
|
-
rc
-
contains the return code for the
operation:
0 |
The path string is a valid path to a file. |
>0 |
The path string is not a valid path to a file. |
Type:
Numeric
-
path-string
-
is the string generated by LNAMEMK.
Type: Character
LNAMECHK validates that the specified
path string refers to an external file that exists. It does not determine
whether the file contains a readable image.
Test whether a file exists:
imgpath=lnamemk(2,fromdir,file)
rc=lnamechk(2,imgpath);
if (rc ne 0) then
do;
_msg_="File does not exist.";
end;
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.