Previous Page | Next Page

SAS Component Language Dictionary

LNAMEMK



Makes a path string for an image file
Category: Image

Syntax
Details
Example
See Also

Syntax

path-string=LNAMEMK(type,<name-string1<,name-string2><,attributes>>);

path-string

contains a packed string containing information about the file path and format. Declare a length of at least 300 characters.

Type: Character

type

is a number from 1 through 5 that specifies the type of path used to read the external file.

Type: Numeric

name-string

is the string that identifies the location of the image. The specification depends on the value specified for type.

For type use name-string1 and name-string2
1 physical-pathname
2 directory-pathname filename
3 fileref
4 fileref filename
5 libref.catalog.member

Type: Character

attributes

specify file-specific attributes. See File Types and Attributes for Reading Image Files for possible choices. The FORMAT= attribute must be specified for Targa images, for images residing in SAS catalogs, and for host-specific formats. FORMAT is not required in other cases, but it is always more efficient to specify it.

Type: Character


Details

LNAMEMK creates a character variable that contains information about the location of the image as well as other image attributes.

The path string can be used with the READ and WRITE commands in IMGOP or with the image object. The path string contains binary data and can be decoded only with the LNAMEGET and LNAMECHK functions.


Example

Create path strings for image files:

length file $ 200;

file=lnamemk(1,filename,'format=gif');
file=lnamemk(2,directory,filename,'format=gif');
file=lnamemk(3,fileref,'format=gif');
file=lnamemk(4,fileref,filename,'format=gif');

imgentry=libref||"."||catalog||"."||member;
file=lnamemk(5,imgentry,'format=cat');


See Also

IMGOP

LNAMECHK

LNAMEGET

Previous Page | Next Page | Top of Page