I am looking for the correct way to pass a date in Date9. format from one source file (could be a text file) to another sas program file.
In my SAS program I have the following:
%MACRO Getdate;
DATA getDate;
infile 'h:\dates.txt';
input @1 date9.;
run;
%MEND Getdate;
The conent of the file dates.txt is something like this: 28JAN2014
I am not sure how to get this date out into a variable so that i can use it in another macro To set the start date and end date for a certain query.
Sorry I am new to SAS and am trying to learn it as quickly as possible just wanted to know how i might go around solving this problem.
symputfunction inside of your data step. You probably don't need a named dataset, you could just usedata _null_. - sasfrog