Referencing External Files Directly

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:

Table 39.1: Referencing External Files Directly

External File Task



Specify the file that contains input data.


  data weight;   infile '    input-file    ';   input idno $ week1 week16;   loss=week1-week16;  

Identify the file that the PUT statement writes to.


  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 '    source-file'    ;  

SAS 9.1 Language Reference. Concepts
SAS 9.1 Language Reference Concepts
ISBN: 1590471989
EAN: 2147483647
Year: 2004
Pages: 255 © 2008-2017.
If you may any questions please contact us: