I am generating a macro with double quotes in if
eg
%let TEXT=Total outstanding balance for "Rise company" is 25;
Proc print data=sashelp.cars;
title "for period the &text";
run;
i will get error
how to replace or remove this double quotes form text macro
is there any way
title %sysfunc(quote(for period the &text));
title %sysfunc(quote(for period the &text));
i have one problem
i am connecting to oracle and executing procedure and i am getting error
%put &syserrortext;
ORACE execute error: ORA-06550: line 1, column 7:PLS-00201: identifier 'PROC_CPR033_VALIDATE11' must be
declaredORA-06550: line 1, column 7:PL/SQL: Statement ignoredORA-06512: at "DEVELOPER.CPR_RETURNS_BACK_DATE", line
67ORA-06512: at line 1
now i want to display this syserrortext in table or in macro or export as txt
if i use this in title i am getting following error
ERROR: The function QUOTE referenced by the %SYSFUNC or %QSYSFUNC macro function has too many arguments.
is there any way
The commas in syserrortext are the problem. Try this
%sysfunc(quote(%superq(syserrortext)))
notice there is NO & used with %superq.
%put &syserrortext;
ORACE execute error: ORA-06550: line 1, column 7:PLS-00201: identifier 'PROC_CPR033_VALIDATE11' must be
declaredORA-06550: line 1, column 7:PL/SQL: Statement ignoredORA-06512: at "DEVELOPER.CPR_RETURNS_BACK_DATE", line
67ORA-06512: at line 1
this double quotes is creating a problem
is there any way to remove double or single quotes from macro syserrortext
Did you try what data _null_ suggested?
Why do you want to remove the quotes if your intent is to use the value?
To use as a value in a DATA step then use SYMGET and you do not need to worry about the commas or quotes.
data want;
length syserrortext $400;
syserrortext=symget('syserrortext');
run;
To use the value in a TITLE statement then use the QUOTE() function.
title %sysfunc(quote(%superq(syserrortext));
Thanks tom its correct
data want;
length syserrortext $400;
syserrortext=symget('syserrortext');
run;
using this code i am able to handle error in want table
if there is no error i am getting blank data but when i am taking count of syserrortext then i am getting count as 1
how to get 0 if no data is available
Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.
Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.
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.