how to automate jcl to run a cobol program on mainframe

*爱你&永不变心* 提交于 2019-12-25 05:45:07

问题


We have a COBOL batch program that we are able to execute manually from JCL. We want to automate this process so that it can execute every 15 minutes.

Is there a way to automate the execution of a batch program on the mainframe?

I'm a PC guy and I know in windows I can create a .BAT file and set it up in Task Scheduler to run every 15 minutes. I'm essentially trying to do the same thing on the mainframe.


回答1:


Is there a way to automate the execution of a batch program on the mainframe?

Yes.

Many mainframe shops have job schedulers. Control-M from BMC is one, ASG has Zeke, there are others.

Having said that, it sounds like the application in question is written to periodically poll for some event. Mainframes typically have better ways of accomplishing tasks people normally solve via polling. Event monitoring, for example.




回答2:


Mainframe Scheduling software like Control-M from BMC is one, ASG has Zeke, CA7 from CA and IBM TWS for ZOS formerly OPCA can be used to schedule a job every 15 minutes.

You could add a job for every 15 minute period or have the first step of the job be to add the 1 that will run in the next 15 minutes.

Pros
Operators will be notified of the job failing
Cons
Will end up allot of the same jobs in the schedule TWS for ZOS (what I am know) you would need to add nearly 96 jobs and set the corresponding times for it

The option I would recommend is using an automation product such System Automation from IBM, Control-O from BMC or OPS from CA.

With any of the above automation products you could setup a started task and get them to start it every 15 minutes. It is much easier say for example using 1 panel in System Automation to set it up to run a start task every 15 minutes

If you wanted to know if it fails you could use the automation products to schedule it in any of the above schedulers.




回答3:


There are so many solutions to this, it really depends on what you are monitoring. Besides the standard "use a job scheduler like CA7" (with the disadvantage of having so many jobs that run during the day, just kind-of messy).

You could either define an address space (started task) that invokes your COBOL code, and within your COBOL code have it sleep (i.e. wait on a timer) for 15 minutes, wake-up check whatever and go back to sleep. Alternatively, run the job on JES2 but you might have to a little extra so that JES keeps the job active all day!

If this code finds a problem then it can also issue a console message (maybe, you might have to write a little bit of assembler code to do issue a WTO or WTOR), so the the operator either knows (WTO) or knows and has to reply (WTOR) (write to operator with reply).



来源:https://stackoverflow.com/questions/14763132/how-to-automate-jcl-to-run-a-cobol-program-on-mainframe

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!