Previous PageNext Page

This brings up some problems
The following code is used on different data values.

Data Grades;
     ID = _N_;
     Input Score;
     SELECT;
       WHEN ( 0 LE Score LT 65) Grade='F';
       WHEN (65 LE SCORE LT 70) Grade='D';
       WHEN (70 LE SCORE LT 80) Grade='C';
       WHEN (80 LE SCORE LT 90) Grade='B';
       WHEN (      SCORE GE 90) Grade='A';
       OTHERWISE PUT Score=;
     END;
  NoFormat=Score;   *** same value, no format;
Datalines;
0
-1
101
82.1
89.1
.
;
PROC FORMAT;
VALUE SCORE  0-64  ='F'
            65-69  ='D'
            70-79  ='C'
            80-89  ='B'
            90-HIGH='A';
PROC PRINT DATA=GRADES;
     FORMAT SCORE SCORE.;
     ID ID;   
     TITLE 'Example 3, with different data';
run;

Previous PageTable Of ContentsNext Page