Help using Base SAS procedures

System Options

Reply
Occasional Contributor bgs
Occasional Contributor
Posts: 15

System Options

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
Super User
Posts: 6,935

Re: System Options

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.

 

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Occasional Contributor bgs
Occasional Contributor
Posts: 15

Re: System Options

Am running the University Edition
Occasional Contributor bgs
Occasional Contributor
Posts: 15

Re: System Options

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
Posts: 6,935

Re: System Options

[ Edited ]

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.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Super User
Posts: 17,797

Re: System Options

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

 

Ask a Question
Discussion stats
  • 5 replies
  • 384 views
  • 0 likes
  • 3 in conversation