View previous topic :: View next topic |
Author |
Message |
ha.rajamohamed Beginner
Joined: 29 Jan 2006 Posts: 71 Topics: 22
|
Posted: Thu Feb 23, 2006 6:59 am Post subject: Delay in JCL |
|
|
Is there any way by which we can delay or have an wait in JCL. |
|
Back to top |
|
 |
Heikki Beginner

Joined: 22 Feb 2006 Posts: 6 Topics: 0 Location: Stockholm, Sweden
|
Posted: Thu Feb 23, 2006 7:03 am Post subject: |
|
|
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 |
|
 |
acevedo Beginner

Joined: 03 Dec 2002 Posts: 127 Topics: 0 Location: Europe
|
Posted: Thu Feb 23, 2006 7:31 am Post subject: |
|
|
feasible but not advisable.  |
|
Back to top |
|
 |
Heikki Beginner

Joined: 22 Feb 2006 Posts: 6 Topics: 0 Location: Stockholm, Sweden
|
Posted: Thu Feb 23, 2006 7:53 am Post subject: |
|
|
acevedo wrote: | feasible but not advisable.  |
Jepp! Can't see any reason to delay the execution; most of us are trying to reduce execution time  _________________ Heikki Elenius
Elenius Enterprise |
|
Back to top |
|
 |
ha.rajamohamed Beginner
Joined: 29 Jan 2006 Posts: 71 Topics: 22
|
Posted: Thu Feb 23, 2006 8:22 am Post subject: |
|
|
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 |
|
 |
ha.rajamohamed Beginner
Joined: 29 Jan 2006 Posts: 71 Topics: 22
|
Posted: Thu Feb 23, 2006 8:23 am Post subject: |
|
|
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 |
|
 |
superk Advanced

Joined: 19 Dec 2002 Posts: 684 Topics: 5
|
Posted: Thu Feb 23, 2006 8:25 am Post subject: |
|
|
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 |
|
 |
Heikki Beginner

Joined: 22 Feb 2006 Posts: 6 Topics: 0 Location: Stockholm, Sweden
|
Posted: Thu Feb 23, 2006 8:27 am Post subject: |
|
|
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 |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
|
Back to top |
|
 |
Jaya Beginner

Joined: 02 Sep 2005 Posts: 77 Topics: 10 Location: Cincinnati
|
Posted: Thu Feb 23, 2006 11:05 pm Post subject: |
|
|
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 |
|
 |
Cogito-Ergo-Sum Advanced
Joined: 15 Dec 2002 Posts: 637 Topics: 43 Location: Bengaluru, INDIA
|
Posted: Thu Feb 23, 2006 11:22 pm Post subject: |
|
|
Kevin,
Two things about your AOPBATCH step.
First of all, thank you for the sample.
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 |
|
 |
ha.rajamohamed Beginner
Joined: 29 Jan 2006 Posts: 71 Topics: 22
|
Posted: Mon Feb 27, 2006 12:57 am Post subject: |
|
|
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 |
|
 |
Ravi Beginner
Joined: 27 Jun 2005 Posts: 88 Topics: 2
|
Posted: Mon Feb 27, 2006 1:23 am Post subject: |
|
|
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 |
|
 |
THRIVIKRAM Beginner
Joined: 03 Oct 2005 Posts: 70 Topics: 34
|
Posted: Sun May 07, 2006 12:47 am Post subject: |
|
|
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 |
|
 |
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Sun May 07, 2006 2:25 am Post subject: |
|
|
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 |
|
 |
|
|