Now it’s time macro parameters which includes this new variable names and the adjustable names
investigation classification; label name = 'Name Label' gender = 'Sex Label' decades = 'Age Label' height = 'Height Label' lbs = 'Weight Label'; lay sashelp.class; run;
proc report research=class; line ('Name Label' identity) ('Sex Label' gender) ('Age Label' age) ('Height Label' level) ('Weight Label' lbs); attrib _all_ label=" "; run;
Smarter maybe – but 1st so much more functions: look for the variable brands and you can names out of often PROC Content output otherwise throughout the dictionary tables, right after which carry out an excellent macro that basically creates the new Label report which you have.
proc sql noprint; pick identity, coalesce(term,name) toward :brands broke up of the ' ',:brands age='SASHELP' and you will memname='GAS' purchase of the varnum; quit; %put &=names; %lay &=labels;
Re: Demonstrating each other adjustable name and variable term in the desk heading Posted 08-11-2022 In the morning (772 feedback) | Within the react to xxformat_com
study group; lay sashelp.class; title name = 'Name Label (NAME)' intercourse = 'Sex Title (SEX)' many years = 'Age Label (AGE)' level = 'Height Name (HEIGHT)' pounds = 'Weight Identity (WEIGHT)' ; run;
proc declaration data=class; run;
research class; lay sashelp.class; title name = 'Name Label' sex = 'Sex Label' age = 'Age Label' top = 'Height Label' lbs = 'Weight Label' ; run; proc transpose study=class(obs=0) out=names; var _all_; run; filename password temp; research brands; size varnum 8 _name_ $32 _label_ $256 ; put labels ; varnum+1; document code ; _label_=coalescec(_label_,_name_); _label_=catx(' ',_label_,cats('(',upcase(_name_),')')); put 'label ' _name_ '=' _label_ :$quote. ';'; run;
Now either work with the brand new made Identity comments when you look at the a document step or PROC DATASETS step adjust new connected brands.