BookmarkSubscribeRSS Feed
Timbim
Obsidian | Level 7

Hi Community,

 

I am new to SAS Macro.  I am debugging a code at the moment  and having trouble trying to determine where the dates are coming from.

 

How do I find out where the dates are coming from? Appreciate your help

 

Below is the macro that is pulling the dates:

 

%DetermineLoadDate(DefaultLoadPeriod=YESTERDAY);

 

Below are the results from the log when running the above macro:

 

SYMBOLGEN: Macro variable DATEUSEDFLAG2 resolves to SPECIFIED

 

 

SYMBOLGEN: Macro variable DATEUSEDFLAG2 resolves to SPECIFIED

 

 

SYMBOLGEN: Macro variable DATEPASSED resolves to 21494

SYMBOLGEN: Macro variable DATE resolves to 21494

SYMBOLGEN: Macro variable DATE resolves to 21494

SYMBOLGEN: Macro variable DATE resolves to 21494

SYMBOLGEN: Macro variable DATE resolves to 21494

SYMBOLGEN: Macro variable CALYEAR resolves to year(21494)

SYMBOLGEN: Macro variable CALMONTH resolves to month(21494)

SYMBOLGEN: Macro variable DATEPASSED resolves to 21494

SYMBOLGEN: Macro variable DATE resolves to 21494

SYMBOLGEN: Macro variable DATE resolves to 21494

SYMBOLGEN: Macro variable CALMONTH resolves to month(21494)

SYMBOLGEN: Macro variable DATEUSEDFLAG2 resolves to SPECIFIED

 

 

SYMBOLGEN: Macro variable FMTH resolves to month

SYMBOLGEN: Macro variable CYR resolves to cyr

SYMBOLGEN: Macro variable FYR resolves to input(year,4.)

SYMBOLGEN: Macro variable CYR resolves to cyr

SYMBOLGEN: Macro variable FYR resolves to input(year,4.)

SYMBOLGEN: Macro variable CMTH resolves to cmth

SYMBOLGEN: Macro variable FMTH resolves to month

SYMBOLGEN: Macro variable DATEUSEDFLAG2 resolves to SPECIFIED

 

 

SYMBOLGEN: Macro variable DATEPASSED resolves to 21494

SYMBOLGEN: Macro variable DATEPASSED resolves to 21494

SYMBOLGEN: Macro variable DATEPASSED resolves to 21494

SYMBOLGEN: Macro variable DATEPASSED resolves to 21494

SYMBOLGEN: Macro variable DATEPASSED resolves to 21494

SYMBOLGEN: Macro variable DATEPASSED resolves to 21494

SYMBOLGEN: Macro variable DATEPASSED resolves to 21494

SYMBOLGEN: Macro variable DATEPASSED resolves to 21494

SYMBOLGEN: Macro variable DATEPASSED resolves to 21494

NOTE: Numeric values have been converted to character values at the places given by: (Line):(Column).

16:59 16:183

NOTE: Character values have been converted to numeric values at the places given by: (Line):(Column).

3 The SAS System 14:25 Wednesday, November 7, 2018

16:119 16:211

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.02 seconds

 

SYMBOLGEN: Macro variable DAY_DATE9 resolves to 06NOV2018

SYMBOLGEN: Macro variable YEARTO resolves to 31AUG2019

SYMBOLGEN: Macro variable DAY_DATE9 resolves to 06NOV2018

SYMBOLGEN: Macro variable DAY_DATE9 resolves to 06NOV2018

SYMBOLGEN: Macro variable DAY_DATE9 resolves to 06NOV2018

SYMBOLGEN: Macro variable YEARFROM resolves to 01SEP2018

SYMBOLGEN: Macro variable YEARFROM resolves to 01SEP2018

SYMBOLGEN: Macro variable YEARFROM resolves to 01SEP2018

SYMBOLGEN: Macro variable YEARFROM resolves to 01SEP2018

SYMBOLGEN: Macro variable DAY_DATE9 resolves to 06NOV2018

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

 

SYMBOLGEN: Macro variable DAY_DATE9 resolves to 06NOV2018

SYMBOLGEN: Macro variable MONTHTO resolves to 30NOV2018

SYMBOLGEN: Macro variable P_CMTHEND resolves to 31OCT2018

SYMBOLGEN: Macro variable DAY_DATE9 resolves to 06NOV2018

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

 

SYMBOLGEN: Macro variable DATEUSEDFLAG2 resolves to SPECIFIED

 

 

SYMBOLGEN: Macro variable DATEUSEDFLAG2 resolves to SPECIFIED

 

 

SYMBOLGEN: Macro variable DATESPECIFIED resolves to 06NOV2018

SYMBOLGEN: Macro variable FMTH resolves to 03

SYMBOLGEN: Macro variable FYR resolves to 2019

SYMBOLGEN: Macro variable YRMTH resolves to 201903

SYMBOLGEN: Macro variable MONTHFROM resolves to 01NOV2018

SYMBOLGEN: Macro variable MONTHTO resolves to 30NOV2018

SYMBOLGEN: Macro variable SOM_YMD resolves to 20181101

SYMBOLGEN: Macro variable EOM_YMD resolves to 20181130

SYMBOLGEN: Macro variable YEARFROM resolves to 01SEP2018

SYMBOLGEN: Macro variable YEARTO resolves to 31AUG2019

SYMBOLGEN: Macro variable EOY_YMD resolves to 20190831

SYMBOLGEN: Macro variable CMTH resolves to 11

SYMBOLGEN: Macro variable CYR resolves to 2018

SYMBOLGEN: Macro variable CQTR resolves to 4

SYMBOLGEN: Macro variable CQTR_YRMTH resolves to 201810

SYMBOLGEN: Macro variable P_FMTH resolves to 02

SYMBOLGEN: Macro variable P_FYR resolves to 2019

SYMBOLGEN: Macro variable P_YRMTH resolves to 201902

SYMBOLGEN: Macro variable P_CMTHEND_YMD resolves to 20181031

SYMBOLGEN: Macro variable P_CMTHEND resolves to 31OCT2018

4 The SAS System 14:25 Wednesday, November 7, 2018

SYMBOLGEN: Macro variable P_CMTHFROM resolves to 01OCT2018

SYMBOLGEN: Macro variable P_CMTH resolves to 10

SYMBOLGEN: Macro variable P_CYR resolves to 2018

SYMBOLGEN: Macro variable P_CQTR resolves to 4

SYMBOLGEN: Macro variable P_CQTR_YRMTH resolves to 201810

SYMBOLGEN: Macro variable NEXT_FMTH resolves to 04

SYMBOLGEN: Macro variable NEXT_FYR resolves to 2019

SYMBOLGEN: Macro variable NEXT_YRMTH resolves to 201904

SYMBOLGEN: Macro variable NEXT_CMTHEND resolves to 31DEC2018

SYMBOLGEN: Macro variable NEXT_CMTHFROM resolves to 01DEC2018

SYMBOLGEN: Macro variable NEXT_CMTH resolves to 12

SYMBOLGEN: Macro variable NEXT_CYR resolves to 2018

SYMBOLGEN: Macro variable HALFYR_FROM resolves to 01JUN2018

SYMBOLGEN: Macro variable HALFYR_FMTH resolves to 10

SYMBOLGEN: Macro variable HALFYR_FYR resolves to 2018

SYMBOLGEN: Macro variable QTR resolves to 1

SYMBOLGEN: Macro variable P_QTR resolves to 4

SYMBOLGEN: Macro variable QTRFROM resolves to 01SEP2018

SYMBOLGEN: Macro variable QTRTO resolves to 30NOV2018

SYMBOLGEN: Macro variable DAY_YMD resolves to 20181106

SYMBOLGEN: Macro variable YYMMDD resolves to 181106

SYMBOLGEN: Macro variable CYYMM resolves to 1811

SYMBOLGEN: Macro variable NEXT_DMY resolves to 07112018

SYMBOLGEN: Macro variable DAY_DATE9 resolves to 06NOV2018

SYMBOLGEN: Macro variable WEEKDAY resolves to 3

SYMBOLGEN: Macro variable YESTERDAY resolves to 05NOV2018

SYMBOLGEN: Macro variable TOMORROW resolves to 07NOV2018

SYMBOLGEN: Macro variable YMD resolves to 20181106

SYMBOLGEN: Macro variable P_YMD resolves to 20181105

SYMBOLGEN: Macro variable MONTHWORD resolves to November

SYMBOLGEN: Macro variable DAYSINMONTH resolves to 30

SYMBOLGEN: Macro variable DAYSINYEAR resolves to 365

SYMBOLGEN: Macro variable CALDTE resolves to November 2018

SYMBOLGEN: Macro variable REPORTDATE resolves to 07NOV2018

SYMBOLGEN: Macro variable TODAY_YMD resolves to 20181107

SYMBOLGEN: Macro variable LAST_EOM_DATE resolves to 31OCT2018

SYMBOLGEN: Macro variable FWK resolves to 11

SYMBOLGEN: Macro variable CREATEDATEMACROVARSERR resolves to 0

This Financial month macro variables from Date Specified of 06NOV2018:

This Financial month macro variables:

fmth =03

fyr =2019

YrMth =201903

MonthFrom =01NOV2018

MonthTo =30NOV2018

som_ymd =20181101

eom_ymd =20181130

YearFrom =01SEP2018

YearTo =31AUG2019

eoy_ymd =20190831

This Calendar month macro variables:

cmth =11

cyr =2018

CQtr =4 (Calendar Year Quarter)

CQtr_yrmth =201810 (Quarter Start Year/Month)

5 The SAS System 14:25 Wednesday, November 7, 2018

Previous Month macro variables:

p_fmth =02

p_fyr =2019

p_YrMth =201902

p_CmthEnd_ymd=20181031

p_CmthEnd =31OCT2018

p_CmthFrom =01OCT2018

p_CMth =10

p_CYr =2018

p_CQtr =4 (Previous Months Calendar Year Quarter)

p_CQtr_yrmth =201810 (Previous Months Quarter Start Year/Month)

Next Month macro variables:

Next_fmth =04

Next_fyr =2019

Next_YrMth =201904

Next_CMthEnd =31DEC2018

Next_CMthFrom =01DEC2018

Next_CMth =12

Next_CYr =2018

Half Year macro variables:

HalfYr_From =01JUN2018

HalfYr_fmth =10

HalfYr_fyr =2018

This Quarter and Previous Quarter macro variables:

qtr =1 (Financial Quarter)

p_qtr =4 (Previous Financial Quarter - literally, not just for previous month)

QtrFrom =01SEP2018

QtrTo =30NOV2018

Date Specified macro variables (set to Date Specified or EOM Date):

day_ymd =20181106

yymmdd =181106

cyymm =1811

next_dmy =07112018

day_date9 =06NOV2018

Weekday =3

Yesterday =05NOV2018

Tomorrow =07NOV2018

Ymd =20181106

p_ymd =20181105

Other miscellaneous variables:

MonthWord =November

DaysInMonth =30

DaysInYear = 365

caldte =November 2018

ReportDate =07NOV2018

Today_ymd =20181107

last_eom_date =31OCT2018

fwk =11 (Financial Week Number)

CreateDateMacroVarsErr = 0

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.01 seconds

6 The SAS System 14:25 Wednesday, November 7, 2018

 

NOTE: Deleting WORK.MACROTST (memtype=DATA).

NOTE: PROCEDURE DATASETS used (Total process time):

real time 0.00 seconds

cpu time 0.01 seconds

 

17

18 %LET _CLIENTTASKLABEL=;

19 %LET _EGTASKLABEL=;

20 %LET _CLIENTPROJECTNAME=;

21 %LET _SASPROGRAMFILE=;

22

23 ;*';*";*/;quit;run;

24 ODS _ALL_ CLOSE;

25

26

27 QUIT; RUN;

28

1 REPLY 1
Reeza
Super User

Look in the code for the date() or today() function. 

 

CFC_SAS_Communities_400x225.jpg

Call for content now open!

It's your turn to help shape SAS Innovate 2027. Share your expertise and inspire the SAS community.

Submit your proposal →

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 1634 views
  • 0 likes
  • 2 in conversation