Using the FILEVAR= Option

Overview

You can make the process of concatenating raw data files more flexible by using an INFILE statement with the FILEVAR= option. The FILEVAR= option enables you to dynamically change the currently opened input file to a new input file.
General form, INFILE statement with the FILEVAR= option:
INFILE file-specification FILEVAR= variable;
Here is an explanation of the syntax:
FILEVAR= variable
names a variable whose change in value causes the INFILE statement to close the current input file and open a new input file.
variable
contains a character string that is a physical filename.
When you use an INFILE statement with the FILEVAR= option, the file specification is a placeholder, not an actual ...

Get SAS Certification Prep Guide, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.