One of the most extremely useful (and poorly understood) SAS System functions is the INPUT function. It takes the form:variable=INPUT (variable,informat);
The traditional use is to reread a character variable with a numeric format,executing a character-to-numeric conversion.
In this example you have a collection of human temperatures (in degrees F).Instead of entering 98.6, the letter N was used (for Normal).The following program reads the data and converts the N's to 98.6:
Since you have a mixture of numeric and character data,you have to read all the values as character data.Otherwise,reading N as a numeric value would result in a missing value for that observation.Let's see what happens when the program reads the first few data values.DUMMY is first assigned a value of 99.7 (remember that this is a character string).Since this is not equal to N, the variable TEMP is set to 99.7 and stored as a numerical value because of the 5.informal.The next value for DUMMY is N.The IF statement is true,and the variable TEMP is set to 98.6 (a numeric value).
SAS Programming Related Tutorials
|SASS (Syntactically Awesome Style sheets) Tutorial||R Programming language Tutorial|
SAS Programming Related Interview Questions
|Logistics Interview Questions||SAS Programming,SQL server Interview Questions|
|Clinical SAS Interview Questions||SASS (Syntactically Awesome Style sheets) Interview Questions|
|SQL Server Analysis Services (SSAS) Interview Questions||R Programming language Interview Questions|
|SAS DI Interview Questions||Advanced SAS Interview Questions|
|Base Sas Interview Questions||SAS Macro Interview Questions|
|Clinical Data Management Interview Questions|
Sas Programming Tutorial
Input And Infile
Set, Merge, And Update
Table Lookup Tools
Proc Means And Proc Uimivariate
All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.