O'Reilly logo

SAS Certification Prep Guide, 4th Edition by SAS Institute

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required