Hello all,
I went through the available resources to learn about the PMENU procedure. But I haven't really been able to figure out how to configure dialog boxes to take in user input and put it into a dataset. I know that we need to specify a command string to define what the dialog is meant to do with the user input. In the SUGI paper from http://www.sascommunity.org/sugi/SUGI94/Sugi-94-248%20Staum%20Staum.pdf I observed a sample command string to be dialog detlinfo 'end;include rptcode(detail);c xx @1;submit';
Frankly I didn't understand it at all. Now I am trying to make my own utility of sorts in order to take in 4 variables through dialog boxes.
And I am unsure of what needs o be input in place of the command string to get the input from the user and input it into one dataset.
My program is as follows:
libname prith '/home/dubby';
proc pmenu catalog=prith.menus;
menu BASE;
item 'Enter parameters' menu=parameters;
item 'Bye';
menu parameters;
item 'Study' Dialog=study Help='Enter the Study';
item 'Study' Dialog=dbl Help='Enter the Database Lock date';
item 'Study' Dialog=lckdt Help='Enter the Lock request date and time';
item 'Study' Dialog=lckus Help='Enter the ID of the user running the program';
Dialog study 'Study';
text #2 @3 'Enter the study';
text #4 @9 len=8;
Dialog dbl 'Database_Lock_date';
text #2 @3 'Enter the Database Lock date';
text #4 @9 len=9;
Dialog lckdt 'Lock_requestD&T';
text #2 @3 'Enter the Lock request date and time';
text #4 @9 len=22;
Dialog lckus 'Lockuser';
text #2 @3 'Enter the ID of the user running the program';
text #4 @9 len=10;
run;
quit;
Kindly advice.....
Hi all,
I was able to find a solution to the previous query, but another question arises in the midst of that. Is it possible to keep the windowing environment open in order to enter all the parameters that I need.
The modified code is as follows:
libname prith '/home/gurunatp/utilitytask';
proc pmenu catalog=prith.menus;
menu BASE;
item 'Enter parameters' menu=parameters;
item 'Bye';
menu parameters;
item 'Study' Dialog=study Help='Enter the Study';
item 'Database Lock date' Dialog=dbl Help='Enter the Database Lock date';
item 'Lock request date and time' Dialog=lckdt Help='Enter the Lock request date and time';
item 'Lock user' Dialog=lckus Help='Enter the ID of the user running the program';
Dialog study 'end;include prith.dat1.sas;c xx @1;submit';
text #1 @1 'Enter Study:';
text #3 @15 len=8;
Dialog dbl 'end;include prith.dat2.sas;c xx @1;submit';
text #1 @1 'Enter Database Lock date:';
text #3 @15 len=9;
Dialog lckdt 'end;include prith.dat3.sas;c xx @1;submit';
text #1 @1 'Enter the Lock request date and time:';
text #3 @15 len=23;
Dialog lckus 'end;include prith.dat4.sas;c xx @1;submit';
text #1 @1 'Enter the ID of the user running the program:';
text #3 @15 len=20;
run;
quit;
In the code above, dat1.sas, dat2.sas, dat3.sas, dat4.sas are all dataset statements to accept each entered parameter as a variable in their respective dataset.
Kindly advice.....
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9.
Early bird rate extended! Save $200 when you sign up by March 31.
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.
Ready to level-up your skills? Choose your own adventure.