DATA Step, Macro, Functions and more

Avoid ERROR: Errors Printed On Page message

Reply
New Contributor
Posts: 3

Avoid ERROR: Errors Printed On Page message

Hi,

I would like to know if there is any SAS option to avoid the following error statement to be written in the log:
"ERROR: Errors printed on page..."

I have redirected errors to another log, via proc printto, but at the end the SAS process wrotes the statement above.

Thanks,
João Gonçalves
SAS Employee
Posts: 25

Re: Avoid ERROR: Errors Printed On Page message

Joao -

There is not an option to turn off the reporting of ERRORs. Your best approach may be a call to Technical Support for help to resolve the errors that are being reported.
New Contributor
Posts: 3

Re: Avoid ERROR: Errors Printed On Page message

Hi Tim,
I know the cause and reason of the errors and they are being treated in my job.

I have a try/lock macro trying to lock a SAS dataset. At the beginning of the macro, I redirect the log output so that the errors produced when trying to lock the dataset are discarded. Although in the log that aren't any ERROR messages, the final line is the message "ERROR: Errors printed on pages...", even though those pages don't even exist in the log file.

After the job finishes, I look in the log for the word "ERROR:" and it finds the statement above, ending my job with error code.

By what you're saying, I will have to change my UNIX job to find the "ERROR:" word discarding the "ERROR: Errors printed on pages" line.

Regards,
João G.
Respected Advisor
Posts: 3,799

Re: Avoid ERROR: Errors Printed On Page message

Instead of asking for a LOCK that will fail use FOPEN to test for availability then LOCK when the file is available.

Start a SAS session and submit these statements.

[pre]
libname here '.';
data here.prodclass;
set sashelp.class;
run;
proc fsview;
run;
[/pre]

Then start another SAS session and submit these statements ...

[pre]
libname here '.';
data here.tempclass;
set sashelp.class;
run;
filename DATAFIL ".\prodclass.sas7bdat";

data _null_;
do _n_ = 1 by 1 until(Obtainable);
Obtainable = fopen('DATAFIL','U');
if not Obtainable then do;
time=datetime();
put 'NOTE: File not obtainable at: ' time datetime20.2;
call sleep(10,1);
end;
end;
time=datetime();
put 'NOTE: All righty then file became obtainable at: ' time datetime20.2;
rc = fclose(Obtainable);
call execute('lock here.prodclass;');
run;

proc datasets library=here nolist;
age tempclass prodclass;
run;
quit;

lock here.prodclass clear;
[/pre]

The second session will wait, trying every 10 seconds, until you close FSVIEW in the first session.
New Contributor
Posts: 3

Re: Avoid ERROR: Errors Printed On Page message

Posted in reply to data_null__
I will give it a try.

thanks
Ask a Question
Discussion stats
  • 4 replies
  • 1958 views
  • 0 likes
  • 3 in conversation