BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
lankamanoja
Calcite | Level 5

%macro data_pull(sas_run_date=%sysfunc(today()),rpt_ds=FIN360_MBR_ROSTER_RPT_Curr,Rpt_Missing=MBR_MISSING_SNF);

data_null_;
/* sas_run_date = today();*/
/* sas_run_date = &Report_Run_Dt;*/
sas_run_date = &sas_run_date.;
begindt=intnx("Month",sas_run_date,-1,'B');
enddt=intnx("Month",sas_run_date,0,'E');
CALL SYMput('sas_run_dt' , "'"|| TRIM(LEFT(put(sas_run_date,DATE9.))) ||"'d");
CALL SYMput('beg_dt' , "'"|| TRIM(LEFT(put(begindt,DATE9.))) ||"'d");
CALL SYMput('end_dt' , "'"|| TRIM(LEFT(put(enddt,DATE9.))) ||"'d");
run;

%put &sas_run_dt.;
%put &beg_dt.;
%put &end_dt.;

1 ACCEPTED SOLUTION

Accepted Solutions
Astounding
PROC Star

Two steps to take:

 

First, since the code looks fine, just run it again in a new SAS session.  Unbalanced quotes can occur because of the code that ran before this.

 

Second, if the problem is still there, post the log so we can see what the message refers to.

 

Good luck.

View solution in original post

3 REPLIES 3
Astounding
PROC Star

Two steps to take:

 

First, since the code looks fine, just run it again in a new SAS session.  Unbalanced quotes can occur because of the code that ran before this.

 

Second, if the problem is still there, post the log so we can see what the message refers to.

 

Good luck.

lankamanoja
Calcite | Level 5
Thank you so much for the reply
means a lot

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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
  • 3 replies
  • 1148 views
  • 0 likes
  • 3 in conversation