View previous topic :: View next topic
|
Author |
Message |
Thiago
New User
Joined: 03 Jun 2008 Posts: 2 Location: Brazil
|
|
|
|
I'm trying to stop a BATCH program for a few secs (1 or maybe 2) but I didn't find any commands/syntax that can help me.
So, are there any commands that can stop the process or delay it? |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10886 Location: italy
|
|
|
|
what is the business reason to artificially delay a program that has already started execution ?
please do not answer THAT' S THE REQUIREMENT |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
Back to top |
|
|
Thiago
New User
Joined: 03 Jun 2008 Posts: 2 Location: Brazil
|
|
|
|
No. I want to stop the program when he's already running. Not 'outside' in the JCL.
Here's an example. But this one is in CICS
Code: |
MOVE 3 TO WS-TIME
EXEC CICS
DELAY
INTERVAL (WS-TIME)
RESP (WS-STATUS)
END-EXEC
|
I need something like that, but for a batch program.
Thanks for the help. |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
COBOL doesn't have a WAIT command so you would have to write an assemble program and call it from your COBOL program.
Quote: |
what is the business reason to artificially delay a program that has already started execution ?
please do not answer THAT' S THE REQUIREMENT. |
|
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
What is going on that the "batch program" needs to wait for?
What should happen when the "thing" being waited for never happens (and that will happen).
As was asked before and not yet answered - what business requirement will be supported by this? |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
dick scherrer wrote: |
Hello,
What is going on that the "batch program" needs to wait for?
What should happen when the "thing" being waited for never happens (and that will happen).
As was asked before and not yet answered - what business requirement will be supported by this? |
Should we wait for a reply? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Unfortunately, i'm paused just now. . .
When resumed, i'll determine if i need to wait. . .
Maybe i just need a break |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Sigh ............. maybe the OP exited during subroutine and never regained control. |
|
Back to top |
|
|
Varun Singh
New User
Joined: 01 Aug 2007 Posts: 25 Location: Delhi
|
|
|
|
For pausing a Batch program you can use.
Code: |
STOP 'Press Enter to continue'. |
The above code will pause your program and will require operator intervention.
But, whenever such condition arises I will suggest you to use Accept and Display verb
Do not use STOP literal statement in programs compiled with THREAD option.
|
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Please do not use STOP or DISPLAY/ACCEPT unless you want the Operations people coming after you to do damage to you. It is not acceptable to do this on today's systems.
Most systems will not permit such code to be promoted to production, so there is no use wasting time testing it. Some systgems abend the job. |
|
Back to top |
|
|
Antonio Barata Warnings : 1 New User
Joined: 04 Apr 2007 Posts: 37 Location: Lisbon, Portugal
|
|
Back to top |
|
|
|