IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Want to hold job for some time to continue with step02


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
surya_pathaus

Active User


Joined: 28 Aug 2006
Posts: 110

PostPosted: Fri Sep 01, 2006 3:32 pm
Reply with quote

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
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Fri Sep 01, 2006 3:56 pm
Reply with quote

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
View user's profile Send private message
surya_pathaus

Active User


Joined: 28 Aug 2006
Posts: 110

PostPosted: Fri Sep 01, 2006 4:11 pm
Reply with quote

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
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Fri Sep 01, 2006 4:17 pm
Reply with quote

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
View user's profile Send private message
surya_pathaus

Active User


Joined: 28 Aug 2006
Posts: 110

PostPosted: Fri Sep 01, 2006 4:20 pm
Reply with quote

Let me try the COBOL routine.
Back to top
View user's profile Send private message
nevilh

Active User


Joined: 01 Sep 2006
Posts: 262

PostPosted: Fri Sep 01, 2006 6:58 pm
Reply with quote

try
//STEP1 EXEC PGM=BPXBATCH,PARM='sh sleep xxx'

replace xxx with the number of seconds you wish to wait
Back to top
View user's profile Send private message
nevilh

Active User


Joined: 01 Sep 2006
Posts: 262

PostPosted: Fri Sep 01, 2006 7:00 pm
Reply with quote

sorry hit enter to soon . Meant to add as suggested by superk
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Fri Sep 01, 2006 8:28 pm
Reply with quote

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
View user's profile Send private message
surya_pathaus

Active User


Joined: 28 Aug 2006
Posts: 110

PostPosted: Tue Sep 05, 2006 6:29 pm
Reply with quote

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
View user's profile Send private message
sunil.sunkari
Warnings : 2

New User


Joined: 06 Sep 2006
Posts: 5

PostPosted: Wed Sep 06, 2006 8:31 am
Reply with quote

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
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1448
Location: Chicago, IL

PostPosted: Wed Sep 06, 2006 9:15 am
Reply with quote

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
View user's profile Send private message
murali922

New User


Joined: 25 Jul 2005
Posts: 92
Location: India

PostPosted: Fri Sep 08, 2006 4:34 pm
Reply with quote

What does ILBOWAT0 do ?

Regards.
Back to top
View user's profile Send private message
murali922

New User


Joined: 25 Jul 2005
Posts: 92
Location: India

PostPosted: Fri Sep 08, 2006 4:37 pm
Reply with quote

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
View user's profile Send private message
elayadath

New User


Joined: 02 Dec 2005
Posts: 9
Location: USA

PostPosted: Sun Sep 10, 2006 1:49 pm
Reply with quote

Hi surya,

Try this after step01

//TIME EXEC PGM=EXCMDWP,PARM='00000000'

where as 00000000 is HHMMSSDC
Back to top
View user's profile Send private message
spkmuthu

New User


Joined: 15 Jul 2005
Posts: 1

PostPosted: Thu Sep 03, 2009 6:41 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Sep 03, 2009 6:58 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Sep 03, 2009 7:40 pm
Reply with quote

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 icon_cry.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts To get the the current time DFSORT/ICETOOL 13
No new posts RC query -Time column CA Products 3
No new posts C Compile time time stamps Java & MQSeries 10
No new posts Parallelization in CICS to reduce res... CICS 4
No new posts Insert system time/date (timestamp) u... DFSORT/ICETOOL 5
Search our Forums:

Back to Top