Create a command in AS/400

Tags:
AS/400
AS/400 commands
SAVOBJ
I need to create a command similar to savobj, for example savobjcom.
So that I can directly replace all the savobj commands used in CLPs.
Its just that I need to add DTACPR(*MEDIUM) for all the CL commands, but the customization will tak e alot of time.
Please help. Many thanks in advance.
0

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Discuss This Question: 5  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.
  • TheRealRaven
    What do you need help with? What have you done so far that we can look at? (And why would you want to do something like this in the first place? It's likely to cause future confusion.)
    36,340 pointsBadges:
    report
  • ToddN2000
    It may be easier to do a CHGCMD. It's not recommended to change system commands as it may effect more than you plan on. Have you looked at doing a find / replace using PDM to make the change?

    How many programs do you have with the SAVOBJ command?
    135,305 pointsBadges:
    report
  • Splat
    You might be better served by making a copy of the SAVOBJ command - I have a library that sits above QSYS in the system portion of the library list just for that purpose - and use the CHGCMDDFT command to alter the DTACPR parameter on the copied version.   This would allow you to avoid changing every program using the SAVOBJ command.
    12,915 pointsBadges:
    report
  • TheRealRaven
    We don't know why this is being done, so CHGCMDDFT and making a copy might both be inappropriate. (Or either could fit very well.) So far, all we know is that new command is being created with a different name that will be used in some CL programs. There seems to be some problem with the DTACPR() parameter, but we don't know what the problem is. Hard to supply good suggestions without knowing what needs to be "fixed".
    36,340 pointsBadges:
    report
  • TheRealRaven
    Ah! Upon re-reading, I think ToddN2000 correctly guessed the purpose of creating a new command. But changing the SAVOBJ default to be DTACPR(*MEDIUM) would make the default invalid for tape devices.

    That makes the question less clear. There should be only a very few CL programs that include a SAVOBJ command. Some of those will be IBM-supplied programs. Maintenance changes should be easy and fairly quick.
    36,340 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.

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

Following

Share this item with your network: