View previous topic :: View next topic
|
Author |
Message |
surya_pathaus
Active User
Joined: 28 Aug 2006 Posts: 110
|
|
|
|
Hi all,
I have 3 steps in my JCL.
After step01 I want to hold job for some time to continue with step02 execution.
I mean to say after Step01 I want to hold job for some time.
Is it possible to hold a step? |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
You have to write a program that suspends execution for a period of time. Or, use an existing one if you already have one available.
Personally, I like to invoke the Unix Systems Services (USS) "sleep" program. |
|
Back to top |
|
|
surya_pathaus
Active User
Joined: 28 Aug 2006 Posts: 110
|
|
|
|
Hi Superk,
We have a program to lock database to test DB2 abends.
But I haven't come across the program which holds batch.
And I am not aware of the logic how to write the program to suspend execution. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
I'm not a programmer, so I really don't know either, other than using a REXX elapsed time function. But, isn't there a COBOL routine "ILBOWAT0" that you can call to wait a specified amount of time? |
|
Back to top |
|
|
surya_pathaus
Active User
Joined: 28 Aug 2006 Posts: 110
|
|
|
|
Let me try the COBOL routine. |
|
Back to top |
|
|
nevilh
Active User
Joined: 01 Sep 2006 Posts: 262
|
|
|
|
try
//STEP1 EXEC PGM=BPXBATCH,PARM='sh sleep xxx'
replace xxx with the number of seconds you wish to wait |
|
Back to top |
|
|
nevilh
Active User
Joined: 01 Sep 2006 Posts: 262
|
|
|
|
sorry hit enter to soon . Meant to add as suggested by superk |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
I know this goes off-topic a bit, but something's been bugging me for a long, long time:
Why do programmers always insist on writing programs when there are other alternatives available, such as standard utilities or scripts? Don't their Managers/Supervisors/Leads disapprove of such practices? I know in the past we've had to let folks go because of such practices. |
|
Back to top |
|
|
surya_pathaus
Active User
Joined: 28 Aug 2006 Posts: 110
|
|
|
|
Hi Superk,
routine "ILBOWAT0" is working. I coded a small program with this routine and we got the results as we want.
Here is the code which we tried:
Code: |
IDENTIFICATION DIVISION.
PROGRAM-ID. TESTDLY.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 DELAY-AMT PIC S9(9) COMP.
01 ILBOWAT0 PIC X(8) VALUE 'ILBOWAT0'.
01 CURRENT-TIME PIC 9(8).
PROCEDURE DIVISION.
MOVE 61 TO DELAY-AMT
ACCEPT CURRENT-TIME FROM TIME
DISPLAY CURRENT-TIME
CALL ILBOWAT0 USING DELAY-AMT
ACCEPT CURRENT-TIME FROM TIME
DISPLAY CURRENT-TIME
GOBACK.
|
Quote: |
Why do programmers always insist on writing programs when there are other alternatives available, such as standard utilities or scripts?
|
Here we tried with the routine ofcourse, we also dont want to write the program for this requirement. But as for now we are using the routine which you suggested us. Also searched for the utilities to get, but not able to find any utility. In all the search we found the same routine which is suggested by you.
Do you have any idea of utilties which can be used to hold job in step level. |
|
Back to top |
|
|
sunil.sunkari Warnings : 2 New User
Joined: 06 Sep 2006 Posts: 5
|
|
|
|
Hi surya,
Actually there is WAIT command in JCL which will hold the execution for the specifed number of seconds in the WAIT statement in JCL. |
|
Back to top |
|
|
priyesh.agrawal
Senior Member
Joined: 28 Mar 2005 Posts: 1448 Location: Chicago, IL
|
|
|
|
Quote: |
Actually there is WAIT command in JCL which will hold the execution for the specifed number of seconds in the WAIT statement in JCL. |
Is it ... and then how do you code it ???
must be your shop specific utility... |
|
Back to top |
|
|
murali922
New User
Joined: 25 Jul 2005 Posts: 92 Location: India
|
|
|
|
What does ILBOWAT0 do ?
Regards. |
|
Back to top |
|
|
murali922
New User
Joined: 25 Jul 2005 Posts: 92 Location: India
|
|
|
|
Quote: |
Actually there is WAIT command in JCL which will hold the execution for the specifed number of seconds in the WAIT statement in JCL. |
Are you referring to TYPRUN = HOLD ? Does TYPRUN work ? |
|
Back to top |
|
|
elayadath
New User
Joined: 02 Dec 2005 Posts: 9 Location: USA
|
|
|
|
Hi surya,
Try this after step01
//TIME EXEC PGM=EXCMDWP,PARM='00000000'
where as 00000000 is HHMMSSDC |
|
Back to top |
|
|
spkmuthu
New User
Joined: 15 Jul 2005 Posts: 1
|
|
|
|
Hi,
I tried using 'ILBOWAT0' but got the following error:
"An attempt was made to pass a parameter address above 16 megabytes to AMODE(24) program ILBOWAT0". And i have declared DELAY-TIME as S9(9) COMP.
Is there any other version of "ILBOWAT0" for AMODE(31)?
Thanks in advance. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
will be someone so kind to explain about all this bullshit requirement of having an arbitrary wait between two steps or two jobs ..
what are people trying to achieve, or better what is the logical reasoning behind the silly requirement
no condescent or stupid answers please,
deterministic reasons why for example a 5.78 second wait is right and not 3.62 or 765.31
what if, for example, even after the wait the show stopper conditions still exist
this forum, and I lurk in a lot of them, is the only one were I have seen many such requests |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Of course the obvious answer is to split the job and use the scheduling software.
However, as asked by Enrico, why the need.
I also ask, why have you regurgitated a topic that has been dormant for three years |
|
Back to top |
|
|
|