DATA Step, Macro, Functions and more

Proc Report error

Reply
Occasional Contributor
Posts: 12

Proc Report error

hi ,
 
when i run the following code , i get the following error in proc report . how can i fix this?
 
proc report data=test missing nowd split='`';
columns visit dt col1 col2 col3  ;
   define visit / id display ;
  define dt / id display;
 
define col1 / display;
define col2 / display;
define col3 / display;
run;
 
 
 
ERROR: Line size too small to place one of the non-ID columns to the right of the ID column(s). ID column(s) ignored.
Super User
Posts: 19,860

Re: Proc Report error

Increase your line size. 

 

Option linesize=xxxxx;

 

Note that this only applies to the listing destination. If you're using Word, PDF or HTML you're probably seeing the error because you didn't turnoff the listing destination. 

Super User
Posts: 10,044

Re: Proc Report error

Put one of COL into next page ?

columns visit dt col1 col2 col3  ;
   define visit / id display ;
  define dt / id display;
 
define col1 / display;
define col2 / PAGE;
define col3 / display;

Occasional Contributor
Posts: 12

Re: Proc Report error

dint work .

 

Also when i increase the size to more than 256 i get the error 

ERROR 18-12: Option value for SAS option LINESIZE must be between 64 and 256.

SAS Super FREQ
Posts: 8,868

Re: Proc Report error

Hi:
Sometimes you can get this message if your output is too wide for the LISTING destination, but would be OK in HTML.

My recommendation is that you consider adding explicit ODS HTML statements around your code and turn off the LISTING window:
ods listing close;
ods html file='c:\temp\mystuff.html';
** proc report;
ods html close;
Occasional Contributor
Posts: 12

Re: Proc Report error

Posted in reply to Cynthia_sas
it works on pdf destination.
but i really want the output in rtf using listing destination

##- Please type your reply above this line. Simple formatting, no
attachments. -##
Super User
Posts: 10,044

Re: Proc Report error

These options might give you some help.

 

options orientation=landscape topmargin=0 bottommargin=0 leftmargin=0 rightmargin=0;
Super User
Posts: 19,860

Re: Proc Report error


Almoha wrote:
it works on pdf destination.
but i really want the output in rtf using listing destination

##- Please type your reply above this line. Simple formatting, no
attachments. -##

 

That doesn't make sense. Either you want RTF or Listing, how do you get rtf via lisintg?

 

i think you need to post your full code and log - including ODS RTF statement. 

Trusted Advisor
Posts: 1,118

Re: Proc Report error

[ Edited ]

Hi @Almoha,

 

I would specify reasonable column widths in the relevant DEFINE statements and add the FLOW option to avoid truncation.

 

Example:

define col1 / display width=30 flow;

 

Edit: I should have mentioned that the above recommendation is aimed at the listing destination. As Reeza and Cynthia pointed out, the modification may be unnecessary for other destinations (using proportional fonts).

Ask a Question
Discussion stats
  • 8 replies
  • 599 views
  • 0 likes
  • 5 in conversation