When I run below coding , the column header is truncated to 'this is testing more than thirty' but my acutal column header is 'this is testing more than thirty two charaters'. Can any one help to fix this problem.
Thanks so much for your help in advance.
input x $50.;
label x = 'this is testing more than thirty two charaters';
proc print data=temp label;
I got the same result.
Can't find any limitation mentioned in the documentation, so you could open a track to SAS support for clarification.
To fix this, you probably have to do some data step programming instead.
It appears that PROC EXPORT still uses the SAS v7 (then current) max label text length. Oddly, the LABEL option was just added with SAS v9.2, I believe.
You may also notice in the SAS DOC for EXPORT that any SAS variable that is longer than 32 characters is also truncated (without the LABEL parameter of course). Likely doesn't sound like it will be considered a DEFECT, given this condition.
Regardless, it's important to contact SAS support to give them the feedback on these types of limitations rather than presuming they already know.
One possible workaround is to use ODS CSV, as shown below.
length x y $50;
input x $;
y='twas brillig and the slithy toves';
label x = 'this is testing more than thirty two characters'
y= 'Not as long for the label';