SAS Learnings
SAS Learnings
If informats are instructions for reading data, then you can view formats as instructions for outputting
data. Using the data provided above, we will review how to use some formats that SAS provides
SQL vs SAS
TERMINOLOGY
PROC FREQ
proc freq data=dataset_name;
table variable_one variable_two …;
run;
PROC SQL
proc sql;
sql_syntax…;
quit;
DATA SET
data destination_dataset_name;
set source_dataset_name;
logic…;
run;
PROC IMPORT
proc import;
datafile = “location_of_file_to_be_imported”
dbms = “filetype”
out = “dataset_to_store_data_imported”
replace;
getnames=yes; (in case of excel files to set first row as
variable names)
run;
PROC EXPORT
proc import;
data = “dataset_to_store_data_exported”
outfile = “location_of_file_to_be_exported_to”
dbms = “filetype”
replace;
run;
IMPORTANT FUNCTIONS in SAS