PROC FORMAT; VALUE cylf 4 = "4 Cylinders" 6 = "6 Cylinders" 8 = "8 Cylinders" ; RUN;
proc format; value state_f 12 = "Florida" 25 = "Massachusetts" 27 = "Minnesota" ; value sex_f 1 = "Male" 2 = "Female" 7 = "Unknown" 9 = "Unknown" ; run;
proc format ; value x 1-2='ok' 3-4='ok' 5-7='ok' 8-9='ok' ; run ;
PROC FORMAT library = dats.carformats; VALUE cylf 4 = "4 Cylinders" 6 = "6 Cylinders" 8 = "8 Cylinders" ; RUN;
proc format ; value $test 'a'='Formatted a' 'c'='Formatted c' ; run;
proc format; value writfmt 1='date9.' 2='mmddyy10.'; run;
proc format; value $serious_f 'YES','yes' = 'white' ; value $serious_b 'YES','yes' = 'red' ; value $severity_f '3' = 'black' '4','5'= 'white' ; value $severity_b '3' = 'yellow' '4','5'= 'red' ; run;
proc format ; value loads 5000-
libname mycas cas; /* Définition d'un format personnalisé pour une variable */ proc format; value $statusfmt 'A' = 'Actif' 'I' = 'Inactif' other = 'Inconnu'; run; /* Création d'un jeu de données SAS avec une variable à formater */ data work.employee...
libname mycas cas; /* Création d'un format pour les catégories d'âge */ proc format library=mycas; value agefmt low-29 = 'Junior' 30-high = 'Senior'; run; data mycas.clients_source; input client_id nom $ age_ans; datalines; 101 Pierre 22 102 Marie 38 103 Luc 55 104 Sophie 29 ; ru...