SAS Log showing 3 methods of reading raw data files from your

SAS Log showing 3 methods of reading raw data files from your SASUniversityEdition shared folder location. In this set
of examples, the folder location is the “certprep” SAS library used for the Certification Prep Guides. And the “raw”
datafile is the BOOKDATA.DAT file.
1
42
43
44
45
46
47
OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
;
** Method 1: use a fully qualified path in the INFILE statement;
data book1;
infile '/folders/myfolders/certprep/bookdata.dat';
input booknum $ type $ numsold;
run;
NOTE: The infile '/folders/myfolders/certprep/bookdata.dat' is:
Filename=/folders/myfolders/certprep/bookdata.dat,
Owner Name=root,Group Name=root,
Access Permission=-rwxrwxrwx,
Last Modified=28Jun2014:15:48:43,
File Size (bytes)=1944
NOTE: 24 records were read from the infile '/folders/myfolders/certprep/bookdata.dat'.
The minimum record length was 80.
The maximum record length was 80.
NOTE: The data set WORK.BOOK1 has 24 observations and 3 variables.
NOTE: DATA statement used (Total process time):
real time
0.02 seconds
cpu time
0.02 seconds
48
49
50
51
proc print data=work.book1;
title 'Create dataset using method 1';
run;
NOTE: There were 24 observations read from the data set WORK.BOOK1.
NOTE: The PROCEDURE PRINT printed page 6.
NOTE: PROCEDURE PRINT used (Total process time):
real time
0.06 seconds
cpu time
0.07 seconds
52
53
54
55
56
57
58
59
60
61
** Method 2;
** use a fully qualified pathname in the FILENAME statement;
** and use only the FILEREF in your INFILE statement;
filename certex2 '/folders/myfolders/certprep/bookdata.dat';
data book2;
infile certex2;
input booknum $ type $ numsold;
run;
NOTE: The infile CERTEX2 is:
Filename=/folders/myfolders/certprep/bookdata.dat,
Owner Name=root,Group Name=root,
Access Permission=-rwxrwxrwx,
Last Modified=28Jun2014:15:48:43,
File Size (bytes)=1944
NOTE: 24 records were read from the infile CERTEX2.
The minimum record length was 80.
The maximum record length was 80.
NOTE: The data set WORK.BOOK2 has 24 observations and 3 variables.
NOTE: DATA statement used (Total process time):
real time
0.00 seconds
cpu time
0.00 seconds
62
63
64
65
proc print data=work.book2;
title 'Create dataset using method 2';
run;
NOTE: There were 24 observations read from the data set WORK.BOOK2.
NOTE: The PROCEDURE PRINT printed page 7.
NOTE: PROCEDURE PRINT used (Total process time):
real time
0.05 seconds
cpu time
0.04 seconds
66
67
68
69
70
71
72
73
74
75
76
** Method 3;
** use only the folder name in the FILENAME statement;
** and use a different reference method in the INFILE statement;
filename other3 '/folders/myfolders/certprep';
data book3;
infile other3(bookdata);
input booknum $ type $ numsold;
run;
NOTE: The infile library OTHER3 is:
Directory=/folders/myfolders/certprep,
Owner Name=root,Group Name=root,
Access Permission=drwxrwxrwx,
Last Modified=09Jan2015:16:54:32
NOTE: The infile OTHER3(bookdata) is:
Filename=/folders/myfolders/certprep/bookdata.dat,
Owner Name=root,Group Name=root,
Access Permission=-rwxrwxrwx,
Last Modified=28Jun2014:15:48:43,
File Size (bytes)=1944
NOTE: A total of 24 records were read from the infile library OTHER3.
The minimum record length was 80.
The maximum record length was 80.
NOTE: 24 records were read from the infile OTHER3(bookdata).
The minimum record length was 80.
The maximum record length was 80.
NOTE: The data set WORK.BOOK3 has 24 observations and 3 variables.
NOTE: DATA statement used (Total process time):
real time
0.01 seconds
cpu time
0.02 seconds
77
78
79
80
proc print data=work.book3;
title 'Create dataset using method 3';
run;
NOTE: There were 24 observations read from the data set WORK.BOOK3.
NOTE: The PROCEDURE PRINT printed page 8.
NOTE: PROCEDURE PRINT used (Total process time):
real time
0.05 seconds
cpu time
0.06 seconds
81
82
83
84
94
;
OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
;