Personalize Commands how can I personalize commands like WRKUSRPRF, WRKCFGSTS or CHGUSRPRF

440 pts.
Tags:
CHGUSRPRF
iSeries
OS/400 and iSeries
WRKCFGSTS
WRKUSRPRF
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).

Answer Wiki

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

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

Discuss This Question: 3  Replies

 
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.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Tpinky
    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 pointsBadges:
    report
  • SILVARB
    Hi Tpinky, thanks for Your help too. Regards, SILVARB
    440 pointsBadges:
    report
  • DanTheDane
    You should ook into the CL selective pompting facility. sampe url: http://systeminetwork.com/article/power-question-mark-cl-programs-and-menus DanF
    2,555 pointsBadges:
    report

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.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

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

Following