code:
%macro vmfsumm(qtrloc);
%let yymm = %sysfunc(intnx(month,%sysfunc(today()),-1),yymmd7.) ;
%if qtrloc = SysProd %then %let qtr = &yymm.Prod;
%else %if qtrloc = SysDev %then %let qtr = &yymm.Rgrs;
%else %let qtr = &yymm.TestNS;
%let qtrdata = &yymm.Prod;
%let prqdate= %sysfunc(intnx(month,%sysfunc(today()),-3,E),date9.);
%let valdate= %sysfunc(intnx(month,%sysfunc(today()),-1,E),date9.);
*%let crntdate= %sysfunc(intnx(month,%sysfunc(today()),-1,E),worddate17.);
%let dpryrend= %sysfunc(intnx(month,%sysfunc(today()),-9,E),date9.);
%let valm = %sysfunc(intnx(month,%sysfunc(today()),-1),month2.);
%let crntyear = %sysfunc(intnx(month,%sysfunc(today()),-1),year2.);
%let rawdata = jap&valm.&crntyear..dat;
%put &qtrloc &yymm &qtr &prqdate &valdate &crntdate &dpryrend &valm &crntyear &rawdata;
%include "I:\&qtrloc\LifeMaster\&qtr\Programs\Standard\SASCodeIncludes\lib077.mac";
%include &dates;
%dates(datejap);
filename lfcmextr "I:\SysProd\LifeMaster\2009-12Prod\RawData\jap1209.dat";
proc printto log = "I:\&qtrloc\LifeMaster\&qtr\Programs\Standard\Japan\VMFsumm.log" new
print = "I:\&qtrloc\LifeMaster\&qtr\Programs\Standard\Japan\VMFsumm.lst" new;
footnote "Program: I:\&qtrloc\LifeMaster\&qtr\Programs\Standard\Japan\VMFsumm.sas";
footnote2 "Output: I:\&qtrloc\LifeMaster\&qtr\Programs\Standard\Japan\VMFsumm.lst";
%mend vmfsumm;
%vmfsumm(SysTest);
log:
SYMBOLGEN: Macro variable YYMM resolves to 2009-12
SYMBOLGEN: Macro variable YYMM resolves to 2009-12
SYMBOLGEN: Macro variable VALM resolves to 12
SYMBOLGEN: Macro variable CRNTYEAR resolves to 09
SYMBOLGEN: Macro variable QTRLOC resolves to SysTest
SYMBOLGEN: Macro variable YYMM resolves to 2009-12
SYMBOLGEN: Macro variable QTR resolves to 2009-12TestNS
SYMBOLGEN: Macro variable PRQDATE resolves to 31OCT2009
SYMBOLGEN: Macro variable VALDATE resolves to 31DEC2009
SYMBOLGEN: Macro variable CRNTDATE resolves to Dec 31, 2009
SYMBOLGEN: Macro variable DPRYREND resolves to 30APR2009
SYMBOLGEN: Macro variable VALM resolves to 12
SYMBOLGEN: Macro variable CRNTYEAR resolves to 09
SYMBOLGEN: Macro variable RAWDATA resolves to jap1209.dat
SysTest 2009-12 2009-12TestNS 31OCT2009 31DEC2009 Dec 31, 2009 30APR2009 12 09 jap1209.dat
WARNING: Apparent symbolic reference DATES not resolved.
ERROR: Incorrect %INCLUDE statement will not be executed. There is a syntax error.
ERROR: Incorrect %INCLUDE statement will not be executed. There is a syntax error.
ERROR: Incorrect %INCLUDE statement will not be executed. There is a syntax error.
NOTE: Line generated by the invoked macro "VMFSUMM".
572 %include "I:\&qtrloc\LifeMaster\&qtr\Programs\Standard\SASCodeIncludes\lib077.mac"; %include &dates;
572 ! %dates(datejap); filename lfcmextr "I:\SysProd\LifeMaster\2009-12Prod\RawData\jap1209.dat"; proc printto log =
_
_
_
180
180
180
ERROR 180-322: Statement is not valid or it is used out of proper order.
ERROR 180-322: Statement is not valid or it is used out of proper order.
ERROR 180-322: Statement is not valid or it is used out of proper order.
WARNING: Apparent invocation of macro DATES not resolved.
WARNING: The Base Product product with which PRINTTO is associated will expire within 30 days. Please contact your SAS
installation representative to have it renewed.
SYMBOLGEN: Macro variable QTRLOC resolves to SysTest
SYMBOLGEN: Macro variable QTR resolves to 2009-12TestNS
SYMBOLGEN: Macro variable QTRLOC resolves to SysTest
SYMBOLGEN: Macro variable QTR resolves to 2009-12TestNS
SYMBOLGEN: Macro variable QTRLOC resolves to SysTest
SYMBOLGEN: Macro variable QTR resolves to 2009-12TestNS
SYMBOLGEN: Macro variable QTRLOC resolves to SysTest
SYMBOLGEN: Macro variable QTR resolves to 2009-12TestNS