BookmarkSubscribeRSS Feed
Obsidian | Level 7 bgs
Obsidian | Level 7

options firstobs=2 obs=12; /*run this independantly*/
/*we can set firstobs and obs as system options as well - it will consider these properties for all data sets*/



proc print data=sashelp.class;


I am still getting 19 observations in the output data page. (Please see attachments).

System Options - executed.PNGsystem options not applied in the output data.PNG
Super User

NOP, runs here as expected. 11 observations printed. See log:

15         options firstobs=2 obs=12; /*run this independantly*/
16         /*we can set firstobs and obs as system options as well - it will consider these properties for all data sets*/
18         proc print data=sashelp.class;
19         run;

NOTE: There were 11 observations read from the data set SASHELP.CLASS.
NOTE: PROCEDURE PRINT used (Total process time):
      real time           0.04 seconds
      cpu time            0.01 seconds

In which environment are you issuing your code?


It may be that your code is sent (from EG) to a different server instance (if you have parallel processing enabled).

Or you have code that is sent automatically before/after each execution that resets your options.


Obsidian | Level 7 bgs
Obsidian | Level 7
Am running the University Edition
Obsidian | Level 7 bgs
Obsidian | Level 7
I am a single user in the learning phase using SAS uni with VM ware VM on a Windows 8 64 bit machine. No server etc and no outside connectivity
Super User

I still see two options for where your problem comes from. Either the options statement is executed in a different environment than the proc print, or you have code specified that is sent before each execution from SAS Studio that resets the option.

You might consider marking this thread as solved and re-posting your question in the "Learn SAS/SAS Analytics U" or "SAS Programming/SAS Studio" community, as it seems to be related to the SAS University Edition and SAS Studio.


Edit: I DO NOT mean to mark any of my posts as the solution, as I could not supply one at the moment. Just mark the thread as solved.

Super User

Run the code from @Kurt_Bremser in a single run and post the log from that please.




Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Get the $99 certification deal.jpg



Back in the Classroom!

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

View all other training opportunities.

Discussion stats
  • 5 replies
  • 3 in conversation