Data Practice_PFormat;
Input Fname $ Lname $ Title Salary grade $;
cards4;
Henry Ford 1 25000 A
Greg Robert 2 35000 B
John Smith 3 40000 D
Henry Will 4 45000 F
Kile Jason 5 50000 I
;;;;
run;
proc format;
value NTitle
1='AM'
2='M'
3-5='SM';
value $Ngrade
'A'='Good'
'B'='Fair'
'C'-'F'='Poor'
'I'='Fail'
;
run;
data practice_pformat;
set practice_pformat;
format title ntitle. grade $ ngrade.;
run; I have updated the code above, for anyone getting a grade from 'c' to 'f' the grade should get get updated to "Poor", but after running the code, the output still shows the grade as d,f,i for john,henry,kyle respectively. Snapshot attached
... View more