Help using Base SAS procedures

proc print truncated

Reply
Regular Contributor
Posts: 202

proc print truncated

Hello,

How to split proc print a very long row into different lines to avoid of being truncated?

Here is the example SAS code: x2 and x3 are too long and were truncated,I want to print them into several lines without being truncated.

 

Thanks!

 

data n;

x='11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111';

x2=x||x;

x3=x2||x2;

run;

option ls=max;

proc print data=n;

run;

 

WARNING: Data too long for column "x2"; truncated to 252 characters to fit.

WARNING: Data too long for column "x3"; truncated to 252 characters to fit.

 

Super User
Posts: 5,079

Re: proc print truncated

Not with PROC PRINT.  You would have to switch to PROC REPORT and use the WRAP option.

SAS Super FREQ
Posts: 8,742

Re: proc print truncated

Hi:
WRAP only works with LISTING output. So if you want to control cellwidth and impact text flow, then use a STYLE attribute and the WIDTH= style attribute.
cynthia
Respected Advisor
Posts: 4,644

Re: proc print truncated

You have some control with SQL printing:

 


proc sql flow=30 40;
select * from n;
quit;
PG
Ask a Question
Discussion stats
  • 3 replies
  • 382 views
  • 0 likes
  • 4 in conversation