BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
gusfryk01
Calcite | Level 5

I would like to do what it says in the title of this thread but can´t find a way to do it. Any solutions?               

1 ACCEPTED SOLUTION

Accepted Solutions
Peter_C
Rhodochrosite | Level 12

The issue is that your SAS session does not "start in" the folder of the sas program you double-click but (iirc) in the windows\system32 folder.

Verify this by examining the status bar (very bottom of sas window) when you open a program with double-click.

If you wish to continue working this (diuble-click) way there are few options available.

1

place a copy of your autoexec.sas in that windows\system32 folder

Or 2

Create a windows environment variable called sas_options holding value

-initcmd "listing off"

Or 3

Update the installed SAS config file by adding (near the top)

-initcmd "listing off"

(backup that file before changing it)

Since I spend most of my time on SAS programming I always have a SAS session open. To review another program I just drag it to SAS, so I don't need these methods.

Good luck

peter

View solution in original post

8 REPLIES 8
gusfryk01
Calcite | Level 5

Thank you Amir, that works great for removing the output window but unfortunately not permanently, When I start SAS again after closing the output window comes back again.

Peter_C
Rhodochrosite | Level 12

Add the statement

Dm 'listing off';

to an autoexec.sas file in the folder where you start SAS

Then your sas sessiin will start without that output window

Good luck

peterC

gusfryk01
Calcite | Level 5

Thank you Peter!

This would have solved my problem completely if it wasn´t for one tiny detail. When I open SAS by clicking on a SAS-file the output window appears like before.

Otherwise it is gone like you said it would  be. I created a file named autoexec.sas (that file didn´t previously exist) in my "current folder" and pasted the code you provided.

Thanks again!

Peter_C
Rhodochrosite | Level 12

The issue is that your SAS session does not "start in" the folder of the sas program you double-click but (iirc) in the windows\system32 folder.

Verify this by examining the status bar (very bottom of sas window) when you open a program with double-click.

If you wish to continue working this (diuble-click) way there are few options available.

1

place a copy of your autoexec.sas in that windows\system32 folder

Or 2

Create a windows environment variable called sas_options holding value

-initcmd "listing off"

Or 3

Update the installed SAS config file by adding (near the top)

-initcmd "listing off"

(backup that file before changing it)

Since I spend most of my time on SAS programming I always have a SAS session open. To review another program I just drag it to SAS, so I don't need these methods.

Good luck

peter

RichardinOz
Quartz | Level 8

I can't validate this at present but if you have some control over your desktop (its not completely locked down) go th Control Panel - Default Programs and find the entry for .sas files.  It should specify sas.exe with some additinal parameters.  You can add -initcmd "listing off" to the parameters after sas.exe

Richard.

gusfryk01
Calcite | Level 5

Thanks a lot! I tried what I thought would be the easiest solution and added the autoexec-file to my system32 folder and it worked!

Peter_C
Rhodochrosite | Level 12

Adding a sasv9.cfg file to that folder allows you to add "invocation-only" options

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 8 replies
  • 3814 views
  • 4 likes
  • 4 in conversation