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
Mention the category in which sas informats are placed?
how could you generate test data with no input data? : Sas programming
What are the prime responsibilities of data integration administrator? : Sas-di
How to create an external dataset with sas code?
What is your favorite all time computer book? Why?
What areas of SAS are you most interested in?
Explain the purpose of substr functions in sas programming.
Do you need to rearrange the order of the data for the report?
How is character variable converted into numeric variable and vice versa?
Hello Friends, am new to this forum and am not good at sas progarmming. please can any one of you send me couple of sample large sample SAS Jobs which can you use 200 MB of data and other sas job upto 25GB of data. am doing a performance testing on our legacy systems and new upgraded system. I would really appreciate if you can do me this favor Thank you Priya
what is sas metadata repository? : Sas-bi
what is sas business intelligence? : Sas-bi
How you can read the variables that you need?
how many display types available in sas bi dashboard? : Sas-bi
what are input dataset and output dataset options? : Sas programming