I think that the answer A is correct ? But the key is C. why ? Thank you.
Could you give me more detail explain? Thank you .
Thank you for your advise, I appreciate.
Every time there is an INPUT statement, SAS first advances to the next line of raw data after reading the designated variables. So the input statement conditioned on "SUE" is already pointing at the next record - giving a value of 40 for age.
BUT ... if the first input has a trailing "@", then the conditional INPUT would read from the same record.
Thank you for your help.
Assuming the typo's in the SAS code were fixed and the misalignment of the columns of the data is just because of the use of a proportional font in the displaying the question then C is the right answer. If the typos remain then it will never generate any dataset so none of the answers are right.
The question is trying to access if you understand when SAS moves to the next line of an input file.
As @Tom says, the code needs to be fixed. The INFILE is spelled incorrectly and no data set would be created as posted.
67 data example; 68 in file 'something.txt'; -- 180 ERROR 180-322: Statement is not valid or it is used out of proper order. 69 input a $; 70 run;
The typo can be ignored. We suppose it was infile.
Thank you for your help.
Thank you for your help.
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.