The SAS Output Delivery System and reporting techniques

PDF with new Label names

Reply
N/A
Posts: 0

PDF with new Label names

I have used the 'Label' commmand in a datastep to rename some variable names.

I then want to output this dataset to a PDF file but the PDF retains the old label names.

I have also triend using the 'Label' command in the Proc Print in the ODS code, but again this doesn't seem to work.....


Thanks
SAS Super FREQ
Posts: 8,868

Re: PDF with new Label names

Posted in reply to deleted_user
Hi:
This code works for me:
[pre]
ods pdf file='xxx.pdf';

proc print data=sashelp.class(obs=3) label;
label name='XXXXX'
age = 'YYYYY'
height = 'ZZZZZ';
run;

ods pdf close;
[/pre]

So does this code, which uses PROC DATASETS to assign new labels to a variable (note that I did not want to relabel variables in SASHELP.CLASS, so I created WORK.NEWCLASS):
[pre]
data newclass;
set sashelp.class;
run;

proc datasets library=work nolist;
modify newclass;
label name='AAAAA'
age = 'BBBBB';
run;
quit;

ods pdf file='aaa.pdf';

proc print data=newclass(obs=3) label;
run;
ods pdf close;
[/pre]

I'm also not sure what you mean by "output this dataset to PDF" -- it seems to mean that you're using ODS PDF and PROC PRINT???? The Label statement and the LABEL option in PROC PRINT should be working. If you try the above code and you do not get labels in your PROC PRINT output, then I suggest you open a track with Tech Support for more in-depth help.

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