ElearnSAS.com

ElearnSAS.com
SAS Learning Platform

Base SAS 105

The following SAS program is submitted:
data numrecords;
infile 'file-specification';
input @1 patient $15.
relative $ 16-26 @;
if relative = 'children' then
input @54 diagnosis $15. @;
else if relative = 'parents' then
input @28 doctor $15.
clinic $ 44-53
@54 diagnosis $15. @;
input age;
run;
How many raw data records are read during each iteration of the DATA step during execution?
A. 1
B. 2
C. 3
D. 4
Click Comment link to get answer

26 comments:

  1. Anonymous5:27 PM

    How do you come to know? or how to check the iteration

    please explain me.
    Thanks in advance

    ReplyDelete
  2. Anonymous5:56 AM

    Only one raw data record (i.e. text file) is used as a data source for the 'infile' statement.

    ReplyDelete
  3. Anonymous12:31 AM

    To anon - I see, so since there is only one raw file being read, there is only one iteration? =(

    ReplyDelete
  4. As each input statement other than last (input age) ends with @, SAS will not advance to next raw data record. Only after age is read, SAS will finish the datastep iteration and read next record.

    For example in case below, in there are two data step iteration and during each iteration it read one raw data record from raw data (datalines). So answer is A.

    data a;
    input age @;
    if age > 80 then input bp @;
    input gluco;
    datalines;
    81 220 110
    50 125
    ;
    run;

    ReplyDelete
    Replies
    1. Anonymous1:05 PM

      Thank You.
      Excellent Explanation.

      Delete
    2. Anonymous5:05 PM

      SASCERT, good point! That's what I wanted to say!

      Delete
  5. "raw data records" does not equal "raw data files." Raw data records are the lines of data in the raw data file.

    ReplyDelete
  6. Anonymous4:32 PM

    Sakar sham;

    Before reading the comments , in my mind I was thinking the iteration is looking for one single variable from the data " RELATIVES" therefore my answer was A as 1 variable.
    sorry got right answer but with incorrect analogy.

    ReplyDelete
  7. Anonymous10:57 AM

    One iteration for each observation.
    For each raw data records mean each observation , one iteration.

    ReplyDelete
  8. Anonymous11:31 AM

    raw data record is how many lines of data are read so during an iteration of data step always one observation or data line is read. After which it reaches the end of record pointer

    ReplyDelete
  9. A: 1 (because of Concept of trailing @)

    ReplyDelete
  10. For latest and updated SAS certification dumps in PDF format contact us at completeexamcollection@gmail.com

    ReplyDelete
  11. @ holds data until it reaches end of data step or input statement that does not end with trailing @ so in this case shouldn't there be two data records read in each iteration?
    please clarify

    ReplyDelete
  12. Data analysis is can be basically defined as the procedure of examining data, processing it, modifying and revising the information with only one purpose in mind to make the entire procedure of making a decision worthwhile with the help of pertaining data and coming to a solid conclusion. See more raw data for statistical analysis

    ReplyDelete
  13. Anonymous12:36 AM

    Actually this a poorly written question since it depends on whether the input goes beyond the length of data record. In that case it stop reading the current record and that last input statement will read from the next record.

    As an example.

    data numrecords;
    infile cards;
    input @1 patient $15.
    relative $ 16-26 @;
    if relative = 'children' then
    input @54 diagnosis $15. @;
    else if relative = 'parents' then
    input @28 doctor $15.
    clinic $ 44-53
    @54 diagnosis $15. @;
    input age;
    cards;
    1 2 3 4 5 6 7 8 9 10
    11 12 13 14 15 16 17 18 19 20
    21 22 23 24 25 26 27 28 29 30
    ;
    run;

    proc print;
    run;

    ReplyDelete
  14. Very helpful.
    Just passed the exam.

    ReplyDelete
    Replies
    1. Anonymous1:19 PM

      hi
      what kind of questions came?

      Delete