I want to assign these table values to macro variables:
This is how I assign the table value to the macro variable:
PROC SQL;
CREATE TABLE Format_YYYYMM_tbl AS
SELECT t1.str_perdag_SAS_default FORMAT=YYMMN6. AS Format_YYYYMM,
("'"!!put(t1.str_perdag_SAS_default, YYMMN6.)!!"'") AS Format_YYYYMM_quo
FROM DATOSTAMP t1;
QUIT;
PROC SQL NOPRINT;
SELECT DISTINCT
Format_YYYYMM,
Format_YYYYMM_quo
INTO :Format_YYYYMM,
:Format_YYYYMM_quo
FROM Format_YYYYMM_tbl;
QUIT;
The issue is when I print the values in the log i get the following and not the value in the table:
49 %put Format_YYYYMM_quo;
Format_YYYYMM_quo
50 %put Format_YYYYMM;
Format_YYYYMM
What am I doing wrong? I hope you can point me in the right direction.
