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


Please Help Members By Posting Answers For Below Questions

Name and describe few sas character functions that are used for data cleaning in brief.

662


Mention few capabilities of sas framework.

690


What do you code to create a macro? : sas-macro

576


List down the reasons for choosing sas over other data analytics tools.

806


how to change the execute of macro

1671






what is study design in while working with SAS? what are screening variables in SAS?

1679


Have you used macros? For what purpose you have used? : sas-macro

557


Explain the purpose of substr functions in sas programming.

561


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;

1965


what is PhaseIII, ODS, TLG, Macro and Proc in SAS

3901


Which statement does not perform automatic conversions in comparisons?

1202


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

540


What is program data vector (pdv)?

630


Do you need to compute new variables? If so,should you do this before you execute the report-writing procedure?

1467


explain the function of substr in sas? : Sas-administrator

552