Retrieve Job Start parameters to start it by script

Tags:
AS/400
SBS
Hi Folks, I have a subsystem in which usually 40-50 jobs are working. Before the maintenance I should bring down all these jobs, because they are make some locks on files. At the end of maintenance windows I should start all of them manually... My question is: How to atomize this process? The number of jobs always is different, and jobs are different too, so I can't add them into SBS auto start. P.S. We have TAATOOL Do you guys have any idea?
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: 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.
  • CharlieBrowne

    Hard to give you an exact answer without getting more information.

    I'm just going to go on the assumption that you only want to automatically restart the jobs that are running.

    Just before you end the subsystem, do WRKSBSJOB SBS(your sbs) OUTPUT(*PRINT)     

    Now you will need to get that data into a PF so you can use it when you restart the subsystem.

    That is a start. Please come back with more information.

    I did not even get into just go a normal ENDJOB for the jobs so they may be able to complete without being in the middle of processing data. Many other things to concider

    62,385 pointsBadges:
    report
  • Splat
    The List object locks (QWCLOBJL) API is another way to determine what jobs have objects locked.
    12,865 pointsBadges:
    report
  • GregManzo
    Some years ago we had a subsystem for "resident" jobs - ones that would stay active and sleep for intervals before checking for more work to do.
    We had a control file that configured what time/day these jobs would start & end, and one extra resident job that would check this control & start any that were needed. That one 'master' job would auto-start in the subsystem, and bring up everything else that was required.
    The only other requirement is that each job should check for %shutdown and put itself to bed in a controlled manner. We did that once each sleep interval and limited the interval to no more than 120 seconds.
    With all that in place then it is a simple matter of issuing ENDSBS & STRSBS.
    2,950 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: