05-03-2012 02:48 PM
every time I open SAS i have to press 'Ctrl+s' and then browse to the file with my sas code file, press open and it pops up in the editor window.
My question is.
Is there a way to do this auto, like the default start-up file?
05-04-2012 06:22 PM
Is it the same file every time? Or the last one used? Do you want it to run on open or not?
Also you may want to try going to Tools> Options > Preferences > General and make sure that the 'Recently used file list' box is checked. And set a number in the box below immediately below for how many files you want to have available (I use 25). Then clicking on the File menu will bring up the recently used list where you can select a file, which should at least save time.
05-04-2012 07:04 PM
there is an option you can specify before SAS starts
-initcmd 'wedit "your sas program path\file.sas" '
on the command line
in a config file
in user environment variable sas_options
For simplicity, I start SAS with no options, but specify that the folder in which it starts is my preferred place and there I create an empty sasv9.cfg file into which I would place that -initcmd option
05-07-2012 12:24 PM
are you running SAS in Win7?
I run SAS on winVista32 which still suffers from the "old problem" caused by microsoft ole automation server. That handles the launching of registered file types and sets the "current folder" where SAS will start, as windows\system32! I cannot normally write there, and I support legacy code which expects the current folder to be "writeable" (for example, to write a .log or .altlog file).
If you are running SAS on win7, with your proposal "double-click this myprogram.sas file ,and SAS will open it for you defaultly", does the SAS session start in the folder of "myprogram.sas" or in the windows\system32 folder or somewhere else?
05-09-2012 10:02 AM
I can test it on my pc W7 32b with 9.3.0 and
if i modify the config file in nls\en to neutralize both
the -set MYSASFILES and the eventual -SASINITIALFOLDER
when i go starting from D:\tabsas
and rightclic on the item "open with sas 9.3" (sorry the double clic is acting with the sas universal viewer 1.2)
the program is opening in the enhanced pgm editor
indicating down at the limit the directory D:\tabsas\
only seeing File / opening a program shows that it is located at ....My SAS Files\9.3\ d:\... in my case
only seeing File /save as show a location at d:\tabsas\
in the reverse order yet only seeing but not acting on a button
File / the save shows d:\tabsas\
and then File / opening a sas program shows d:\tabsas\
a discovery for me ! so the sequence you are opening items of the File Menu have effects!!!!