DATA Step, Macro, Functions and more

Disable F3 for SAS base

Reply
Regular Contributor
Posts: 241

Disable F3 for SAS base

Hello all,

 

How to configure SAS base to disable F3 key which can submit SAS code? 

 

Thanks

 

 

Trusted Advisor
Posts: 1,579

Re: Disable F3 for SAS base

Posted in reply to GeorgeSAS

I have no approach now to sas base.

As much as I remebre you can open window menu: Tools > Keys

and edit the PF keys as you want.

Super User
Posts: 11,343

Re: Disable F3 for SAS base

Posted in reply to GeorgeSAS

The default KEYS menu should open with F9.

The entry for F3 should look like:

end; /*gsubmit buffer=default*/

if you make that look like:

/*end;*/ /*gsubmit buffer=default*/

the F3 key will do nothing after you close the Keys window.

 

Note that you should be in editor, log or output window to get the default keys for program execution. Different windows have different Keys assigned.

Regular Contributor
Posts: 241

Re: Disable F3 for SAS base

[ Edited ]

Thank you!

 

this will works on current SAS session, how to configure for any SAS base with same setting as default?

Trusted Advisor
Posts: 1,118

Re: Disable F3 for SAS base

Posted in reply to GeorgeSAS

Those key definitions are stored in the user profile catalog, sasuser.profile (see Files Used by SAS). Normally, this happens automatically when you close the KEYS window. A subsequent SAS session would then (automatically) access the modified profile catalog including the new key definition.

 

However, if the SAS system option RSASUSER is in effect, the user profile catalog is read-only and on closing the KEYS window you will get the error messages:

ERROR: File I/O Error.  Unable to permanently save KEYS settings.
ERROR: Cannot open entry DMKEYS.KEYS for write access - catalog SASUSER.PROFILE is opened for read access.

This option can only be changed (to NORSASUSER) at SAS invocation or in your config file. The latter typically also contains the definition of library SASUSER where the mentioned profile catalog is located.

 

System option RSASUSER enables multiple SAS sessions to share a common profile catalog (so that in particular the two notes mentioned below do not occur when a second, third, ... session is started). With the shipped default, NORSASUSER, a second session cannot access the same user profile catalog, hence the modified key definitions are not available.

 

So, to make the key definition permanent, open SAS with option -NORSASUSER while no other SAS session (with option RSASUSER) is open. Make sure that the log of this new SAS session does not contain notes like these:

NOTE: Unable to open SASUSER.PROFILE. WORK.PROFILE will be opened instead.
NOTE: All profile changes will be lost at the end of the session.

Then modify the key definition and close the session.

 

Personally, I have created two start icons for SAS in my Windows Start Menu: "SAS" and "SAS (NORSASUSER)". The latter sets option NORSASUSER and I use it only if I want to change key definitions (or make other changes to my user profile), the former sets option RSASUSER and is for everyday use.

Ask a Question
Discussion stats
  • 4 replies
  • 151 views
  • 2 likes
  • 4 in conversation