3

Running some random code I found on the internet a few weeks ago has changed the pagesize and linesize defaults of my SAS output window. I don't remember what code it was though unfortunately. The current default pagesize is 15, which is generally way too small.

Does anyone know how to change the default?

I can change this using "options pagesize=80" or something but that only lasts for the current session. I can also change it in the GUI from Tools>Options>Output>Display but any changes won't save to my next session.

Any tips would be much appreciated! This is kind of excruciating. Thanks!

user3667133
  • 147
  • 2
  • 9

2 Answers2

2

Your editor preferences are stored in a SAS catalog. Only 1 SAS session can open/write to this catalog at a single time. You can find out the location of the catalog that your SAS session is using by running this code:

proc options;run;

... And then search for SASUSER in the log.

If you launch SAS and it tries to use a SASUSER catalog that is already in use by another session, it will give you the message:

WARNING: Unable to copy SASUSER registry to WORK registry. Because of this,
WARNING: you will not see registry customizations during this session.

Are you seeing this message when you launch SAS? If so, it means that you have another instance of SAS open on your machine that has that catalog open. You have 2 options:

  1. Close all instances of sas.exe on your machine (via task manager, be sure to check process names, not just the applications tab) then try making the change again.
  2. Setup another shortcut to launch sas.exe. On this shortcut, specify a different SASUSER location like so:

    sas.exe -SASUSER "d:\sas\profile2.cfg"

Also, I'm assuming you have the option to 'Save settings on exit' checked. Or if this isn't the case you can save your current settings by typing the command save into the command bar.

EDIT :

Some additional places to check that may override any profile settings:

  • Your sasv9.cfg file. Again, run proc options;run; and search for sasv9.cfg. It will give you the location of this file. If the file simply contains a list of other filenames, be sure to open up those 'included' files and check those.

  • Your autoexec file. If your SAS environment is specifying an autoexec file to load at launch, make sure it's not adjusting them there. Also if it is using an autoexec file, make sure you have all the loggin options turned on as the first thing that happens when SAS loads: option mprint notes source source2;.

  • Try right-clicking on SAS and choose 'Launch as Admininstrator'. If your profile is in a read-only location due to priveleges, perhaps your settings aren't being saved.

  • Look in your windows event log to see if SAS is loggin any errors there.

Robert Penridge
  • 8,424
  • 2
  • 34
  • 55
  • Thanks. I don't get that warning message in my log on launching SAS so I'm not sure if that is the issue. I do have "Save settings on exit" checked – user3667133 Dec 09 '14 at 17:04
  • 1
    @user3667133 Ok, then if you're not getting that warning message you have a different issue. I've updated the answer with some additional things to check. – Robert Penridge Dec 09 '14 at 18:37
1

According to the SAS for Windows documentation, pagesize is controlled in part by the default printer. 15 is the minimum value, so it's possible that there is something wrong with your default printer and/or SAS is doing something odd (such as not finding one). If 'some random code' changed your default printer, you could simply try changing it back (see your SYSPRINT option).

I believe you can override this in your sasv9.cfg, commonly located in a path like C:\Program Files\SAS\SAS Foundation\9.4\nls\en\sasv9.cfg (varying based on what language version of SAS you use and your version, plus installation details), by simply adding -pagesize=80 or whatever you wish the default to be. You also can add options pagesize=80; to your autoexec.sas (or a new autoexec.sas if you don't have one already); see this paper or the documentation for more details on that.

Joe
  • 62,789
  • 6
  • 49
  • 67
  • 1
    Ah this totally helped. I started investigating the printer and ended up at File>Print Setup somehow. The default pagesize was set to 12 there, making the default pagesize under Tools>Options>Output>Display be its minimum of 15. I clicked the "Default" button under File>Print Setup and it fixed everything back to normal, even when I restart my SAS session. Thanks for the help! – user3667133 Dec 09 '14 at 22:24