Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Question: How to 'break/pause/wait' a BATCH program?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
Thiago

New User


Joined: 03 Jun 2008
Posts: 2
Location: Brazil

PostPosted: Tue Jun 03, 2008 9:13 pm    Post subject: Question: How to 'break/pause/wait' a BATCH program?
Reply with quote

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

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10375
Location: italy

PostPosted: Tue Jun 03, 2008 9:20 pm    Post subject: Reply to: Question: How to 'break/pause/wait' a BATCH progra
Reply with quote

what is the business reason to artificially delay a program that has already started execution ?

please do not answer THAT' S THE REQUIREMENT icon_cool.gif
Back to top
View user's profile Send private message
superk

Moderator Team Head


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

PostPosted: Tue Jun 03, 2008 9:30 pm    Post subject: Reply to: Question: How to 'break/pause/wait' a BATCH progra
Reply with quote

Here's a few previous topics on this subject:

http://www.ibmmainframes.com/viewtopic.php?t=9708
http://www.ibmmainframes.com/viewtopic.php?t=13553
Back to top
View user's profile Send private message
Thiago

New User


Joined: 03 Jun 2008
Posts: 2
Location: Brazil

PostPosted: Tue Jun 03, 2008 10:28 pm    Post subject: Reply to: Question: How to 'break/pause/wait' a BATCH progra
Reply with quote

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

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Tue Jun 03, 2008 10:38 pm    Post subject:
Reply with quote

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.
icon_confused.gif icon_confused.gif
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Jun 04, 2008 1:18 am    Post subject:
Reply with quote

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

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Wed Jun 04, 2008 1:25 am    Post subject:
Reply with quote

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

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Jun 04, 2008 2:06 am    Post subject: Reply to: Question: How to 'break/pause/wait' a BATCH progra
Reply with quote

Unfortunately, i'm paused just now. . .

When resumed, i'll determine if i need to wait. . .

Maybe i just need a break icon_wink.gif
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8620
Location: Back in jolly old England

PostPosted: Wed Jun 04, 2008 11:55 am    Post subject:
Reply with quote

Sigh ............. maybe the OP exited during subroutine and never regained control.
Back to top
View user's profile Send private message
Varun Singh

New User


Joined: 01 Aug 2007
Posts: 25
Location: Delhi

PostPosted: Wed Jun 04, 2008 12:09 pm    Post subject: Reply to: Question: How to 'break/pause/wait' a BATCH progra
Reply with quote

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.
icon_biggrin.gif
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Jun 04, 2008 7:28 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Antonio Barata
Warnings : 1

New User


Joined: 04 Apr 2007
Posts: 37
Location: Lisbon, Portugal

PostPosted: Thu Jun 05, 2008 4:27 am    Post subject: Re: Question: How to 'break/pause/wait' a BATCH program?
Reply with quote

Thiago wrote:
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?


Hi
I think that the following MVS Service will do what you want

(BPX1SLP, BPX4SLP) -- Suspend execution of a process for an interval of time

See this link:
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/BPXZB161/2.208?SHELF=BPXZSH61&DT=20060111171933
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts The same REXX program doesnt work for... jackzhang75 CLIST & REXX 5 Wed Dec 06, 2017 2:51 am
No new posts CA Intertest Batch 555shanth CA Products 0 Tue Nov 28, 2017 11:10 am
No new posts How to query MAXGENS of an existing P... Chuchulo Hatyzak JCL & VSAM 4 Wed Nov 22, 2017 10:23 pm
No new posts Calling IKJEFT01 program from Rexx upendrasri CLIST & REXX 8 Wed Nov 15, 2017 4:27 pm
No new posts How to write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us