BookmarkSubscribeRSS Feed
Calcite | Level 5

On MVS while attaching file it's too large and get above error now what I like to do is fetch this error and notify via email...i tried with SYSERR however that doesn't seems to work out..anybody else got any other thoughts?

Opal | Level 21

Looks like a Warning and not an Error to me.


Not sure if this will work but you could try to check for a return code of "warning" and if there is one also check the content of automatic macro variable "&SYSWARNINGTEXT" (=does it contain the expected warning). Send an email if both conditions are satisfied.

I hope this little program helps:


/*if the commented set statement is used instead of the
uncommented set statement in the second data step below,
the value of &syscc will be non-zero for the program, and
the value of &syserr will be non-zero for the step. You can
see in the log that the value of &syserr will change for each
step and the value of &syscc will not.
options mprint symbolgen;
%macro conditionally;
data test;
data foo;
set test;
/*set nolib.nodata;*/
if x=2 then delete;
%put &syscc;/*this macro value returns a non-zero for the program
if there is any message other than a NOTE*/
%put &syserr;/*this macro value returns a non-zero for the step
of the program*/
%if &syserr ne 0 %then %do;
%put 'ERROR in DATA Step';
%else %do;
proc print;
data one;x=0;run;
%put &syserr;
%put &syscc;


Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 3 in conversation