Help using Base SAS procedures

Defining F12 key onto SAS 9.2

Reply
N/A
Posts: 0

Defining F12 key onto SAS 9.2

Hi All

I am trying to assign a new 'key' by defining a new function for F12, whereby pressing F12, I want it to clear log, clear output, zoom off and run.

I have done so by going to Tools > Options > Keys and writing the code next to F12 (zoom off; clear log; clear output;submit). And it works fine.

But the problem is that everytime I open sas I have to follow the same procedure as sas doesnt permanently remembers that.

I was wondering if someone knew how i could make it permanent where I dont have to keep writing it again and again?!

Thanks in Advance
Super Contributor
Posts: 273

Re: Defining F12 key onto SAS 9.2

Permanent for you, i think this means
saving in your user profile
how:
right click after you change the keydefinition contents
and chose ==> menu file /save as altkeys

at startup before working again,
select your altkeys in place of the dmkeys
from the tools/ options/ keys/ from the keywindows rightclick file/open


Andre
N/A
Posts: 0

Re: Defining F12 key onto SAS 9.2

Hi Andre

Thank you for replying back. I have tried what you suggested. I saved it as 'altkeys'. But when i start SAS and go onto tools > Keys.. it doesnt allow me to choose altkeys. It doesnt even have the option to choose. It just opens the dialogue box of dmkeys,

Any suggestion. I really appreciate it

Thanks
Valued Guide
Posts: 2,175

Re: Defining F12 key onto SAS 9.2

where is your SASUSER library pointing?
In that library, the catalog PROFILE is where these function key definitions are stored.
Often a sasuser.profile "CANNOT BE OPENED" at the start of a session. This kind of ERROR: message might explain why even when you save them, your preferences are not available in subsequent sessions.
There are many reasons why this error might occur.
Are you getting this error when you start SAS?

peterc
N/A
Posts: 0

Re: Defining F12 key onto SAS 9.2

Hi Peterc

I am not getting that error message when I open SAS. However I do get that message when I try to save my 'altkeys'. I get the following error message:

"ERROR: A lock is not available for SASUSER.PROFILE.Catalog"

What does this means? and how can i rectify it?

Thanks in advance
Valued Guide
Posts: 2,175

Re: Defining F12 key onto SAS 9.2

It means you have to save ALTKEYS somewhere else.
Possibly there is an option set like
noRsasuser
Or you might be using a SASUSER library already allocated to another session.
Use taskmanager to check if there is another SAS session running in your desktop.

Try
Libname myspace "!userprofile";
Then save your keys with something like
SAVE MYSPACE.MYPROF.MYKEYS

It would be a really good idea to discover why your PROFILE has become READONLY


peterC
N/A
Posts: 0

Re: Defining F12 key onto SAS 9.2

thank you for helping me.

In regards to the libname, would I have to write that everytime I open sas.

Also how can i figure out why it has become read-only?
Valued Guide
Posts: 2,175

Re: Defining F12 key onto SAS 9.2

Probably you have a path to which you can write that also persists (I wouldn't recommend using TEMP for that reason). In the SAS libraries window, create one NEW and tick the checkbox to assign library as SAS starts. Alternatively you can place a libname statement in the autoexec.SAS file.
Best: first discover why SASUSER.profile is read-only.
What path is assigned?
LIBNAME SASUSER LIST;
will reveal the path.
Have you more than one current SAS session running? (task manager)
How do you start a SAS session?

there are more diagnostic questions, but these might reveal the cause of the problem.

good luck
peterC
N/A
Posts: 0

Re: Defining F12 key onto SAS 9.2

Hi PeterC

thank you for all the leads, i ll be sure to try them and figure out why its read-only.

Thanks
Ask a Question
Discussion stats
  • 8 replies
  • 779 views
  • 0 likes
  • 3 in conversation