BookmarkSubscribeRSS Feed
aabbccwyt
Obsidian | Level 7

Hi,

The assignment I'm working asks me to use proc univariate to explore the 8 extreme observations in a worksheet, so I used the SAS Documentation and it says to use 

nextrobs=8;

which gives me an error: ERROR 180-322: Statement is not valid or it is used out of proper order.

Can anyone tell me how to fix it? Thank you.

5 REPLIES 5
mintbit
Obsidian | Level 7
i have a question relating to this. The nextrob option is not in parentheses but the (obs=n) is. are they not both options? How do I know when to put something in parentheses?
Tom
Super User Tom
Super User

@mintbit wrote:
i have a question relating to this. The nextrob option is not in parentheses but the (obs=n) is. are they not both options? How do I know when to put something in parentheses?

OBS= is a Dataset Option.  Like KEEP= or RENAME=. Those always appear in parentheses after a dataset name.  They are totally independent of PROC UNIVARIATE.  You can use dataset options pretty much anywhere you use a dataset name.

 

NEXTROB is an optional part the PROC UNIVARIATE statement.

mintbit
Obsidian | Level 7
Thank you for the reply Tom. Now I understand better.
Qingwei
Calcite | Level 5

use codes like below:

ods select extremeobs;
proc univariate data=pg1.eu_occ nextrobs=10;
var camp;
run;
ods trace off;

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!

Submit your idea!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 5 replies
  • 4117 views
  • 4 likes
  • 5 in conversation