FILENAME statement with %include
FILENAME statement with %include
(OP)
Hello everyone,
After I reviewed the Htt p://www.te chnion.ac. il/docs/sa s/lgref/z0 214504.htm reference, I got still confused about the FILENAME concept which I had never used before (and which I just had happened to see in somebody's code that I needed to modify.
Does FILENAME statement means that one can keep multiple files under the same storage using %include ?
Then I still do not understand... why not to use library statement instead for each file? Is it a kind of alternative? Or library statement lacks something that Filename with later %include does ?
Thanks in advance,
Iren
After I reviewed the Htt
Does FILENAME statement means that one can keep multiple files under the same storage using %include ?
Then I still do not understand... why not to use library statement instead for each file? Is it a kind of alternative? Or library statement lacks something that Filename with later %include does ?
Thanks in advance,
Iren
RE: FILENAME statement with %include
One is a MACRO substitution and the other is a BASE SAS statement.
You use the %include (or %inc) statements for instances where you would like to include the code segment (at the include location) in your program. Think of it as a text substitution (as in the PERL language). SAS takes the file located at the pointed location and reads it into the environment and executes the lines found as if it was written in your calling program.
The FILENAME statment is used in a SAS program to read in data. The SAS program can use the file found at the location as it would a SAS dataset.
Hope this helps you,
Klaz