BookmarkSubscribeRSS Feed
GeorgeSAS
Lapis Lazuli | Level 10

Hello all,

 

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

 

Thanks

 

 

4 REPLIES 4
Shmuel
Garnet | Level 18

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.

ballardw
Super User

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.

GeorgeSAS
Lapis Lazuli | Level 10

Thank you!

 

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

FreelanceReinh
Jade | Level 19

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.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 1014 views
  • 2 likes
  • 4 in conversation