How to block some parameter on a command

5 pts.
IBM iSeries
iSeries Commands
Hi , i want to refuse on the WRKSPLF commando the use of *All or generic parameter on the User parameter and force it to *current . I've worked on the exit program but it works only if the commando comes directly from the commandLine.If the prompt is used , the user can use *all or a generic and go through the exit program.Is there a way to refuse the utilisation of some parameters from the prompt of the command.

Answer Wiki

Thanks. We'll let you know when a new response is added.

the normal way to do this would be to create your own version of the command and then place it higher in the library list than QSYS

it is not a good idea to change the QSYS version of a command as
1) this can cause other processes to fail and
2) it will be overwritten when you do an operating system upgrade

Take some time to study up on selective prompting of CL commands which has been in effect since System 38 days. Using keywords you can force prompting for only certain parameters on a command and even force a value and protect the parameter from being modified. For your example you would add an option to a menu to execute WRKSPLF ?*SELECT(*CURRENT). The ?* keyword says only this parameter is prompted, we force a value of *CURRENT and protect the parameter from being changed.


Of course, then the user may simply use QSYS/WRKSPLF and bypass the version higher in the library list entirely. A given user won’t know to use library qualification; but sooner or later, one user will see a programmer do it. The method <i>will get passed around</i>.

And you won’t know about it until some unpredictable future date.

The real answer is not to worry about the user using *ALL or generic*. There is nothing the user can do with it because you have set authorities correctly. You don’t allow users to have *SPLCTL special authority for example. (If you do, then you can’t stop them by taking *ALL or generic* off the WRKSPLF command.)

The correct answer is to correct the authorities that are wrong. As long as authorities are wrong, this won’t fix the problem.


Discuss This Question:  

There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.


Share this item with your network: