Date: Thu, 28 Sep 2006 09:16:40 -0400
Reply-To: Jack Clark <JClark@CHPDM.UMBC.EDU>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Jack Clark <JClark@CHPDM.UMBC.EDU>
Subject: Re: Length function doesn't work (Data too long for column ... tr
Content-Type: text/plain; charset="iso-8859-1"
The log you provided shows the lengths being set in a dataset called ORIG.
The ERROR message you are getting is when you are printing a dataset called
NOTE: There were 20 observations read from the data set
Check that the lengths of the fields are set in the datasets you are
printing. When you see this message in the log, it generally refers to
truncation for printing purposes - the actual data is not truncated.
Center for Health Program Development and Management
University of Maryland, Baltimore County
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Irin
Sent: Thursday, September 28, 2006 9:01 AM
Subject: Length function doesn't work (Data too long for column ...
At the very beginning of my code I set the length of the character data
fields like that:
593 length asked_question $ 6;
594 length response_to_question $ 6;
595 length accepts_calls $ 3;
596 length wrong_phone_number $ 6;
However after I run the whole code Print data caused a WARNING message
regarding too long data as below:
656 %macro diag2(dsn,resp);
657 proc print data=&dsn (obs=20);
658 var shot shotdate questiondate;
659 where shot = "&resp";
660 title "Printout of &dsn to check shot variable where shot=&resp";
663 proc print data=&dsn (obs=20);
664 var enroll startdate enddate accepts_calls wrong_phone_number;
665 where enroll = "&resp";
666 title "Printout of &dsn to check enroll variable where
WARNING: Data too long for column "accepts_calls"; truncated to 93
characters to fit.
WARNING: Data too long for column "wrong_phone_number"; truncated to 93
characters to fit.
NOTE: There were 20 observations read from the data set WORK.FLU_SINGLE2.
NOTE: PROCEDURE PRINT used:
real time 0.01 seconds
cpu time 0.01 seconds
I do not understand why LENGTH function, which I set at the very
beginning, does not work for these fields. Is it because of the macro? Why?
How can I fix it ?
Thank you in advance,
Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+
countries) for 2¢/min or less.