BookmarkSubscribeRSS Feed
Inp
Obsidian | Level 7 Inp
Obsidian | Level 7
Hi
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.



data temp;
input x $50.;
label x = 'this is testing more than thirty two charaters';
cards;
aaaaaaaaaabbbbbbbbbbccccccccccddddddddddeeeeeeeeee
;
proc print data=temp label;
run;

PROC EXPORT DATA=temp
OUTFILE='C:\PROJECTS\TPA_Current\OCT2009\testing.csv'
DBMS=csv
REPLACE LABEL;
RUN;
3 REPLIES 3
LinusH
Tourmaline | Level 20
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.
/Linus
Data never sleeps
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
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.

Scott Barry
SBBWorks, Inc.
Cynthia_sas
SAS Super FREQ
Hi:
One possible workaround is to use ODS CSV, as shown below.
cynthia
[pre]
data temp;
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';
cards;
aaaaaaaaaabbbbbbbbbbccccccccccddddddddddeeeeeeeeee
;
run;

ods listing close;
ods csv file='c:\temp\longlabel.csv';

proc print data=temp label;
run;
ods csv close;
[/pre]

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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.

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
  • 3 replies
  • 2305 views
  • 0 likes
  • 4 in conversation