SAS Component Language Dictionary |
Decodes a path string
rc=LNAMEGET(path-string,type,<name-string1<,name-string2><,options>>);
|
-
rc
-
contains the return code for the operation:
0 |
successful |
>0 |
not successful |
Type:
Numeric
-
path-string
-
is the string generated by LNAMEMK.
Type: Character
-
type
-
is the type of the path. See LNAMEMK for more information. If no
other arguments are specified, the function returns only the type.
Type: Numeric
-
name-string
-
is the name-string
provided in LNAMEMK. Specify enough name-string
arguments for the type. See LNAMEMK for more information.
Type:
Character
-
options
-
are any options used with LNAMEMK.
Type: Character
Path strings that are created by LNAMEMK are not readable,
and their internal format may change from release to release. The only way to decode a path string is to use LNAMEGET.
You may find it useful to encode an
image filename with
LNAMEMK and to store that path string in a SAS data set. Then, later retrieve
the path string and use LNAMEGET to find the arguments that were originally
specified in LNAMEMK.
If you use the type, name-string, and options arguments, they are filled with the corresponding
arguments specified in LNAMEMK (such as the libref/member name, physical pathname,
and so on). The number of optional arguments that you specify must match the
number specified in LNAMEMK.
-
Encode and decode a pathname. Store the type of
path in TYPE, and store the pathname in IMGFILE.
imgpath=lnamemk(1,filename);
rc=lnameget(imgpath,type,imgfile);
-
Encode and decode the location of an image file.
Store the directory that contains the image file in DIR, and store the filename
in IMGFILE.
imgpath=lnamemk(2,dirname,filename);
rc=lnameget(imgpath,type,dir,imgfile);
LNAMECHK
LNAMEMK
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.