DATA Step, Macro, Functions and more

Putting a value with Quotes in a File

Accepted Solution Solved
Reply
Super Contributor
Posts: 319
Accepted Solution

Putting a value with Quotes in a File

I'm having some problems when putting a string with quotes into a file. I starts to get some problems when I assign it into a variable in my data step.

 

Greatly appreciate any assistance. Thanks!

 

 

%let val = -remove "User1":ALL;

data _null_;
file myfile;
tmp = "&val";
put tmp(~);
run;

Accepted Solutions
Solution
‎06-26-2017 08:18 AM
Super User
Posts: 3,113

Re: Putting a value with Quotes in a File

%let val = -remove "User1":ALL;

data _null_;
file myfile;
tmp = symget("val");
put tmp(~);
run;

View solution in original post


All Replies
Solution
‎06-26-2017 08:18 AM
Super User
Posts: 3,113

Re: Putting a value with Quotes in a File

%let val = -remove "User1":ALL;

data _null_;
file myfile;
tmp = symget("val");
put tmp(~);
run;
☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 1 reply
  • 102 views
  • 3 likes
  • 2 in conversation