My objective is to identify notes which are not really desired. Or, maybe they are desired, however I just want to capture them using Perl or some other text parsing language.
I was able to find this Surpress SAS Log, however it really focuses on surpress issues, I am more concerned with printing them to the log so that I can capture them.
Question, is there a documented list of note messages from SAS which would capture things like:
data _null_;
y=1;
x=0;
div=y/x;
array s{11} (1,0,1,0,1,9,8,7,.25,10,.);
rate=.25;
cf=npv(rate,of s{*});
run;
data a b;
do i='a','a','a','b';
x=1;
output a;
end;
do i='a','a','b','b';
y=2;
output b;
end;
run;
data _null_;
merge a b;
by i;
run;
Standard log shows the following: (highlighted is a handful of notes, looking for some sort of full list of notes that would be thrown for performing something "questionable")
Not a list that I know of, but here are a few you might add to your search:
uninitialized, as in "The variable xyz is uninitialized."
converted, as in "Character values were converted to numeric at line:number:"
missing values, as in "Missing values were generated as a result of ...."
You have to decide which ones are worth searching for. Some shops allow these messages, some don't.
Use function DIVIDE()
div=y/x;
-->
div=divide(y,x);
Hi Ksharp!
Divide function, yes it would surpress a message such as that. For the NPV function as well, I could just loop around and check for MISSING() and impute a zero to surpress the mathematical error.
However, the programs which I am executing have been written by other users. The objective here is to find a list of known publishable notes for information such as what was presented in the log. I posed 3 notes which, is there others???
Not a list that I know of, but here are a few you might add to your search:
uninitialized, as in "The variable xyz is uninitialized."
converted, as in "Character values were converted to numeric at line:number:"
missing values, as in "Missing values were generated as a result of ...."
You have to decide which ones are worth searching for. Some shops allow these messages, some don't.
Hi Astounding,
Likely there is no formal documentation, I do appreciate the recommendation on some of the others. I have unitinitiazed covered, but I can add some of the others as well. Ill add the character to numeric conversion as well as missing values, division by zero and mathematical operations issues and lastlye many to many merges.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.