Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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: 106
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

Active Member


Joined: 07 Feb 2009
Posts: 984
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 User


Joined: 30 Nov 2013
Posts: 461
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: 1609
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: 106
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: 106
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: 7912
Location: Bellevue, IA

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: 106
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: 1238
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: 2019
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: 2019
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: 106
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
This topic is locked: you cannot edit posts or make replies. Get a job submitted itself every time... arunsoods JCL & VSAM 3 Tue Nov 22, 2016 4:05 pm
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 6 Fri Nov 18, 2016 1:48 pm
This topic is locked: you cannot edit posts or make replies. RANDOM Function in COBOL swapnil781 COBOL Programming 2 Tue Nov 15, 2016 6:17 pm
No new posts Check System time(Minute) Using TIME1... balaji81_k DFSORT/ICETOOL 5 Fri Nov 11, 2016 10:53 am
This topic is locked: you cannot edit posts or make replies. Rexx to create GDG by scanning JJ result krish.deepu CLIST & REXX 5 Tue Oct 25, 2016 5:32 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us