Now you have macro parameters which includes new varying labels therefore the varying brands
analysis class; identity title = 'Name Label' intercourse = 'Sex Label' many years = 'Age JamaГЇque mariГ©es Label' top = 'Height Label' lbs = 'Weight Label'; put sashelp.class; run;
proc report studies=class; column ('Name Label' name) ('Sex Label' sex) ('Age Label' many years) ('Height Label' level) ('Weight Label' weight); attrib _all_ label=" "; run;
Smarter maybe – however, very first far more functions: you can read the newest variable labels and you will labels off often PROC Information yields otherwise about dictionary dining tables, right after which manage an effective macro one to fundamentally brings the brand new Term declaration which you have.
proc sql noprint; see title, coalesce(title,name) toward :labels split up from the ' ',:brands age='SASHELP' and you will memname='GAS' order because of the varnum; quit; %place &=names; %place &=labels;
Re: Exhibiting each other variable identity and you can variable term from the desk heading Published 08-11-2022 Am (772 viewpoints) | From inside the reply to xxformat_com
data category; lay sashelp.class; title label = 'Name Identity (NAME)' sex = 'Sex Label (SEX)' years = 'Age Identity (AGE)' peak = 'Height Name (HEIGHT)' pounds = 'Weight Name (WEIGHT)' ; run;
proc declaration analysis=class; run;
studies group; lay sashelp.class; name name = 'Name Label' intercourse = 'Sex Label' many years = 'Age Label' peak = 'Height Label' pounds = 'Weight Label' ; run; proc transpose study=class(obs=0) out=names; var _all_; run; filename password temp; study names; size varnum 8 _name_ $thirty-two _label_ $256 ; set brands ; varnum+1; document code ; _label_=coalescec(_label_,_name_); _label_=catx(' ',_label_,cats('(',upcase(_name_),')')); put 'label ' _name_ '=' _label_ :$offer. ';'; run;
Now either manage the newest generated Title statements in a document step or PROC DATASETS action to alter the fresh attached brands. Read More