View previous topic :: View next topic
|
Author |
Message |
jackzhang75
Active User
Joined: 09 Jun 2014 Posts: 125 Location: US
|
|
|
|
Hi ,
I have requirement to have the rexx program to count down the time used by certain job , if the time exceed threhold value , it will issue the command to do something with the job ... I am not sure if there is function to count the time in REXX , Anyone can give me some idea ?
Thank you so much ! |
|
Back to top |
|
|
prino
Senior Member
Joined: 07 Feb 2009 Posts: 1316 Location: Vilnius, Lithuania
|
|
|
|
So you're going to lock up your terminal for the next 42 seconds/minutes/hours?
Bad, bad, bad design.
'nuff said! |
|
Back to top |
|
|
steve-myers
Active Member
Joined: 30 Nov 2013 Posts: 917 Location: The Universe
|
|
|
|
As Mr. Prins says, this is bad design. The other issue is there is no interface for Rexx to perform a check of this nature.
There is a method for JCL to terminate a job if it uses too much CPU time if you want to do something like this. Use it. |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3076 Location: NYC,USA
|
|
|
|
Will this
Code: |
ADDRESS "LINKMVS" "SDSF |
help, I am not sure? |
|
Back to top |
|
|
jackzhang75
Active User
Joined: 09 Jun 2014 Posts: 125 Location: US
|
|
|
|
Thanks for your reply!
Actually, the situation is this after you submit your job, the job will be hold in the queue to wait for available initiator to run. So i want to have the REXX to make a decision to see if job are runing, if not it will automatically issue the command to start the job.. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
If the job is waiting for an initiator it will run when an initiator becomes free.
Why do you need / want to do anything else ??? |
|
Back to top |
|
|
jackzhang75
Active User
Joined: 09 Jun 2014 Posts: 125 Location: US
|
|
|
|
This is because it takes long time to wait for it to become available since system just IPLed. We will need these job start to run as soon as possible ... That's why want to have the program |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Then talk to your systems programmers who have implemented this. Ask THEM why this happens and explain the problems to them. Surely they have done this for a good reason ..... See if they can implement a job release / initiator start automatically as part of the IPL process.
Also, when someone replies to you, another tiny piece of information comes out. Please, when you put a post onto the forum give ALL of the information in the initial post. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
You have attempted to solve the wrong problem with what you want. You need to discuss your requirement for the job execution with your site support group and work with them to implement a well-designed solution. As previously mentioned, your proposed solution is a really bad design. Your site support group can help you -- for example, putting your job into a special job class where an initiator is always available so the job will start as soon as it is submitted, or adding an initiator to the current job class to get the job started, or ... the site support group has lots of ways they COULD help you; but you have to talk to them first. |
|
Back to top |
|
|
jackzhang75
Active User
Joined: 09 Jun 2014 Posts: 125 Location: US
|
|
|
|
Ok, Thanks for your suggestion. I will talk to them.
Beside this, just wondering is it possible to make rexx program i mentioned before ? |
|
Back to top |
|
|
Terry Heinze
JCL Moderator
Joined: 14 Jul 2008 Posts: 1248 Location: Richfield, MN, USA
|
|
|
|
Probably not, since submitting the job, via REXX or any other way, will do you no good until an appropriate initiator becomes available. |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2596 Location: Silicon Valley
|
|
|
|
Quote: |
We will need these job start to run as soon as possible |
Whatever work is being done by your jobs should probably be being done by a started task. |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2596 Location: Silicon Valley
|
|
|
|
I agree with others that you are trying to answer the wrong problem.
Though I am not sure what you mean by 'count the time'...
Code: |
call syscalls 'ON'
address syscall 'sleep' 10 |
|
|
Back to top |
|
|
jackzhang75
Active User
Joined: 09 Jun 2014 Posts: 125 Location: US
|
|
|
|
Thank you for your code, it works perfectly ! |
|
Back to top |
|
|
|