BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.

I want to dynamically import a filename depending on the month and year. For example, for October 2021 the filename I want to import is exco_fte_202110. I have the following code, which works in SAS Studio. However, in Enterprise Guide, I get the note: "NOTE: The quoted string currently being processed has become more than 262 bytes long. You might have unbalanced quotation marks."

 

%let sysmonth= %sysfunc(putn("&sysdate"d, MONTH2.));
%let sysyear= %sysfunc(putn("&sysdate"d, YEAR4.));

%put OracLib.exco_fte_&sysyear.&sysmonth.;

 

Something minor is missing - what is it?

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User
Can you post the full log? That error sometimes relates to the autogenerated code than your code.

Something like this would probably be just as easy:

%put OracLib.exco_fte_%sysfunc(today(), yymmn6.);

View solution in original post

3 REPLIES 3
Reeza
Super User
Can you post the full log? That error sometimes relates to the autogenerated code than your code.

Something like this would probably be just as easy:

%put OracLib.exco_fte_%sysfunc(today(), yymmn6.);

Reeza
Super User
SYSDATE is an automatic macro variable but it's when the session started.
If you're on a server, this may not return what you expect, so do you want to use the TODAY() function instead?
https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/mcrolref/n08zfkx3lmiagpn11fctkfvfx1sg.htm
ballardw
Super User

Check the quotes around your file name and any options in the step you actually export the data. Look for mismatched quotes.

 

Or copy your log, open a text box on the forum with the </> icon and paste the log showing the code and error message(s).

 

 

 

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
  • 532 views
  • 5 likes
  • 3 in conversation