This scenario uses the
Certadv.Monsal data set. Write a SAS program that does the following:
-
Use PROC FORMAT to create a numeric
format that specifies a template for displaying month values.
-
If the value is 1
through 12
,
display the value as a two-digit number (month values 1
through 9
should
contain a leading zero).
-
If the value is not a number between 1
and 12
inclusive,
display the value 'Not a valid month'.
-
Name the custom format Monthfmt.
-
Use a PROC PRINT step to create
a report based on Certadv.Monsal. Apply the Monthfmt custom format
to the Month variable.