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-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

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
  • 1041 views
  • 0 likes
  • 3 in conversation