Bad example

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 12
Accepted Solution

Bad example

Just something I saw while reading SAS Help ...

Go to SAS(R) 9.3 Statements: Reference

and scroll down to example 6.

Doesn't work.

It's also wrong in 9.4 documentation.

If any SAS employee is reading this, can you please pass it on to the 'help' staff.

Thanks


Accepted Solutions
Solution
‎03-28-2014 06:21 AM
Super Contributor
Posts: 644

Re: Bad example

I think the point is that the doco only shows one line (the last) put to the log, where all 3 satisfy the condition.

Richard

View solution in original post


All Replies
Respected Advisor
Posts: 3,777

Re: Bad example

What part of the example "Doesn't work"?  Do you run the program?  I did and it appears to produce the expected result.  Or at least the result I expect from my interpretation of the code.  The description of the output is not complete...

The program writes the following line to the SAS log:

----+----1----+----2

219 red 210 192

That seem like a minor infraction to me.

15         data team;
16            input id team $ score1 score2;
17            if id le 1000 then
18              do;
19                put _infile_;
20                delete;
21              end;
22            datalines;

032 red 180 165                                                                
049 yellow 145 124                                                             
219 red 210 192                                                                
NOTE: The data set WORK.TEAM has
0 observations and 4 variables.
Solution
‎03-28-2014 06:21 AM
Super Contributor
Posts: 644

Re: Bad example

I think the point is that the doco only shows one line (the last) put to the log, where all 3 satisfy the condition.

Richard

Respected Advisor
Posts: 3,777

Re: Bad example

Oh I guess "Doesn't work" is code for the description is wrong.

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 173 views
  • 0 likes
  • 3 in conversation