BookmarkSubscribeRSS Feed
rkumar23
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?

2 REPLIES 2
Patrick
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;
x=4;
run;
data foo;
set test;
/*set nolib.nodata;*/
if x=2 then delete;
run;
%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';
%end;
%else %do;
proc print;
run;
%end;
data one;x=0;run;
%put &syserr;
%put &syscc;
%mend;

%conditionally;
run;

sas-innovate-2024.png

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.

 

Register now!

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
  • 1393 views
  • 0 likes
  • 3 in conversation