External Files |
To reference a file directly in a SAS statement or command, specify in quotation marks its physical name, which is the name by which the operating environment recognizes it, as shown in the following table:
External File Task | Tool | Example | |
---|---|---|---|
Specify the file that contains input data. | INFILE |
data weight; infile 'input-file'; input idno $ week1 week16; loss=week1-week16; |
|
Identify the file that the PUT statement writes to. | FILE |
file 'output-file'; if loss ge 5 and loss le 9 then put idno loss 'AWARD STATUS=3'; else if loss ge 10 and loss le 14 then put idno loss 'AWARD STATUS=2'; else if loss ge 15 then put idno loss 'AWARD STATUS=1'; run; |
|
Bring statements or raw data from another file into your SAS job and execute them. | %INCLUDE | %include 'source-file'; |
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.