Ce script SAS démontre la création d'un format personnalisé à l'aide de PROC FORMAT, son application et l'utilisation de fonctions aléatoires dans un DATA STEP pour générer un jeu de données. Enfin, le jeu de données formaté est affiché via PROC PRINT.
Création de formats utilisateurs pour le 'traffic lighting' (mise en évidence conditionnelle par couleur).
Création de formats personnalisés avec imbrication logique et test d'affichage.
Démonstration de la création et de l'utilisation de formats d'image personnalisés pour les dates et les heures à l'aide de directives.
proc format; value class low-3000 = 'Abnormally Low' 3000-4000 = 'Low' 4001-6000 = 'Medium' 6001-12000 = 'High' 12000-high = 'Abnormally High' . = 'Not Available'; proc freq; format WBC class.; tables WBC/MIS...
proc format; value $sequip 'Sports' = 'Sports Equipment'; run;
proc format lib=l1; value FMT_L1_ 1='a' 2='b' other='na'; invalue INFMT_L1_ 'x'=1 'y'=2 other=.; quit; proc format lib=l2; value FMT_L2_ 1='c' 2='d' other='na'; invalue INFMT_L2_ 'x'=3 'y'=4 other=.; quit; proc format lib=l3; value FMT_L3_ 1='e' 2='f' other='na'; invalue INFMT_L3_ 'x'=5 '...
title1 '12.2.2 Working with Fractional Values'; title2 'Showing Decimals'; proc format; picture showval other = '0000'; picture withdec other = '00.0'; picture twodec other = '09.00'; run;
proc format; picture showdec other = '09.00'; run;
proc format; picture showdecr (round) other = '00009.00'; run;