SAS OnlineTutor HomeFAQ PageSuggested Learning PathsContents+Searchback||next

Formatting Variable Values
Associating User-Defined Formats with Variables


Question: Associate the format that is defined in the PROC FORMAT step with the variable Sex, which is in the DATA step.
proc format lib=library;
   value SexFmt
         1='Female'
         2='Male';
run;
data perm.survey;
   infile clinic1;
   input LastName $ 1-10 FirstName $ 12-22 Sex 24;

run;

           

  back||next

 

Copyright © 2002 SAS Institute Inc., Cary, NC, USA. All rights reserved.

Terms of Use & Legal Information | Privacy Statement