the code that doesn't work (doesn't label the two variables)
data work.subset_pmlabel;
set orion.sales;
where country='AU'
and job_title like '%Rep%';
Bonus=salary*0.1;
label Job_Title='Sales Title'
Hire_Date='Date Hired';
drop Employee_id gender Birth_date;
run;
proc print data=work.subset_pmlabel;
run;
this is directly from sas e-training, I reeeeealy don't see any difference between.
thanks in advance
ok I got it,
in proc print step I need to mention LEBAL
is that right guys?
Yes, if you want to display labels instead of variable names you have to use label in proc print
proc print data=work.subset_pmlabel label;
run;
You can also use proc contents to see labels assigned to variables in the dataset.
appreciated!
and you can use split() options as well....
Or you can simply use proc report which print LABEL by default .
Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.
Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.
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.