Dear SASians,
Below is the part of code which I am using to create data set out of created report. Its working well and good in SAS EG(Unix platform). If I run the same code via unix command or shell script, I am getting below mentioned error which states some column width error.
Can any one explain why is it working fine in SAS EG(in adhoc run) and not working fine when running thru Unix command??
Log :
NOTE: The SAS System stopped processing this step because of errors.
NOTE: There were 1 observations read from the data set WORK.MAIL.
WARNING: The data set X.EXISTING may be incomplete. When this step was stopped there were 1 observations and 12 variables.
WARNING: Data set X.EXISTING was not replaced because this step was stopped.
NOTE: PROCEDURE REPORT used (Total process time):
real time 0.04 seconds
cpu time 0.04 seconds
ERROR: The width of ZP_FL_NM is not between 1 and 132. Adjust the column width or line size.
Code: PROC REPORT DATA=work.MAIL nowd HEADLINE HEADSKIP out=X.Existing
style (report) = {background = white
font_face = "Verdana" font_size = 7pt just=left bordercolor=grey rules=All frame=box}
style (column) = {background = white CELLHEIGHT = 2.5%
As you can see by this NOTE:
NOTE: This affects LISTING output.
you DO have the listing destination open. Use
ods listing close;
to close it.
ODS has a different default destination when programs are run from the commandline opposed to in a workspace server (EG).
In batch, there's always ODS LISTING open, which has certain limits (especially linesize) not present in ODS TAGSETS.SASREPORT13 (the default in EG).
Use
ods listing close;
in your programs to prevent attempted output to the LISTING destination, and then set up your preferred destination (HTML, PDF, ...).
Hello Brem,
Thanks for your input , but I am already using ods html and also closed the it and the end as mentioned in below code. still I am not getting an error. Please help me to get rid of it
%macro send_email;
%if &send_email eq 1 and &send_emailuat eq 1 %then
%do;
FILENAME MailBox EMAIL
TO=(
'Myself<XX.com>'
ods html3 text = "Have a Great Day!";
ods html3 text = "Regards,";
ods html3 text = "ARun";
ods html3 close;
run;
title;
%end;
@arunrami wrote:
Hello Brem,
.... still I am not getting an error.
Well, then everything's fine, isn't it?
@arunrami wrote:
Hello Brem,
.... still I am not getting an error.
Well, then everything's fine, isn't it?
Please post the whole log of the failing step.
here is the step of log where I am getting error and its relevant code . Thanks!
Code:
PROC REPORT DATA=work.MAIL nowd HEADLINE HEADSKIP out=X.Existing
314 style (report) = {background = white
315 font_face = "Verdana" font_size = 7pt just=left bordercolor=grey rules=All frame=box}
316 style (column) = {background = white CELLHEIGHT = 2.5%
317 font_face = "Verdana" font_size = 7pt just=left }
318 style (header) = {foreground = cx5e2750 font_face="Verdana"
319 font_size = 8pt just=left
320 };
321 columns zp_fl_nm File_Size dlvry_id start_time end_time duration Trigger_File Load_Stats
322 Stats_Report DQ_Report start_time1;
323 define zp_fl_nm/display 'PROD_File_Name';
Logs :
ERROR: The width of ZP_FL_NM is not between 1 and 132. Adjust the column width or line size.
^L14 The SAS System Saturday, January 26, 2019 06:00:00 PM
NOTE: This affects LISTING output.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: There were 1 observations read from the data set WORK.MAIL.
WARNING: The data set X.EXISTING may be incomplete. When this step was stopped there were 1 observations and 12 variables.
WARNING: Data set X.EXISTING was not replaced because this step was stopped.
NOTE: PROCEDURE REPORT used (Total process time):
real time 0.04 seconds
cpu time 0.05 seconds
As you can see by this NOTE:
NOTE: This affects LISTING output.
you DO have the listing destination open. Use
ods listing close;
to close it.
Thanks @Kurt_Bremser . It works 🙂 I misplaced ODS close so that it wasnt working before
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
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.