Any help please? When displaying the variable vMonth, it is working but when concatenating it with the library name, the following issue is obtained.
Program:
%LET lastdaypreviousmonth = put(intnx('month', today(), -1, 'E'),mmyyn4.);
%LET vMonth = cats('RM',&lastdaypreviousmonth);
PROC SQL;
SELECT &vMonth,*
FROM MASU.&vMonth
WHERE nsgr = '040';
QUIT;
Log file :
27 %LET lastdaypreviousmonth = put(intnx('month', today(), -1, 'E'),mmyyn4.);
28 %LET vMonth = cats('RM',&lastdaypreviousmonth);
29
30 PROC SQL;
31
32 SELECT &vMonth,*
33 FROM MASU.&vMonth
34 WHERE nsgr = '040';
NOTE: PROC SQL set option NOEXEC and will continue to check the syntax of statements.
NOTE: Line generated by the macro variable "VMONTH".
34 MASU.cats('RM',put(intnx('month', today(), -1, 'E'),mmyyn4.))
_ _
79 79
200
ERROR 79-322: Expecting a ).
ERROR 200-322: The symbol is not recognized and will be ignored.