Hello everyone,
I want to print label of dataset(not variable)
DATA XX(LABEL = "This is the label of dataset xx"); X=999; RUN; PROC PRINT DATA=XX/LABEL; RUN;
ERROR 200-322: The symbol is not recognized and will be ignored
Please help.
Thank you!
@GeorgeSAS wrote:
Hello everyone,
I want to print label of dataset(not variable)
DATA XX(LABEL = "This is the label of dataset xx"); X=999; RUN; PROC PRINT DATA=XX/LABEL; RUN;ERROR 200-322: The symbol is not recognized and will be ignored
Please help.
Thank you!
Sounds like you want a TITLE statement. If you want to do this automagically you would have to read the table properties, place the label into a macro variable and use that variable in a title statement.
data work.junk (label='This is a dataset label'); x=1; run; proc sql noprint; select memlabel into : labelvar from dictionary.tables where libname='WORK' and memname='JUNK' ; run; proc print data=work.junk ; title "&labelvar."; run; title;
@GeorgeSAS wrote:
Hello everyone,
I want to print label of dataset(not variable)
DATA XX(LABEL = "This is the label of dataset xx"); X=999; RUN; PROC PRINT DATA=XX/LABEL; RUN;ERROR 200-322: The symbol is not recognized and will be ignored
Please help.
Thank you!
Sounds like you want a TITLE statement. If you want to do this automagically you would have to read the table properties, place the label into a macro variable and use that variable in a title statement.
data work.junk (label='This is a dataset label'); x=1; run; proc sql noprint; select memlabel into : labelvar from dictionary.tables where libname='WORK' and memname='JUNK' ; run; proc print data=work.junk ; title "&labelvar."; run; title;
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.