440 pts.
 Personalize Commands how can I personalize commands like WRKUSRPRF, WRKCFGSTS or CHGUSRPRF
Hi, friends !, today I have another question, how can I personalize commands like WRKUSRPRF, WRKCFGSTS or CHGUSRPRF. this commands have many options but I need show only one or another to a user (a comun user, I don't have a operator).

Software/Hardware used:
ASKED: May 15, 2008  1:47 PM
UPDATED: April 21, 2010  3:07 PM

Answer Wiki:
Hi, I would suggest that you create your own commands with only the parmeters that you need. For example you create a command called USRPRF with only a few parameters - this command uses CL program USRPRF which does a WRKUSRPRF or CHGUSRPRF based on the parameters that your user has entered. Regards, Martin Gilbert. The operating system allows selective prompting on command parameters so you can limit the amount of parameters you want a user to see. Cheeck the following link to this topic. http://publib.boulder.ibm.com/infocenter/iseries/v5r4/topic/rbam6/secpr.htm Hope this helps. WaltZ400 ======================================================== One simple method can be used when the full command string will be 32 characters or less. Here's an example *CMD definition that replaces one form of the RUNQRY command with QRY:<pre> QRY: CMD PROMPT('RUNQRY QCMDEXC') PARM KWD(CMDSTR) TYPE(*CHAR) LEN(32) + CONSTANT('runqry ??qryfile() ??outtype()') PARM KWD(CMDLEN) TYPE(*DEC) LEN(15 5) CONSTANT(30)</pre> The QRY command would be compiled with QSYS/QCMDEXC as the command-processing program (the CPP). The new command provides definitions for the two parameters needed by QCMDEXC -- the command string and the length of the command string. It's simple because it uses the CONSTANT() attribute of the first parm. It's limited because CONSTANT() values must be 32 characters or less. However, you can make as many of these as you need for different "short-cuts". You can shorten command strings in many cases by leaving keywords off. You can use selective prompting for variable elements as I did for RUNQRY. Quick and easy. But limited. Tom
Last Wiki Answer Submitted:  April 21, 2010  6:58 am  by  WaltZ400   645 pts.
All Answer Wiki Contributors:  WaltZ400   645 pts. , Gilly400   23,625 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

Hello,

You can use the ‘create duplicate object command’ CRTDUPOBJ and press F4 to prompt for parameters. The from-object will be the name of the command you want to make a shortcut for, like WRKACTJOB, the from library can be *LIBL. The object type is *CMD. The to-library name can be QUSRSYS – an IBM-supplied library for user-created objects and the to-object name will be your shortcut name, like WAJ. The same with the other commands like WRKUSRPRF could be WUP.

TPINKY

 4,165 pts.

 

Hi Tpinky, thanks for Your help too.

Regards,
SILVARB

 440 pts.

 

You should ook into the CL selective pompting facility.
sampe url:
http://systeminetwork.com/article/power-question-mark-cl-programs-and-menus

DanF

 2,540 pts.