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

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 495 views
  • 0 likes
  • 3 in conversation