Using Permanently Assigned Labels

When you use a LABEL statement within a PROC step, the label applies only to the output from that step.
However, in PROC steps, you can also use permanently assigned labels. Permanent labels can be assigned in the DATA step. These labels are saved with the data set, and they can be reused by procedures that reference the data set.
For example, the DATA step below creates the data set Cert.Paris and defines the label for the variable Date. Because the LABEL statement is inside the DATA step, the labels are written to the Cert.Paris data set and are available to the subsequent PRINT procedure.
data cert.paris;
  set cert.laguardia;
  where dest='PAR' and (boarded=155 or boarded=146);
  label date='Departure Date';
run;
proc print data=cert.paris label;
  var date dest boarded;
run;
Output 6.15 Using Permanent Labels
Using Permanent Labels
Notice that the PROC PRINT statement still requires the LABEL option in order to display the permanent labels. Other SAS procedures display permanently assigned labels without additional statements or options.
For more information about permanently assigning labels, see Creating and Managing Variables.
Last updated: August 23, 2018
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.217.21.172