An Idea Exchange for SAS software and services

by Valued Guide
on ‎09-13-2016 09:56 AM
Not sure I know what the problem is. Did not completely understand the quesstion.

It has been a part of base SAS for decades

/* T0099290 Simple user interface

Basically, the programmer hits a function key(PF1) or icon and bunch of
Linked menus allow the programmer to select a report to run.

HAVE (Two programs)

* create 1st programs;
data _null_;
   file "c:\temp\";
   put _infile_;
proc printto print="c:\temp\tax_100rgn.lst"
             log="c:\temp\tax_100rgn.log" ;
proc print data=sashelp.class(where=(sex='M'));
Title "Tax by Region";
proc printto;run;

* create 2nd programs;
data _null_;
   file "c:\temp\";
   put _infile_;
proc printto print="c:\temp\tax_100rgn.lst"
             log="c:\temp\tax_100rgn.log" ;
proc print data=sashelp.class(where=(sex='F'));
proc printto;run;

  A user interface with he option of running these

When the function key 'cntl Q; is pressed (or command or icon)

  cntl Q  home;inc c:\temp\;home;submit;

A new toolbar with two pull down menus and a window with this text

|  file tax      |

Choose Tax Report for Regions and States
See options on top menu bar

when you click on tax you get a submenu

    Tax by Region
    Tax by State

If you click on Tax by region the following
report is written to c:\temp\tax_100rgn.lst

Tax by Region

Obs    NAME       SEX    AGE    HEIGHT    WEIGHT

  1    Alfred      M      14     69.0      112.5
  5    Henry       M      14     63.5      102.5
  6    James       M      12     57.3       83.0
  9    Jeffrey     M      13     62.5       84.0
 10    John        M      12     59.0       99.5
 15    Philip      M      16     72.0      150.0
 16    Robert      M      12     64.8      128.0
 17    Ronald      M      15     67.0      133.0
 18    Thomas      M      11     57.5       85.0
 19    William     M      15     66.5      112.0


* compile this once;
proc pmenu catalog=sasuser.pmenu;
menu main;
   item 'file' menu=file;
   item 'tax'  menu=tax;
menu tax;
   item 'Tax by Region' selection=tax100;
   item 'Tax by State'  selection=tax110;
   selection tax100 "end;pgm;include c:\temp\; submit;";
   selection tax110 "end;pgm;include c:\temp\; submit;";
menu file;
   item 'End';

* save this driver save in c:/temp/;
data _null_;
window observe menu=sasuser.pmenu.main columns=65
  #5 @18 'Choose Tax Report for Regions and States'
  #6 @18 'See options on top menu bar';
display observe;

assigb function key cntl Q
cntl Q  -> home;inc c:\temp\;home;submit;

Note you can do this with a desktop icon
or a command ( tricky because pmenu has to be turned off;

by Super User
on ‎09-13-2016 10:21 AM

@rogerjdeangelis I'm not sure if PROC PMENU is supported in VA...Man Tongue

by SAS Super FREQ
on ‎09-14-2016 09:17 AM

Can you confirm which product this suggestion is for?

by SAS Super FREQ
on ‎09-14-2016 10:45 AM

If this is for SAS Visual Analytics, you can place a list control in a prompt container.

Idea Statuses
Top Liked Authors