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 ? | 1 Yes | 4 No |
Post New Answer View All Answers
What is factor analysis?
What do the sas log messages “numeric values have been converted to character” mean? What are the implications?
How would you determine the number of missing or nonmissing values in computations?
How do you add a number to a macro variable? : sas-macro
how we can create a FLAG datasets? Ex:-ID age_group no_persons 1 to 10 10 to 20 3 11 to 20 21 to 30 7 21 to 3o 31 to 40 5
What are common programming errors committed in sas
how does sas handle missing values in functions? : Sas programming
How do you control the number of observations and/or variables read or written? Approximately what date is represented by the SAS date value of 730?
What is the purpose of trailing @ and @@? How do you use them?
How to specify variables to be processed by the freq procedure?
I have a SCD Type 2 Dimention for Location In which A Sales Office in Having two Surrogate Keys just because of the change in it's Sales Group. SKey SalesGroup Sales Office BeginDate EndDate 280 SG1 SO1 01APR2000 01APR2010 281 SG2 SO1 02APR2010 31MAR2999 Now while loading the Fact, the Lookup ir returning SKey 280 for records before and after 01APR2010. I am not able to give WHERE condition in the Lookup Properties (TranDate between BeginDate and EndDate). Please help.
what is broad cast agent? : Sas-bi
Enlist the functions performed by sas.
What are the functions which are used for character handling functions?
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