Call a program and send parameters in WRKJOBSCDE

765 pts.
Tags:
AS/400 job scheduler
AS/400 Parameters
Job scheduling
WRKJOBSCDE
I want to schedule a job to run. It needs to call the program and send 20 parameters. Is this a good way to do through Job Schedular on the AS400?

Answer Wiki

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

With this more information, then yes, it is a good idea to but it on the scheduler.
The more manual steps we can eliminate the better off we all are.

Discuss This Question: 9  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
  • CharlieBrowne
    Can you be more specific? Are you saying PROGAM A is going to be on the scheduler and will be submitting PROGRAM B, and PROGRAM B will have 20 parameters? Or Are you say PROGRAM A will be on the scheduler and when it gets submitted, it needs to have 20 parameters? Are the values always the same for the parms or are they always determined on the fly?
    41,370 pointsBadges:
    report
  • Jaymz69
    Call PGM A with 20 Parameters that are the same except for endDate that would be the system date. So instead of always going into the menu, selecting the program, and keying the parameters as a user does every hour, I want to just put that on the schedular to call PGM A every hour and pass the parameters. Then no need for the users to do this every hour...
    765 pointsBadges:
    report
  • Jaymz69
    so it would be something like: CALL PGM(MyLib/MyPgm) PARM('parm1' 'parm2'.............................................. 'parm20') so my only other question then is the parms I pass have to have the field names? there are some fields I do not need to enter that is why I am thinking how will the parm know which one it is for....
    765 pointsBadges:
    report
  • CharlieBrowne
    If PROGAM A which is receiving these 20 parms is coded so some are optional, then you do not need to pass them all; only the ones you use. An easy way to figure out what you job schedule entry should look like to to see what is happening today. If the menu option that people are using submits a job, put that JOBQ on hold submit the job do a WRKJOBQ of the Q you put on hold take option 5 on the job just submitted take option 10 to display the joblog * Now you will see exactly what is going to run. You can do a cut & paste of that call and put it in the job scheduler entry. +++++ Remember to RLSJOBQ when your done and cancel the job from the Q if ou do not need it.
    41,370 pointsBadges:
    report
  • TomLiotta
    You can do a cut & paste of that call and put it in the job scheduler entry. Note that if "endDate that would be the system date" is needed, the scheduler entry may need to be for a new program that calls PGMA but with system date substituted for the parameter. Also: ...as a user does every hour... Scheduling "every hour" may require multiple schedule entries in the standard scheduler. Tom
    125,585 pointsBadges:
    report
  • PGMBOB
    Check ADDJOBSCDE Add job schedule entry. You can submit a job with a schedule date and time on the SBMJOB Command instead of adding entries to the job scheduler. If the job can determine if is from the menu or scheduled then the system date can be provided for the scheduled job when it executes. The scheduled job can possibly submit the next scheduled run. You might consider a "never ending job" subsystem that Wakes up and processes this job. You need to submit each Parm the program expects, one by one, matching type and length. You can provide "default" values for the Parms like blanks, zeros, or 99999 but your program must tolerate what you send and provide the correct results. Consider writing a CLP without Parms that provides the "standard" Parms needed ie: Newpgm: PGM CALL HOURLY PARM('AAA' 'BBBBB' 'CCCCCCC' ...... 'TTTTTTT') ENDPGM
    980 pointsBadges:
    report
  • Jaymz69
    The CLP sounds like the way to go. Thanks all
    765 pointsBadges:
    report
  • Jaymz69
    [...] 9. CharlieBrowne, TomLiotta, and PGMBOB helped a member call a program and send parameters in WRKJOBSCDE. [...]
    0 pointsBadges:
    report
  • Jaymz69
    [...] Call a program and send parameters in WRKJOBSCDE [...]
    0 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