Hi,
i need to suppress the warning messages, from the SAS logs for the completion of Auto-sys jobs.
i got to know that we can wrap the code, and then suppress the logs. as i am not sure of the wrapping of SAS code.
Do we have any options to suppress the Warning messages from the logs or if any of the experts on the board give me an example or any article related to wrap a SAS code.
Regards,
Santtosh...
Hi @Santt0sh
A warning in SAS is is something that causes the automatic variable SYSCC to be set to the value 4. It also gives a message in the SAS log, but the message is just a green text that explains the warning, it has nothing to do with job completion. You can - at your own peril - redirect the log and get rid of the message, but your job will still end with a return code 4.
In general, warnings in production jobs should not be accepted. There are special cases, e.g. when reading XML input using a map/XML filename, and content is longer than 32676 bytes, where a warning seems unavoidable, and in these cases the warning can be nullified by resetting SYSCC to 0, but then there is no reason to suppress the message.
Step with warning - gives message + return code:
data _null_;
b = "&y";
run;
%put &=syscc;
121 data _null_; 122 b = "&y"; WARNING: Apparent symbolic reference Y not resolved. 123 run; NOTE: There were 1 observations read from the data set WORK.A. NOTE: The data set WORK.B has 1 observations and 2 variables. NOTE: DATA statement used (Total process time): real time 0.02 seconds cpu time 0.00 seconds 124 %put &=syscc; SYSCC=4
Step with warning and redirected log - no message, but return code:
filename tmp dummy;
proc printto log=tmp;
run;
data _null_;
b = "&y";
run;
proc printto;
run;
%put &=syscc;
138 filename tmp dummy; 139 proc printto log=tmp; 140 run; NOTE: PROCEDURE PRINTTO used (Total process time): real time 0.00 seconds cpu time 0.00 seconds 146 %put &=syscc; SYSCC=4
Step with warning and reset of return code - gives message:
data _null_;
b = "&y";
run;
%put &=syscc;
%if &syscc=4 %then %do;
%let syscc = 0;
%end;
%put &=syscc;
148 data _null_; 149 b = "&y"; WARNING: Apparent symbolic reference Y not resolved. 150 run; NOTE: DATA statement used (Total process time): real time 0.00 seconds cpu time 0.00 seconds 151 %put &=syscc; SYSCC=4 152 %if &syscc=4 %then %do; 153 %let syscc = 0; 154 %end; 155 %put &=syscc; SYSCC=0
Since WARNINGS often indicate bad data, inappropriate options for data/procedure combinations or possibly unreliable results I would be very cautious about automatically suppressing everything from the log.
Can you share some examples of the types of warnings you are encountering? I would spend some more time making sure that my code wouldn't generate the warnings in the first place.
Warnings are there for a reason, ignoring them is not a good idea, hiding them is an even worse idea.
Hi @Santt0sh
A warning in SAS is is something that causes the automatic variable SYSCC to be set to the value 4. It also gives a message in the SAS log, but the message is just a green text that explains the warning, it has nothing to do with job completion. You can - at your own peril - redirect the log and get rid of the message, but your job will still end with a return code 4.
In general, warnings in production jobs should not be accepted. There are special cases, e.g. when reading XML input using a map/XML filename, and content is longer than 32676 bytes, where a warning seems unavoidable, and in these cases the warning can be nullified by resetting SYSCC to 0, but then there is no reason to suppress the message.
Step with warning - gives message + return code:
data _null_;
b = "&y";
run;
%put &=syscc;
121 data _null_; 122 b = "&y"; WARNING: Apparent symbolic reference Y not resolved. 123 run; NOTE: There were 1 observations read from the data set WORK.A. NOTE: The data set WORK.B has 1 observations and 2 variables. NOTE: DATA statement used (Total process time): real time 0.02 seconds cpu time 0.00 seconds 124 %put &=syscc; SYSCC=4
Step with warning and redirected log - no message, but return code:
filename tmp dummy;
proc printto log=tmp;
run;
data _null_;
b = "&y";
run;
proc printto;
run;
%put &=syscc;
138 filename tmp dummy; 139 proc printto log=tmp; 140 run; NOTE: PROCEDURE PRINTTO used (Total process time): real time 0.00 seconds cpu time 0.00 seconds 146 %put &=syscc; SYSCC=4
Step with warning and reset of return code - gives message:
data _null_;
b = "&y";
run;
%put &=syscc;
%if &syscc=4 %then %do;
%let syscc = 0;
%end;
%put &=syscc;
148 data _null_; 149 b = "&y"; WARNING: Apparent symbolic reference Y not resolved. 150 run; NOTE: DATA statement used (Total process time): real time 0.00 seconds cpu time 0.00 seconds 151 %put &=syscc; SYSCC=4 152 %if &syscc=4 %then %do; 153 %let syscc = 0; 154 %end; 155 %put &=syscc; SYSCC=0
Hi All,
I tried and removed the warning messages, but i am still getting a Warning message:
I am only trying to resolve a macro variable which is Pipe delimited
%let abc = abc | def | ghij|
Snippet of the code i m using to resolve the delimited macro variables.
%Do i = 1 %to %sysfunc(countw(&abc.,%str(|)));
%let finals = %scan(&abc.,&i.,%str(|));
%put &finals.
the finals macro resolves but when its been used i am getting the below error.
WARNING: The quoted string currently being processed has become more than 262 characters long. You might have unbalanced quotation mark.
I have double checked my code i don't see any unbalanced quotation marks. if any one can give me an example to wrap this Warning and get autosys jobs successful.
Regards,
You can use the SAS option NOQUOTELENMAX to suppress this warning:
But you've missed off a semicolon so that is why you are getting it. Try this:
%let abc = abc | def | ghij|;
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.