DATA Step, Macro, Functions and more

proc print

Reply
Contributor
Posts: 50

proc print

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 ?

Super User
Posts: 11,343

Re: proc print

[ Edited ]

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.

Ask a Question
Discussion stats
  • 1 reply
  • 302 views
  • 0 likes
  • 2 in conversation