BookmarkSubscribeRSS Feed
Nietzsche
Lapis Lazuli | Level 10

Hi

I am running the following code from Programming 1.

Ben_in_Canberra_0-1665791765895.png

 

I changed the datafile to file, the result seems to be exact the same.

is there any difference between DATAFILE and FILE?

 

SAS Base Programming (2022 Dec), Preparing for SAS Advanced Programming (Cancelled).
5 REPLIES 5
Nietzsche
Lapis Lazuli | Level 10
nothing, just ran like normal.
SAS Base Programming (2022 Dec), Preparing for SAS Advanced Programming (Cancelled).
Nietzsche
Lapis Lazuli | Level 10

here are the two logs, I can't see any difference.

 1          OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 70         
 71         proc import file="/home/u62043935/EPG1V2/data/eu_sport_trade.xlsx"
 72         dbms=xlsx
 73         out=eu_sport_trade
 74         replace;
 75         run;
 
 NOTE: One or more variables were converted because the data type is not supported by the V9 engine. For more details, run with 
       options MSGLEVEL=I.
 NOTE: The import data set has 6816 observations and 6 variables.
 NOTE: WORK.EU_SPORT_TRADE data set was successfully created.
 NOTE: PROCEDURE IMPORT used (Total process time):
       real time           0.40 seconds
       user cpu time       0.40 seconds
       system cpu time     0.00 seconds
       memory              3210.25k
       OS Memory           30632.00k
       Timestamp           15/10/2022 09:21:09 PM
       Step Count                        24  Switch Count  2
       Page Faults                       0
       Page Reclaims                     944
       Page Swaps                        0
       Voluntary Context Switches        19
       Involuntary Context Switches      0
       Block Input Operations            0
       Block Output Operations           1032
       
 
 76         
 77         OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 88         

 

1          OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 70         
 71         proc import datafile="/home/u62043935/EPG1V2/data/eu_sport_trade.xlsx"
 72         dbms=xlsx
 73         out=eu_sport_trade
 74         replace;
 75         run;
 
 NOTE: One or more variables were converted because the data type is not supported by the V9 engine. For more details, run with 
       options MSGLEVEL=I.
 NOTE: The import data set has 6816 observations and 6 variables.
 NOTE: WORK.EU_SPORT_TRADE data set was successfully created.
 NOTE: PROCEDURE IMPORT used (Total process time):
       real time           0.39 seconds
       user cpu time       0.39 seconds
       system cpu time     0.00 seconds
       memory              3178.87k
       OS Memory           30888.00k
       Timestamp           15/10/2022 09:22:25 PM
       Step Count                        30  Switch Count  4
       Page Faults                       0
       Page Reclaims                     618
       Page Swaps                        0
       Voluntary Context Switches        34
       Involuntary Context Switches      0
       Block Input Operations            0
       Block Output Operations           1032
       
 
 76         
 77         OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 88         
SAS Base Programming (2022 Dec), Preparing for SAS Advanced Programming (Cancelled).
Patrick
Opal | Level 21

FILE is an Alias for DATAFILE - but if you look into a current SAS documentation you only find DATAFILE so use this name. 

SAS is highly backward compatible and therefore many things still work even though you might no more find it documented for newer versions.

 

SAS EG shows me the following:

Patrick_0-1665810993307.png

 

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 5 replies
  • 824 views
  • 0 likes
  • 3 in conversation