Duplicating commands and renaming them

Tags:
AS/400 command duplication
AS/400 command keys
AS/400 command renaming
WRKDSKSTS
I would like to duplicate a command and add it my library, I also would like make the new name a three letters command. for example the WRKDSKSTS to make it WDS. how do I do this? I have tried copying it and renaming it but didn't work. Please help

Answer Wiki

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

To create this, you would go to the object you want to duplicate, WRKOBJ WRKDSKSTS, copy the object with the name you choose, WDS, and place in the library you want. That is all there is to it. I have done this for shortcuts on other commands.

Best of luck…

TPinky

—————————————————————————–

I would not recommend copying/duplicating the IBM supplied commands. You may need to reduplicate/copy the command on future release upgrades if the command definition changes. A safer approach would be to create a proxy command as with:

CRTPRXCMD CMD(WDS) TGTCMD(WRKDSKSTS)

Bruce Vining
<a href=”http://www.brucevining.com/”>Bruce Vining Services</a>

Discuss This Question: 4  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
  • Gilly400
    Hi, The proxy commands are a realtively new feature - if you don't have the CRTPRXCMD command available you can use CRTDUPOBJ to create a duplicate object (bear in mind that you may have to repeat this process or change over to proxy commands if you upgrade to a newer release) :-
    CRTDUPOBJ OBJ(WRKDSKSTS)  FROMLIB(QSYS) OBJTYPE(*CMD)  TOLIB(YOURLIB) 
    NEWOBJ(WDS)
    
    Alternatively you could create your own command and CL program :- CMD Source member :-
      CMD PROMPT('WDS')
    
    CL Source member :-
     PGM
    
     ? WRKDSKSTS
    
     ENDPGM
    
    If you don't want the command prompted, leave the question mark out. Regards, Martin Gilbert.
    23,730 pointsBadges:
    report
  • wpoulin
    A word of caution with the proxy command, V5R4 or later, when the proxy command is specified on the CHGCMD and CHGCMDDFT commands the actual command changed will be the command that is the target of the proxy command. Hope this helps, Bill Poulin
    2,480 pointsBadges:
    report
  • Gilly400
    Hi, I thought the whole idea of the proxy commands was that you didn't need to change the commands in QSYS and that your changes affected the proxy command only. So if you use CHGCMDDFT, you will still need to reapply all your changes everytime you upgrade the OS? Regards, Martin Gilbert.
    23,730 pointsBadges:
    report
  • wpoulin
    Martin, My earlier statement comes from the iSeries Memorandum to Users V5R4 Chapter 2. The Change Proxy Command (CHGPRXCMD) command changes some of the attributes of a proxy command. Control Lanuage (CL) programs that use the proxy command being changed do not have to be created again. The CHGPRXCMD command does not change the target command definition object. Restrictions: You must have object management (*OBJMGT) authority for the command that is being changed. The CHGPRXCMD command can be used to change only the attributes that were specified on the Create Proxy Command (CRTPRXCMD) command. This comes from InfoCenter V5R4. So you should be cognicent of whether you are attempting to change both the Proxy Command and the Target Command. Hope this helps, Bill Poulin
    2,480 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