Discussion:
WARNING: Data too long for column
(too old to reply)
Rune
2008-12-02 12:23:29 UTC
Permalink
I have a data set named LongLine - with one variable also named
LongLine. The length of the variable is defined 580 positions. It
contains a string of 300 positions. When i write it with proc print, I
get a warning telling me that data is too long and will be truncated,
see log message below:
63159 proc print data = LongLine;
63160 run;

NOTE: Writing HTML Body file: sashtml102.htm
WARNING: Data too long for column "Line"; truncated to 206 characters
to fit.
NOTE: There were 1 observations read from the data set WORK.LONGLINE.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.17 seconds
cpu time 0.03 seconds

In the output, the content is truncated to 206 positions. But when I
use ODS to write to a textfile, then all 300 positions of text is
preserved.
Is there anyting I can do to suppress this warning? Or even better,
make SAS accept a string of 560 positions?

Rune
Nat Wooding
2008-12-02 14:24:43 UTC
Permalink
SAS V9 can accept a string of 580 or 560 positions ( you mention both) but
your printed output appears to be restricted by the linesize limit of 256
which is the maximum allowed for procedures. From the online docs for

options ls=

which is the allowable abbreviation for linesize=


LINESIZE=n | MIN| MAX






n
specifies the line size in characters. Valid values range between 64
and 256.


You said that ods would print a 300 space line to a file. Are you
doing this with Proc Print?






Nat Wooding
Environmental Specialist III
Dominion, Environmental Biology
4111 Castlewood Rd
Richmond, VA 23234
Phone:804-271-5313, Fax: 804-271-2977



Rune
To
Sent by: "SAS(r) SAS-***@LISTSERV.UGA.EDU
Discussion" cc
<SAS-***@LISTSERV.U
GA.EDU> Subject
WARNING: Data too long for column

12/02/2008 07:23
AM


Please respond to
Rune
<***@FASTLANE.NO
I have a data set named LongLine - with one variable also named
LongLine. The length of the variable is defined 580 positions. It
contains a string of 300 positions. When i write it with proc print, I
get a warning telling me that data is too long and will be truncated,
see log message below:
63159 proc print data = LongLine;
63160 run;

NOTE: Writing HTML Body file: sashtml102.htm
WARNING: Data too long for column "Line"; truncated to 206 characters
to fit.
NOTE: There were 1 observations read from the data set WORK.LONGLINE.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.17 seconds
cpu time 0.03 seconds

In the output, the content is truncated to 206 positions. But when I
use ODS to write to a textfile, then all 300 positions of text is
preserved.
Is there anyting I can do to suppress this warning? Or even better,
make SAS accept a string of 560 positions?

Rune


CONFIDENTIALITY NOTICE: This electronic message contains
information which may be legally confidential and/or privileged and
does not in any case represent a firm ENERGY COMMODITY bid or offer
relating thereto which binds the sender without an additional
express written confirmation to that effect. The information is
intended solely for the individual or entity named above and access
by anyone else is unauthorized. If you are not the intended
recipient, any disclosure, copying, distribution, or use of the
contents of this information is prohibited and may be unlawful. If
you have received this electronic transmission in error, please
reply immediately to the sender that you have received the message
in error, and delete it. Thank you.
Mike Rhoads
2008-12-02 15:59:08 UTC
Permalink
Rune,

Assuming you really don't need the output window / "listing" output, just turn it off, and you should be fine.

data LongLine;
length Line $ 560;
Line = repeat('y ',279);
run;

ods listing close;
ods html file="%sysfunc(pathname(WORK))\LongLine.html";
proc print data=LongLine;
run;
ods html close;
ods listing; /* If you want it back on */

Mike Rhoads
Westat
***@Westat.com

-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-***@LISTSERV.UGA.EDU] On Behalf Of Rune
Sent: Tuesday, December 02, 2008 7:23 AM
To: SAS-***@LISTSERV.UGA.EDU
Subject: WARNING: Data too long for column


I have a data set named LongLine - with one variable also named
LongLine. The length of the variable is defined 580 positions. It
contains a string of 300 positions. When i write it with proc print, I
get a warning telling me that data is too long and will be truncated,
see log message below:
63159 proc print data = LongLine;
63160 run;

NOTE: Writing HTML Body file: sashtml102.htm
WARNING: Data too long for column "Line"; truncated to 206 characters
to fit.
NOTE: There were 1 observations read from the data set WORK.LONGLINE.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.17 seconds
cpu time 0.03 seconds

In the output, the content is truncated to 206 positions. But when I
use ODS to write to a textfile, then all 300 positions of text is
preserved.
Is there anyting I can do to suppress this warning? Or even better,
make SAS accept a string of 560 positions?

Rune
Dianne Rhodes
2008-12-02 16:18:07 UTC
Permalink
Post by Rune
In the output, the content is truncated to 206 positions. But when I
use ODS to write to a textfile, then all 300 positions of text is
preserved.
Is there anyting I can do to suppress this warning? Or even better,
make SAS accept a string of 560 positions?
You might also like the results you get using Proc Report with the WRAP
option. I've used this to print out web browser history text.

Dianne R
c***@gmail.com
2017-09-29 00:36:12 UTC
Permalink
I suppress these warnings by using the width=full option to proc print.
m***@gmail.com
2018-10-05 20:06:34 UTC
Permalink
Post by Rune
I have a data set named LongLine - with one variable also named
LongLine. The length of the variable is defined 580 positions. It
contains a string of 300 positions. When i write it with proc print, I
get a warning telling me that data is too long and will be truncated,
63159 proc print data = LongLine;
63160 run;
NOTE: Writing HTML Body file: sashtml102.htm
WARNING: Data too long for column "Line"; truncated to 206 characters
to fit.
NOTE: There were 1 observations read from the data set WORK.LONGLINE.
real time 0.17 seconds
cpu time 0.03 seconds
In the output, the content is truncated to 206 positions. But when I
use ODS to write to a textfile, then all 300 positions of text is
preserved.
Is there anyting I can do to suppress this warning? Or even better,
make SAS accept a string of 560 positions?
Rune
i used option pagesize=max and linesize=max and used width=full in the proc print statement and it worked well.
Loading...