libname deepak 'C:\SAS Files';
proc format;
invalue convert 'A+' = 100
'A' = 96
'A-' = 92
'B+' = 88
'B' = 84
'B-' = 80
'C+' = 76
'C' = 72
'F' = 65;
data deepak.grades;
input ID $3. Grade convert.;
*format Grade convert. ;
datalines;
001 A-
002 B+
003 F
004 C+
005 A
;
proc print data = deepak.grades;
run;
I get the following output
Obs ID Grade
1 001 .
2 002 .
3 003 .
4 004 .
5 005 .
I don’t understand why Grade shows up as a missing value.
Everything seems fine, including ID $3.
Now, in case I use ID : $3. Or use column input, I get the
desired output.
Kindly help
Deepak
Answer Posted / d.balavishnu
9
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Name and describe few sas character functions that are used for data cleaning in brief.
Mention few capabilities of sas framework.
What do you code to create a macro? : sas-macro
List down the reasons for choosing sas over other data analytics tools.
how to change the execute of macro
what is study design in while working with SAS? what are screening variables in SAS?
Have you used macros? For what purpose you have used? : sas-macro
Explain the purpose of substr functions in sas programming.
i have a dataset with 100 obs i want to generate title from 20th obs onwards with total observations. that should contain 100 obs.dont use firstobs and dnt split the data. use dataset block or proc report? how can we genarate;
what is PhaseIII, ODS, TLG, Macro and Proc in SAS
Which statement does not perform automatic conversions in comparisons?
if you were told to create many records from one record, show how you would do this using array and with proc transpose? : Sas programming
What is program data vector (pdv)?
Do you need to compute new variables? If so,should you do this before you execute the report-writing procedure?
explain the function of substr in sas? : Sas-administrator