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

Hey,

I have been trying to make a simple menu bar like shown in an example:

Program

libname proclib

'SAS-data-library';

proc pmenu catalog=proclib.menucat;
   menu project;

      item 'File' menu=f; item 'Edit' submenu=editmnu;

item 'Scroll' menu=s;

item 'Help' menu=h;

      menu f;

item 'Goback' selection=g;

item 'Save';

selection g 'end';

      submenu editmnu sashelp.core.edit;

      menu s;

item 'Next Obs' selection=n;

item 'Prev Obs' selection=p; item 'Top';

item 'Bottom';

selection n 'forward';

selection p 'backward';

      menu h;

item 'Keys';

item 'About this application' selection=hlp;

selection hlp 'sethelp user.menucat.staffhlp.help;help';

quit;

Then I needed to associate this menu bar with FSEDIT session with a code: setpmenu proclib.menucat.project.pmenu;pmenu on    (as shown in example)

However, I have tried many ways to make it work, but I couldnt. Can You help me out with this?

This example is in: Base SAS(R) 9.3 Procedures Guide, Second Edition

Thank You.

1 ACCEPTED SOLUTION

Accepted Solutions
SASKiwi
PROC Star

As mentioned pmenu on is not going to work in SAS code, however you may be able to do it this way by invoking FSEDIT via a command in code:

dm 'fsedit data = mydataset screen = Proclib.Menucat.Project; pmenu on' fsedit;

View solution in original post

3 REPLIES 3
SASKiwi
PROC Star

The SETPMENU is a command not code so needs to be typed into the FSEDIT command line, then you just press ENTER.

You may also be able to do this like so in an SCL program within the FSEDIT screen:

fseinit:  
    call execcmd('setpmenu proclib.menucat.project.pmenu;  pmenu on;'); 
return; 
init: 
return; 
main: 
return; 
term: 
return;
Efka
Calcite | Level 5

Thank You. And now how do I put this line  ' setpmenu proclib.menucat.project.pmenu;  pmenu on; ' into FSEDIT procedure correctly?

If I try something like

proc fsedit

screen = Proclib.Menucat.Project;

pmenu on;

Run;

It does not run, shows errors.

SASKiwi
PROC Star

As mentioned pmenu on is not going to work in SAS code, however you may be able to do it this way by invoking FSEDIT via a command in code:

dm 'fsedit data = mydataset screen = Proclib.Menucat.Project; pmenu on' fsedit;

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 3 replies
  • 979 views
  • 3 likes
  • 2 in conversation