What is the difference between Libname and FILENAME in SAS?
The difference between a libname statement and a filename statement is that filename associates an alias to the specific file or group of files rather than to a directory. Assigning a filename alias to a file is good programming practice, although the file can also be referred by its full name within the data step.
How do I reference a macro in SAS?
After a macro variable is created, you typically use the variable by referencing it with an ampersand preceding its name (&variable-name), which is called a macro variable reference. These references perform symbolic substitutions when they resolve to their value. You can use these references anywhere in a SAS program.
What is a SAS Fileref?
A fileref is a logical name associated with an external file. You can assign a fileref with a File Shortcut in the SAS Explorer window, the My Favorite Folders window, the FILENAME statement, the FILENAME function, or you can use a Windows environment variable to point to the file.
Why is FILENAME statement useful?
Through specification of the appropriate device type, the FILENAME statement allows you to symbolically reference external disk files, interact with FTP servers, send e-mail messages, and integrate data from external programs and processes—including the local operating system and remote web services.
Which is macro variable name delimiter?
Delimiting Macro Variable Names within Text A period immediately following a macro variable reference acts as a delimiter; that is, a period at the end of a reference forces the macro processor to recognize the end of the reference. The period does not appear in the resulting text.
How do I use a macro variable as a string?
To reference a macro variable in a literal string, use the SAS macro function %TSLIT. %TSLIT overrides the need for double quotation marks around the literal string and puts single quotation marks around the input value.
What is put statement?
The PUT statement is a STREAM output data transmission statement that can transmit values to a stream output file or assign values to a character variable. Use the following syntax of the PUT statement when dealing with stream output files.
What’s an external file?
An external file exists for a program when a program creates that file, or the file is available to that program for reading and writing. Deleting an external file ends the existence of that file. An external file can exist and contain no records.
What are SAS libraries?
A SAS library is a collection of one or more SAS files that are recognized by SAS and that are referenced and stored as a unit. You reference a SAS library by a logical name called a libref.