Previous Page | Next Page

SAS Component Language Dictionary

LNAMECHK



Validates a path string
Category: Image

Syntax
Details
Example

Syntax

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


Details

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.


Example

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;

Previous Page | Next Page | Top of Page