BookmarkSubscribeRSS Feed
Prateek1
Obsidian | Level 7

hi,

Proc print data=Nz2 ;
By descending Probability ;
id Probability;
Var Client Champ Modified Tot_Budget Digi_Budget Deal_Comments;
sum Tot_Budget Digi_Budget;
run;

 error: Data too long for column "Deal_Comments"; truncated to 121 characters to fit.
ERROR: The ID columns were too wide for the LINESIZE to print the special report usually generated when BY and ID lists
are identical.???

what to do ?

1 REPLY 1
ballardw
Super User

Use ODS HTML output instead of listing as it won't have the linesize limit.

 

Or add a format statement to limit the number of characters the Deal_comments variable will display.

Something like:

format deal_comments $80.;

to limit display to 80 characters.

 

 

 

What is the proc contents report on the size of your Deal_comments variable?

It sounds like this is something repeated. If so, are you using proc import to get the data into SAS? The lengths of variables are likely change when using proc import as it uses contents of the file read to set properties. A variable with the name Deal_comments sounds like a canditate to hold a rambling comments by who ever enters the data.

 

I'm confused about:

ERROR: The ID columns were too wide for the LINESIZE to print the special report usually generated when BY and ID lists
are identical.???

Are you saying there was a second error message? Or are you interpretting the previous error to have something to do with the variable Probability? I would expect from the first error that you have some value for DEAL_COMMENTS that looks like:

"This deal was conducted with such and such and we ran into an issue with expected previous discounts this order did not qualify so we had to do some other price adjustment to make the customer happy" which did not fit in the number of print positions after printing the other variables.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 1 reply
  • 1489 views
  • 1 like
  • 2 in conversation