Help using Base SAS procedures

Menu Bar association with FSEDIT Session

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 9
Accepted Solution

Menu Bar association with FSEDIT Session

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.


Accepted Solutions
Solution
‎04-03-2013 06:47 PM
Super User
Posts: 3,110

Re: Menu Bar association with FSEDIT Session

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


All Replies
Super User
Posts: 3,110

Re: Menu Bar association with FSEDIT Session

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;
Occasional Contributor
Posts: 9

Re: Menu Bar association with FSEDIT Session

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.

Solution
‎04-03-2013 06:47 PM
Super User
Posts: 3,110

Re: Menu Bar association with FSEDIT Session

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;

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 173 views
  • 3 likes
  • 2 in conversation