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

Hello,all

I am trying to execute a dos command within sas:

%sysExec copy "&file" "&new_destination";

however, I got a warning message

WARNING: The quoted string currently being processed has become more than 262 characters long. You may have unbalanced quotation marks.:

Apparently, it is my macro variable &file that is too long.

I tried options NOQUOTELENMAX; the warning message is gone, however, still no file is copied to the new_destination.

Can anyone help to solve this problem? Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Quentin
Super User

I would try replacing the macro vars with hard coded values, and see if it's happy then.

Most likely the value of &file aor &new_destination is not what you expect.

%put &file being copied to &new_destination ;

Once you have it working without macro vars, then go back to using the macro vars.

Message was edited by: Quentin McMullen

BASUG is hosting free webinars Next up: Mike Sale presenting Data Warehousing with SAS April 10 at noon ET. Register now at the Boston Area SAS Users Group event page: https://www.basug.org/events.

View solution in original post

3 REPLIES 3
Quentin
Super User

I would try replacing the macro vars with hard coded values, and see if it's happy then.

Most likely the value of &file aor &new_destination is not what you expect.

%put &file being copied to &new_destination ;

Once you have it working without macro vars, then go back to using the macro vars.

Message was edited by: Quentin McMullen

BASUG is hosting free webinars Next up: Mike Sale presenting Data Warehousing with SAS April 10 at noon ET. Register now at the Boston Area SAS Users Group event page: https://www.basug.org/events.
abcd123
Fluorite | Level 6

Thank you for help. I found out what the problem is: there are too many spaces tailoring in macro variable &file. After those spaces are removed, it worked.

pavan1
Obsidian | Level 7

Hello abcd123

 

can you please share the code that u had used for this error. I'm facing the same issue.

 

Thanks,

 

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 24685 views
  • 1 like
  • 3 in conversation