BookmarkSubscribeRSS Feed
GeorgeSAS
Lapis Lazuli | Level 10

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.

 

3 REPLIES 3
Astounding
Opal | Level 21

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

Cynthia_sas
SAS Super FREQ
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
PGStats
Opal | Level 21

You have some control with SQL printing:

 


proc sql flow=30 40;
select * from n;
quit;
PG

SAS INNOVATE 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

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

View all other training opportunities.

Discussion stats
  • 3 replies
  • 3871 views
  • 0 likes
  • 4 in conversation