IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Any function or untility in REXX to count the time ?


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
jackzhang75

Active User


Joined: 09 Jun 2014
Posts: 125
Location: US

PostPosted: Fri Oct 31, 2014 1:48 am
Reply with quote

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
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1306
Location: Vilnius, Lithuania

PostPosted: Fri Oct 31, 2014 1:54 am
Reply with quote

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
View user's profile Send private message
steve-myers

Active Member


Joined: 30 Nov 2013
Posts: 917
Location: The Universe

PostPosted: Fri Oct 31, 2014 2:47 am
Reply with quote

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
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3049
Location: NYC,USA

PostPosted: Fri Oct 31, 2014 2:52 am
Reply with quote

Will this
Code:
ADDRESS "LINKMVS" "SDSF
help, I am not sure?
Back to top
View user's profile Send private message
jackzhang75

Active User


Joined: 09 Jun 2014
Posts: 125
Location: US

PostPosted: Fri Oct 31, 2014 6:40 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri Oct 31, 2014 6:53 pm
Reply with quote

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
View user's profile Send private message
jackzhang75

Active User


Joined: 09 Jun 2014
Posts: 125
Location: US

PostPosted: Fri Oct 31, 2014 6:57 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri Oct 31, 2014 7:02 pm
Reply with quote

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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Fri Oct 31, 2014 7:04 pm
Reply with quote

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
View user's profile Send private message
jackzhang75

Active User


Joined: 09 Jun 2014
Posts: 125
Location: US

PostPosted: Fri Oct 31, 2014 7:11 pm
Reply with quote

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
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Fri Oct 31, 2014 7:18 pm
Reply with quote

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
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2546
Location: Silicon Valley

PostPosted: Fri Oct 31, 2014 10:46 pm
Reply with quote

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
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2546
Location: Silicon Valley

PostPosted: Fri Oct 31, 2014 11:55 pm
Reply with quote

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
View user's profile Send private message
jackzhang75

Active User


Joined: 09 Jun 2014
Posts: 125
Location: US

PostPosted: Wed Nov 05, 2014 2:41 am
Reply with quote

Thank you for your code, it works perfectly !
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts To get the count of rows for every 1 ... DB2 3
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
No new posts run rexx code with jcl CLIST & REXX 15
Search our Forums:

Back to Top