Hey,
I have been trying to make a simple menu bar like shown in an example:
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.
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;
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;
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.
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;
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.