Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Any function or untility in REXX to count the time ?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
jackzhang75

Active User


Joined: 09 Jun 2014
Posts: 115
Location: windsor

PostPosted: Fri Oct 31, 2014 1:48 am    Post subject: Any function or untility in REXX to count the time ?
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: 1047
Location: Oostende, Belgium

PostPosted: Fri Oct 31, 2014 1:54 am    Post subject:
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: 563
Location: The Universe

PostPosted: Fri Oct 31, 2014 2:47 am    Post subject:
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

Senior Member


Joined: 21 Sep 2010
Posts: 1784
Location: NY,USA

PostPosted: Fri Oct 31, 2014 2:52 am    Post subject: Reply to: Any function or untility in REXX to count the time
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: 115
Location: windsor

PostPosted: Fri Oct 31, 2014 6:40 pm    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Fri Oct 31, 2014 6:53 pm    Post subject:
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: 115
Location: windsor

PostPosted: Fri Oct 31, 2014 6:57 pm    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Fri Oct 31, 2014 7:02 pm    Post subject:
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: 8152
Location: East Dubuque, Illinois, USA

PostPosted: Fri Oct 31, 2014 7:04 pm    Post subject:
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: 115
Location: windsor

PostPosted: Fri Oct 31, 2014 7:11 pm    Post subject:
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    Post subject:
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

Senior Member


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

PostPosted: Fri Oct 31, 2014 10:46 pm    Post subject: Reply to: Any function or untility in REXX to count the time
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

Senior Member


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

PostPosted: Fri Oct 31, 2014 11:55 pm    Post subject: Reply to: Any function or untility in REXX to count the time
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: 115
Location: windsor

PostPosted: Wed Nov 05, 2014 2:41 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts ejck thru rexx to multiple jobs insid... Susanta All Other Mainframe Topics 5 Tue Sep 19, 2017 1:39 pm
No new posts column with count of rows within dist... ronald wouterson DB2 4 Sun Sep 17, 2017 9:48 pm
This topic is locked: you cannot edit posts or make replies. Extract all "IF" Statements... Adarsh Damodaran CLIST & REXX 1 Wed Sep 06, 2017 9:28 am
No new posts Creating ISPF Screens with Scrname vi... Albireo20 TSO/ISPF 9 Tue Sep 05, 2017 4:24 pm
No new posts Regarding time parameter shanthi gude JCL & VSAM 7 Mon Sep 04, 2017 2:31 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us