For Programmers: Free Programming Magazines  


Home > Archive > Cobol > August 2006 > halt a COBOL program while executing









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author halt a COBOL program while executing
neerajpeddu

2004-09-14, 8:55 pm

Hi there,

I want to halt my program while it is executing for just a minute or
two.

Is there any way I can make it happen in the COBOL code?

Please let me know if there is a way.

Is WAIT reserved word any good?



--
posted via MFF : http://www.MainFrameForum.com - USENET Gateway
William M. Klein

2004-09-14, 8:55 pm

See recent thread on "sleep".

The bottom-line is that

Yes, there are ways to do this

BUT

we need to know which compiler (vendor and release) and what operating system
you are running on to answer the question of HOW to do it.

--
Bill Klein
wmklein <at> ix.netcom.com
"neerajpeddu" <member@mainframeforum.com> wrote in message
news:1095192995.VTQVOLrNg25JumpqrRu95g@onlynews...
> Hi there,
>
> I want to halt my program while it is executing for just a minute or
> two.
>
> Is there any way I can make it happen in the COBOL code?
>
> Please let me know if there is a way.
>
> Is WAIT reserved word any good?
>
>
>
> --
> posted via MFF : http://www.MainFrameForum.com - USENET Gateway



Mike

2004-09-15, 3:55 am

> I want to halt my program while it is executing for just a minute or two
> Is there any way I can make it happen in the COBOL code
> Please let me know if there is a way
> Is WAIT reserved word any good
> posted via MFF : http://www.MainFrameForum.com - USENET Gateway


Can we assume that since you posted via MainFrameForum that you are on an IBM mainframe?
Since halting a batch program is usually illogical, can we assume you want to do this online in CICS?
Then:

EXEC CICS DELAY
FOR MINUTES (2)
END-EXEC.

works pretty well to halt a program for just minute or two.











William M. Klein

2004-09-15, 3:55 am

If on an IBM mainframe, *and* running in batch, then use a call to ILBOWAT0

--
Bill Klein
wmklein <at> ix.netcom.com
"Mike" <NoSpam@SpamStopper.org> wrote in message
news:zumdneuEk9b_8drcRVn_vA@giganews.com...
>
> Can we assume that since you posted via MainFrameForum that you are on an IBM
> mainframe?
> Since halting a batch program is usually illogical, can we assume you want to
> do this online in CICS?
> Then:
>
> EXEC CICS DELAY
> FOR MINUTES (2)
> END-EXEC.
>
> works pretty well to halt a program for just minute or two.
>
>
>
>
>
>
>
>
>
>
>



docdwarf@panix.com

2004-09-15, 3:55 am

In article <h5K1d.1368934$6p.235300@news.easynews.com>,
William M. Klein <wmklein@nospam.netcom.com> wrote:
>If on an IBM mainframe, *and* running in batch, then use a call to ILBOWAT0


Well, I wasn't going to say anything about it... but I tried that today,
using both the example posted here (and a parm of S9(8)) and some old code
I'd gotten from... somewhere that used to work... on some version of the
MVS architecture (parm = S9(9) COMP)...

.... and I compiled with IGYCRCTL (DATA(24)) and OldBol (IKFCBL00... it's
out there, you just gotta know where to look)... and I couldn't get the
thing to work at all, it either executed without a wait and gave a
completion code of 8 or it hung *so* long that I started to get scared
about hogging an initiator and I can'd the fool thing. Maybe tomorrow
I'll post some specifics.

DD
Robert Wagner

2004-09-15, 3:55 am

On Tue, 14 Sep 2004 20:16:35 GMT, neerajpeddu
<member@mainframeforum.com> wrote:

>Hi there,
>
>I want to halt my program while it is executing for just a minute or
>two.
>
>Is there any way I can make it happen in the COBOL code?
>
>Please let me know if there is a way.
>
>Is WAIT reserved word any good?


Check with "William Cai" <wenliang_cai@yahoo.com.cn>


William M. Klein

2004-09-15, 3:55 am

Doc,
One thing that *might* help is to use a DYNAMIC call, i.e.
Call identifier-with-ILBOWAT0-Value

If that doesn't work, I really would like to know the details - as this
certainly has worked in the past - and should with the OS/VS COBOL library, VS
COBOL II library or the LE run-time library.

--
Bill Klein
wmklein <at> ix.netcom.com
<docdwarf@panix.com> wrote in message news:ci7sb8$1k0$1@panix5.panix.com...
> In article <h5K1d.1368934$6p.235300@news.easynews.com>,
> William M. Klein <wmklein@nospam.netcom.com> wrote:
>
> Well, I wasn't going to say anything about it... but I tried that today,
> using both the example posted here (and a parm of S9(8)) and some old code
> I'd gotten from... somewhere that used to work... on some version of the
> MVS architecture (parm = S9(9) COMP)...
>
> ... and I compiled with IGYCRCTL (DATA(24)) and OldBol (IKFCBL00... it's
> out there, you just gotta know where to look)... and I couldn't get the
> thing to work at all, it either executed without a wait and gave a
> completion code of 8 or it hung *so* long that I started to get scared
> about hogging an initiator and I can'd the fool thing. Maybe tomorrow
> I'll post some specifics.
>
> DD



docdwarf@panix.com

2004-09-15, 3:55 am

In article <DTK1d.1370656$6p.235711@news.easynews.com>,
William M. Klein <wmklein@nospam.netcom.com> wrote:
>Doc,
> One thing that *might* help is to use a DYNAMIC call, i.e.
> Call identifier-with-ILBOWAT0-Value


Doing that already, thanks.

>
>If that doesn't work, I really would like to know the details - as this
>certainly has worked in the past - and should with the OS/VS COBOL library, VS
>COBOL II library or the LE run-time library.


As I said, on the morrow... good to see an interest piqued!

DD

William M. Klein

2004-09-18, 3:55 am

See recent thread on "sleep".

The bottom-line is that

Yes, there are ways to do this

BUT

we need to know which compiler (vendor and release) and what operating system
you are running on to answer the question of HOW to do it.

--
Bill Klein
wmklein <at> ix.netcom.com
"neerajpeddu" <member@mainframeforum.com> wrote in message
news:1095192995.VTQVOLrNg25JumpqrRu95g@onlynews...
> Hi there,
>
> I want to halt my program while it is executing for just a minute or
> two.
>
> Is there any way I can make it happen in the COBOL code?
>
> Please let me know if there is a way.
>
> Is WAIT reserved word any good?
>
>
>
> --
> posted via MFF : http://www.MainFrameForum.com - USENET Gateway



William M. Klein

2004-09-18, 8:55 am

If on an IBM mainframe, *and* running in batch, then use a call to ILBOWAT0

--
Bill Klein
wmklein <at> ix.netcom.com
"Mike" <NoSpam@SpamStopper.org> wrote in message
news:zumdneuEk9b_8drcRVn_vA@giganews.com...
>
> Can we assume that since you posted via MainFrameForum that you are on an IBM
> mainframe?
> Since halting a batch program is usually illogical, can we assume you want to
> do this online in CICS?
> Then:
>
> EXEC CICS DELAY
> FOR MINUTES (2)
> END-EXEC.
>
> works pretty well to halt a program for just minute or two.
>
>
>
>
>
>
>
>
>
>
>



docdwarf@panix.com

2004-09-18, 8:55 am

In article <h5K1d.1368934$6p.235300@news.easynews.com>,
William M. Klein <wmklein@nospam.netcom.com> wrote:
>If on an IBM mainframe, *and* running in batch, then use a call to ILBOWAT0


Well, I wasn't going to say anything about it... but I tried that today,
using both the example posted here (and a parm of S9(8)) and some old code
I'd gotten from... somewhere that used to work... on some version of the
MVS architecture (parm = S9(9) COMP)...

.... and I compiled with IGYCRCTL (DATA(24)) and OldBol (IKFCBL00... it's
out there, you just gotta know where to look)... and I couldn't get the
thing to work at all, it either executed without a wait and gave a
completion code of 8 or it hung *so* long that I started to get scared
about hogging an initiator and I can'd the fool thing. Maybe tomorrow
I'll post some specifics.

DD
mkm12

2006-08-10, 9:44 pm

I have a requiremnet to halt the processing in the Batch ebvironment ( Say if the the table is unavaialble, the programs shud wait for 5 min and then try again) .

Is there a way it can be done?

MKM






quote:
Originally posted by Mike
> I want to halt my program while it is executing for just a minute or two
> Is there any way I can make it happen in the COBOL code
> Please let me know if there is a way
> Is WAIT reserved word any good
> posted via MFF : http://www.MainFrameForum.com - USENET Gateway


Can we assume that since you posted via MainFrameForum that you are on an IBM mainframe?
Since halting a batch program is usually illogical, can we assume you want to do this online in CICS?
Then:

EXEC CICS DELAY
FOR MINUTES (2)
END-EXEC.

works pretty well to halt a program for just minute or two.

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com