BookmarkSubscribeRSS Feed
bgs
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;
run;

 

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
5 REPLIES 5
Kurt_Bremser
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*/
17         
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.

 

bgs
Obsidian | Level 7 bgs
Obsidian | Level 7
Am running the University Edition
bgs
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
Kurt_Bremser
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.

Reeza
Super User

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

 

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 5 replies
  • 1322 views
  • 0 likes
  • 3 in conversation