BookmarkSubscribeRSS Feed
Almoha
Calcite | Level 5
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.
10 REPLIES 10
Reeza
Super User

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. 

Ksharp
Super User
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;

Almoha
Calcite | Level 5

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.

Cynthia_sas
SAS Super FREQ
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;
Almoha
Calcite | Level 5
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. -##
Ksharp
Super User

These options might give you some help.

 

options orientation=landscape topmargin=0 bottommargin=0 leftmargin=0 rightmargin=0;
Reeza
Super User

@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. 

FreelanceReinh
Jade | Level 19

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).

Nandhini
Calcite | Level 5

I tried by reducing the length of variables. It fixed that log note. here is the code. If the length of variables col1 col2 col3 is 200 then it throws that error. I tried by reducing, 175 was the best length which fixed that error note.


data test;
length col1 col2 col3 $175;
call missing(col1,col2,col3);
visit=1;
dt=1;
output;
visit=2;
dt=2;
output;
run;

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;

Cynthia_sas
SAS Super FREQ
Hi:
In the LISTING destination, you have a maximum value for LINESIZE that will cause PROC REPORT (or any procedure) to generate that error.

ODS HTML output can be as wide as it needs to be. ODS RTF and ODS PDF are not impacted by LINESIZE, they are impacted by margin settings.

It's not a good idea to add to the end of a 3 year old posting. It would have been much better to start a new post and just refer to the old post. Since you do not show your full code, including ODS statements, it's hard to test. Without ODS statements, we can't guess what your default output is -- is it set to HTML or LISTING or RTF or PDF????

This Tech Support note: http://support.sas.com/kb/18/518.html addresses the original error message from 3 years ago.

Cynthia

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 10 replies
  • 5265 views
  • 2 likes
  • 6 in conversation