When you use the reference:
[pre]
... data='c:\SAS\mydata';
[/pre]
It would be the same as if you had coded:
[pre]
... data='c:\SAS\mydata.sas7bdat';
[/pre]
(the file type of .sas7bdat is provided by SAS)
This ability to directly address SAS datasets by their "operating system name" instead of the 2-level SAS name is a feature that will not work on all operating systems.
A method of referencing SAS datasets that will work on all operating systems is to use a LIBNAME statement that points to an operating system storage location and then to use a 2-level dataset to create or reference a SAS dataset in that location.
[pre]
libname perm 'c:\sas';
...data=perm.mydata;
[/pre]
As previously explained, understanding how the LIBNAME statment works is fundamental to understanding how to successfully write SAS programs. A 1-level name creates a dataset in or reads a dataset from the WORK library however, a 2-level name creates a dataset in or reads a dataset from a permanent SAS data library (the physical location specified in the LIBNAME statement).
A .SAS file is an ASCII text file of SAS programming statements. A .SAS file -might- contain a DATALINES section to create a SAS dataset -- but a .SAS program code file is not the same as a proprietary SAS dataset. A .SAS7BDAT file is a SAS dataset that contains data stored in a proprietary format for SAS datasets.
All of the references from previous postings still apply. In order to create a permanent SAS dataset you must several possible techniques. For example, all 3 of these program steps achieve the same results -- I want to create a permanent output dataset (in C:\courses directory) with only Female students from SASHELP.CLASS:
[pre]
libname perm 'c:\courses';
data perm.females;
set sashelp.class;
if sex = 'F' then output;
run;
proc sort data=sashelp.class out=perm.females2;
by sex;
where sex = 'F';
run;
proc sql;
create table perm.females3 as
select *
from sashelp.class
where sex = 'F';
quit;
[/pre]
Each of those steps create a dataset that contains only the observations for female students from SASHELP.CLASS. The next time I need to run an analysis, if I only want to use the observations for the female students, then I could use PERM.FEMALES, PERM.FEMALES2 or PERM.FEMALES3. However, if I wanted to run an analysis for males and females, then I would use the original file, SASHELP.CLASS.
I sincerely suggest that you read the documentation previously posted on the fundamentals of working with SAS datasets. It will be very hard for you to continue to work with SAS programs and SAS datasets if you do not understand the fundamentals of working with SAS datasets.
cynthia