Export variable with trailing spaces and quotes
How can I export a character variable WITH trailing spaces and quotes?
eg:
开发者_C百科data x;
format x $quote17.;
x='ruby';
put x=;
run;
(log extract)
x="ruby"
What is the most efficient way to get the following result?
x="ruby "
data x;
Format x $17. q$1.;
x='Ruby';
q='"';
qxq=cat(q,x,q);
Put qxq=;
run;
found a way..
data x;
format x $19.;
x='ruby';
x=quote(subpad(x,1,17));
put x=;
run;
not sure if this is the most efficient though!
精彩评论