×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

FILENAME statement with %include

FILENAME statement with %include

FILENAME statement with %include

(OP)
Hello everyone,

After I reviewed the Http://www.technion.ac.il/docs/sas/lgref/z0214504.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

 

RE: FILENAME statement with %include

No FILENAME and %INCLUDE are two different concepts.  
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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close