|
Hi Mel, No problem for the confusion, I didn't state my requirements.... I'm doing is prep work for our annual physical inventory. Part of the preparations is to disable all user profiles except the physical inventory user and the IT staff. In prior years we had a lot of manual effort to remember which profiles were *ENABLE before we started... So I wrote a CL to do a DSPUSRPRF USRPRF(*ALL) OUTTYPE(*OUTFILE)... and loop through it. If a user profile has *ENABLE status, I then loop through my "exclusions" list to see if they should be kept active. The CL works perfectly, and my command works fine as a standard list. What I want to do is provide a "default" list of user profiles that should not be disabled; these include the physical inventory user and IT staff. Right now I key the list when I prompt the command. Now I think the plan is to code a prompt override program to build the list parameter for me at prompt time. I've coded them before, that isn't a problem. With a parm definition such as parm kwd(exclude) type(*char) len(10) min(1) max(10) prompt('List') and adding keyparm(*yes) I got an error "MAX > 1 not allowed with KEYPARM(*YES)". I'm thinking I may need a "dummy" constant parameter as the key parameter to make this work. The exclusion list is the only parameter defined on the command. Having MIN(1) keeps at least one user profile alive in case bad things happen. Since inventory is tomorrow, I don't have time to fully finish this, but hopefully will have it prepared for next year! Thanks, Loyd On Fri, 24 Oct 2003 16:02:19 -0500, Mel Rothman <mel@xxxxxxxxxxxxxx> wrote: >Loyd, > >I misunderstood. > >However, you can't specify a list as the default. In fact, the default for >CHGUSRPRF's SPCAUT parameter is *SAME (determined by leaving USRPRF blank and >pressing F9). > >It appears that all of CHGUSRPRF's parameters except USRPRF are controlled by >prompt override program QSYS/QSYPRPOP. Once the USRPRF parameter is entered, >the prompt override program using that parameter's value sets up the "default" >values of the remaining parameters from that user profile object. > >I have never coded a prompt override program or a command definition that uses >one, but my guess is, as you surmised, that a prompt override program is the >way >to accomplish what you want to do. > >Mel Rothman >Mel Rothman, Inc. -- Mediocrity: It takes a lot less time and most people won't notice the difference until it's too late. <http://www.despair.com/> loyd@xxxxxxxxxxxxxx ICQ#504581 http://www.blackrobes.net/
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.