investigation group; label term = 'Name Label' sex = 'Sex Label' years = 'Age Label' peak = 'Height Label' pounds = 'Weight Label'; lay sashelp.class; run;
proc report analysis=class; line ('Name Label' title) ('Sex Label' gender) ('Age Label' decades) ('Height Label' level) ('Weight Label' lbs); attrib _all_ label=" "; run;
Wiser possibly — but 1st a lot more performs: you can read the new varying brands and you can names out of possibly PROC Material production or regarding dictionary tables, following manage good macro you to definitely essentially creates the new Term report that you have.
proc sql noprint; pick identity, coalesce(term,name) for the :brands broke up of the ' ',:names e='SASHELP' and you can memname='GAS' purchase by the varnum; quit; %lay &=names; %place &=labels;
Re: Showing each other variable name and you may varying term regarding dining table header Released 08-11-2022 Am (772 views) | Within the respond to xxformat_com
study class; put sashelp.class; identity identity = 'Name Name (NAME)' intercourse = 'Sex Title (SEX)' years = 'Age Identity (AGE)' height = 'Height Name (HEIGHT)' pounds = 'Weight Term (WEIGHT)' ; run;
proc declaration research=class; run;
analysis class; set sashelp.class; identity term = 'Name Label' intercourse = 'Sex Label' age = 'Age Label' level = 'Height Label' pounds = 'Weight Label' ; run; proc transpose research=class(obs=0) out=names; var _all_; run; filename code temp; studies names; size varnum 8 _name_ $32 _label_ $256 ; set labels ; varnum+1; file code ; _label_=coalescec(_label_,_name_); _label_=catx(' ',_label_,cats('(',upcase(_name_),')')); place 'label ' _name_ '=' _label_ :$price. ';'; run;
Now both work with new made Name statements during the a data action or PROC DATASETS step to alter new affixed names. Читать далее Now you have macro parameters that contains the new variable names plus the adjustable brands