Hello,
I have a SAS dataset which contains monthly customer information (variable examples below).
Customer Date Jan16 Feb16 Mar16 Apr16 .....................
For a SAS project I have to input the reporting date to be used to restrict the dataset (&mon. 01Jun2016 for example).
PROC SQL;
CREATE TABLE TEST AS
SELECT *
FROM HAVE
WHERE DATE <= "&mon."d;
QUIT;
I want to use this reporting date within the where clause of a step rather then inputting manually. For example for 01Jun2016 variable I want the following step using JUN2016:
PROC SQL;
CREATE TABLE WANT AS
SELECT *
FROM HAVE
WHERE JUN2016 = .;
QUIT;
How do I turn the inputted prompt character into a variable without the need for manual intervention? I hope I have explained it clearly!