An Idea Exchange for SAS software and services

Comments
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)

  tax_100Rgn.sas
  tax_110Fip.sas

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

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


WANT
  A user interface with he option of running these
  programs

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

Assignment
  cntl Q  home;inc c:\temp\utl_simpleui_dvr.sas;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


SOLUTION

* 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\tax_100rgn.sas; submit;";
   selection tax110 "end;pgm;include c:\temp\tax_110fip.sas; submit;";
menu file;
   item 'End';
run;

* save this driver save in c:/temp/utl_simpleui_dvr.sas;
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;
run;

assigb function key cntl Q
cntl Q  -> home;inc c:\temp\utl_simpleui_dvr.sas;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