1 new york 7,262,700
2 los angeles 3,259,340
3 philadelphia 1,642,900
how to read the above data using input statement
consider the above data is in txt format externally
u have to use infile and input statement.
Answer Posted / guest
data temp;
infile datalines ;
input sno city & $12.
pop : comma.;
datalines;
1 new york 7,262,700
2 los angeles 3,259,340
3 philadelphia 1,642,900
;
The ampersand (&) modifier is used to read character values
that contain embedded blanks.
The colon (:) modifier is used to read nonstandard data
values and character values that are longer than eight
characters, but which contain no embedded blanks.
| Is This Answer Correct ? | 0 Yes | 3 No |
Post New Answer View All Answers
How will you react when, while consulting a SAS documentation manual to get an answer to a problem, someone says hey, I thought you were supposed to know all that stuff already, and not have to look it up in a book?
what are some good sas programming practices for processing very large data sets? : Sas programming
how does sas handle missing values in sort order? : Sas programming
For clinical entire study how many tables will create approx?
What is the difference between match merge and one to one merge?
what versions of sas have you used (on which platforms)? : Sas programming
name several ways to achieve efficiency in your program? : Sas programming
What is auto call macro and how to create a auto call macro? What is the use of it? How to use it in sas with macros? : sas-macro
What do you know about symput and symget?
What is proc sort?
how would you create a data set with 1 observation and 30 variables from a data set with 30 observations and 1 variable? : Sas programming
what is the one statement to set the criteria of data that can be coded in any step? : Sas programming
Mention sas system options to debug sas macros.
what is the function of catx syntax? : Sas-administrator
what can you learn from the sas log when debugging? : Sas programming