Copy AS/400 job schedule entry to create another one

Tags:
AS/400
Can I copy a Job Schedule Entry to create another one with just a different time?
1

Answer Wiki

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

If you don’t have access to the command CPYJOBSCDE in the TAA tools. You can try this program.

PGM
DCL        VAR(&CMD) TYPE(*CHAR) LEN(2000) +
             VALUE('?CHGJOBSCDE ??JOB() ??CMD() +
             ??FRQ() ??SCDDATE() ??SCDTIME() +
             ??RELDAYMON() ??SAVE() ??OMITDATE() +
             ??RCYACN() ??JOBD() ??JOBQ() ??USER() +
             ??MSGQ() ??TEXT()')
CALL       PGM(QCMDCHK) PARM(&CMD 2000)
CHGVAR     VAR(&CMD) VALUE('?ADDJOBSCDE' *BCAT +
             %SST(&CMD 12 1988))
CALL       PGM(QCMDEXC) PARM(&CMD 2000)
ENDPGM

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.
  • WoodEngineer
    We do what you ask a bunch, so yes, it is possible.
    If you have TAATools on your system try the CPYJOBSCDE.  If not, someone posted the same command and processing program a few years ago.  It works well.  We enhanced it a bit.  The basics are sound.
    8,225 pointsBadges:
    report
  • Subhendu Sen
    Yes, CPYJOBJS is the command that can help you to copy job using job scheduler. Please link here for more help, https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_73/cl/cpyjobjs.htm
    134,650 pointsBadges:
    report
  • TheRealRaven
    The CL in the Answer is a nice start. By adding a CHAR (10) parm to the program, an initial CHGJOBSCDE command can be prompted that includes a JOB() parameter value thereby immediately retrieving the current values. A second CHAR (10) parm can supply a JOB() value for the eventual ADDJOBSCDE command. A couple other changes can automate handling of issues such as RELMONDAY(), etc., when needed.

    An alternative would be with the List Job Schedule Entries (QWCLSCDE) API to retrieve all attributes of chosen entries and use those, with any changes, to add new entries.

    The CL in the Answer is simple, making it quickly useful. Only limited practice is called for. The API would be more flexible but needs a bit higher CL programming skill.
    33,670 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: