MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Delay in JCL
Goto page 1, 2  Next
 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
ha.rajamohamed
Beginner


Joined: 29 Jan 2006
Posts: 71
Topics: 22

PostPosted: Thu Feb 23, 2006 6:59 am    Post subject: Delay in JCL Reply with quote

Is there any way by which we can delay or have an wait in JCL.
Back to top
View user's profile Send private message
Heikki
Beginner


Joined: 22 Feb 2006
Posts: 6
Topics: 0
Location: Stockholm, Sweden

PostPosted: Thu Feb 23, 2006 7:03 am    Post subject: Reply with quote

JCL by itself cannot delay the execution. The only way is to write your own delay-program. But why???
_________________
Heikki Elenius
Elenius Enterprise
Back to top
View user's profile Send private message
acevedo
Beginner


Joined: 03 Dec 2002
Posts: 127
Topics: 0
Location: Europe

PostPosted: Thu Feb 23, 2006 7:31 am    Post subject: Reply with quote

feasible but not advisable. Wink
Back to top
View user's profile Send private message
Heikki
Beginner


Joined: 22 Feb 2006
Posts: 6
Topics: 0
Location: Stockholm, Sweden

PostPosted: Thu Feb 23, 2006 7:53 am    Post subject: Reply with quote

acevedo wrote:
feasible but not advisable. Wink

Jepp! Can't see any reason to delay the execution; most of us are trying to reduce execution time Laughing
_________________
Heikki Elenius
Elenius Enterprise
Back to top
View user's profile Send private message
ha.rajamohamed
Beginner


Joined: 29 Jan 2006
Posts: 71
Topics: 22

PostPosted: Thu Feb 23, 2006 8:22 am    Post subject: Reply with quote

I agree it is not advisable, since in real time we everyone are trying to reducing the execution time. But still I have met with an scenario where I needs to delay the start of the batch program for few secs and it has been submitted.

Is there any inbuild command in JCL where by giving that we can ask the job to idel for few secs.
Back to top
View user's profile Send private message
ha.rajamohamed
Beginner


Joined: 29 Jan 2006
Posts: 71
Topics: 22

PostPosted: Thu Feb 23, 2006 8:23 am    Post subject: Reply with quote

I agree it is not advisable, since in real time we everyone are trying to reducing the execution time. But still I have met with an scenario where I needs to delay the start of the batch program for few secs after it has been submitted.

Is there any inbuild command in JCL where by giving that we can ask the job to idel for few secs.
Back to top
View user's profile Send private message
superk
Advanced


Joined: 19 Dec 2002
Posts: 684
Topics: 5

PostPosted: Thu Feb 23, 2006 8:25 am    Post subject: Reply with quote

I usually run the Unix "SLEEP" command:
Code:

//*                                                   
//STEPX    EXEC PGM=AOPBATCH,PARM='sh /bin/sleep 60'   
//STDOUT   DD   SYSOUT=*                               
//STDERR   DD   SYSOUT=*                               
//STDIN    DD   DUMMY                                 
Back to top
View user's profile Send private message
Heikki
Beginner


Joined: 22 Feb 2006
Posts: 6
Topics: 0
Location: Stockholm, Sweden

PostPosted: Thu Feb 23, 2006 8:27 am    Post subject: Reply with quote

This little Rexx will do the trick. Argument is number of seconds to wait before returning:
Code:

/* rexx */                     
parse upper arg waitsec         
   etime = time(R)             
   do while etime < waitsec     
      nop                       
      etime = time(E)           
   end                         
exit                           

_________________
Heikki Elenius
Elenius Enterprise
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Thu Feb 23, 2006 8:37 am    Post subject: Reply with quote

ha.rajamohamed,

Please SEARCH before posting. A simple search for "delay" would have helped you.

http://www.mvsforums.com/helpboards/viewtopic.php?t=2008&highlight=delay

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Jaya
Beginner


Joined: 02 Sep 2005
Posts: 77
Topics: 10
Location: Cincinnati

PostPosted: Thu Feb 23, 2006 11:05 pm    Post subject: Reply with quote

Hi

The jobs can be delayed from getting submitted to JES by using Job timing services supplement of Thruput manager.

If TM is activated, this can be achieved by adding the JECL statement
Code:
/*JTS RELEASE DATE=+00,TIME=22:00
after the JES2 statement in our job. Even if we submit the job anytime before 22:00 hrs, the job will be picked up by JES for execution only at 22:00 hrs.

This JTS card gives us the flexibility to choose the date and time of job execution.

We normally use this JTS card to enable the online spawn report jobs to run at night time when the mainframe cost is low. Also it is handy during the testing of a sequence of batch jobs.

For more information on JTS syntax and usage, we can check the following link http://mvs1.iicc.ca/onldoc/Mvssol/JTS_Supplement.pdf

Thanks,
Jaya.
_________________
"Great spirits have always encountered violent opposition from mediocre minds."
-Albert Einstein
Back to top
View user's profile Send private message
Cogito-Ergo-Sum
Advanced


Joined: 15 Dec 2002
Posts: 637
Topics: 43
Location: Bengaluru, INDIA

PostPosted: Thu Feb 23, 2006 11:22 pm    Post subject: Reply with quote

Kevin,
Two things about your AOPBATCH step.

First of all, thank you for the sample. Smile

With the PARM coded as
Code:
PARM='sh /bin/sleep 60'
, I am getting this message,
Code:
CEE3611I The run-time option SH was an invalid run-time option or is not supported in this release of Language Environment.
and the jb ended with RC=4.

I had to change it to
Code:
PARM='/sh /bin/sleep 60'
, to suppress that message.
_________________
ALL opinions are welcome.

Debugging tip:
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
-- Sherlock Holmes.
Back to top
View user's profile Send private message
ha.rajamohamed
Beginner


Joined: 29 Jan 2006
Posts: 71
Topics: 22

PostPosted: Mon Feb 27, 2006 12:57 am    Post subject: Reply with quote

Thanks All,
I followed the link provided by kolusu, which haves a COBOL program for delay.
Since most JES intructions are not worked in our shop.
Back to top
View user's profile Send private message
Ravi
Beginner


Joined: 27 Jun 2005
Posts: 88
Topics: 2

PostPosted: Mon Feb 27, 2006 1:23 am    Post subject: Reply with quote

superk,

AOPBATCH is cool. The job was exactly delayed for 60 seconds.
Code:

//STEP010  EXEC PGM=AOPBATCH,PARM='sh /bin/sleep 60'
//STDOUT   DD   SYSOUT=*                             
//STDERR   DD   SYSOUT=*                             
//STDIN    DD   DUMMY                               

01.10.51 JOB25858  IEF403I JOBNAMEF - STARTED                                   
01.11.51 JOB25858  -                                         --TIMINGS (MINS.)--
01.11.51 JOB25858  -JOBNAME  STEPNAME PROCSTEP    RC   EXCP    CPU    SRB  CLOCK
01.11.51 JOB25858  -JOBNAMEF  STEP010              00      0    .00    .00    1.0
01.11.51 JOB25858  IEF404I JOBNAMEF - ENDED

SYSOUT:
CEE3608I The following messages pertain to the invocation command run-time options.
CEE3611I The run-time option SH was an invalid run-time option or is not supported in this release of Language Environment.

I have removed sh and ran the job. It worked fine with out any SYSOUT messages.
Code:
//STEP010  EXEC PGM=AOPBATCH,PARM='/bin/sleep 60'
//STDOUT   DD   SYSOUT=*                         
//STDERR   DD   SYSOUT=*                         
//STDIN    DD   DUMMY

01.15.44 JOB25865  IEF403I JOBNAMEF - STARTED                                   
01.16.44 JOB25865  -                                         --TIMINGS (MINS.)--
01.16.44 JOB25865  -JOBNAME  STEPNAME PROCSTEP    RC   EXCP    CPU    SRB  CLOCK
01.16.44 JOB25865  -JOBNAMEF  STEP010              00      0    .00    .00    1.0
01.16.44 JOB25865  IEF404I JOBNAMEF - ENDED                                     
Back to top
View user's profile Send private message
THRIVIKRAM
Beginner


Joined: 03 Oct 2005
Posts: 70
Topics: 34

PostPosted: Sun May 07, 2006 12:47 am    Post subject: Reply with quote

Hi

On using the same code as mentioned by Ravi ,
the following message was thrown:
STDERR:
AOP003E BIN/SLEEP: EDC5129I No such file or directory., errno2=594003d
Back to top
View user's profile Send private message Send e-mail
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Sun May 07, 2006 2:25 am    Post subject: Reply with quote

Using BPXBATCH instead of AOPBATCH works fine. BPXBATCH is the basic means of invoking USS commands:
Code:
//STEP010  EXEC PGM=BPXBATCH,PARM='sh /bin/sleep 60'
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) All times are GMT - 5 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group