If you live outside the United States, by submitting your email address you consent to having your personal data transferred to and processed in the United States.
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?
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.
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.
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.
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
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?
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…
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….
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.
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
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
The CLP sounds like the way to go.
Thanks all