From: Vaclav Snajdr on
no, accept with timeout need not the screen section.
The program using this is a background program and can be
run via cron too. In this case you need set the TERM to console
perhaps (so i had it under hp-ux) - because accept needs the ADIS.

C C wrote:

> I think "TIME-OUT" needs a SCREEN SECTION. I don't want SCREEN SECTION in
> the sleep functionality I am trying to implement in programs under cron or
> batch control.
>
> "Vaclav Snajdr" <snajdr.vaclav(a)t-online.de> wrote in message
> news:f2cdof$tbi$01$1(a)news.t-online.com...
>> it is possible to use "accept with timeout xyz" instead call system ...
>> (in background programs too)
>>
>>
>>
>> C C wrote:
>>
>>> Thanks. That's what I'm doing right now. I just want to avoid having
>>> to
>>> call "system". In AIX, a new-line is output by the system thus online
>>> sessions experience a shift on their screen. This behavior still occurs
>>> even if my call "system" script re-directs output to /dev/null.
>>>
>>>
>>> "Steve Rainbird" <news.nospam(a)rainbird.me.nospam.uk> wrote in message
>>> news:5atoomF2qeibjU1(a)mid.individual.net...
>>>> "C C" <someone(a)atsbcglobal.net> wrote in message
>>>> news:yAh2i.4627$UU.2661(a)newssvr19.news.prodigy.net...
>>>>> Hello.
>>>>>
>>>>> Is there a way in MF Cobol to pause program execution (sleep) for,
>>>>> let's
>>>>> say, 5 minutes??? My workaround is to call the AIX command "sleep
>>>>> 300".
>>>>> I need a routine in Cobol itself so I may vary the time to pause in
>>>>> some
>>>>> programs.
>>>>>
>>>>> Thanks in advance.
>>>>>
>>>>
>>>>
>>>> Not that I know of.
>>>>
>>>> I use
>>>>
>>>> call "system" using ws-sleep-call
>>>>
>>>>
>>>> Where ws-sleep-call is defined as
>>>>
>>>> 01 ws-mss-sleep-call.
>>>> 03 pic x(6) value "sleep ".
>>>> 03 ws-mss-sleep pic 9(15).999.
>>>> 03 pic x value x"00".
>>>>
>>>> Works for me.
>>>>
>>>> --
>>>> Steve
>>>>
>>>>
>>>>
>>
>> --
>> Vaclav Snajdr

--
Vaclav Snajdr
From: C C on
I had tried this but the compiler returns an error if there is no screen
section! I don't know what directive I should use to compile the TIME-OUT
without a screen section.

Anyway, I have successfully tested the "CALL "sleep" USING BY VALUE 300.".
AND it does not return a newline to the running program thus NOT shifting
the screen one line up.

"Vaclav Snajdr" <snajdr.vaclav(a)t-online.de> wrote in message
news:f2ejmp$bs2$01$1(a)news.t-online.com...
> no, accept with timeout need not the screen section.
> The program using this is a background program and can be
> run via cron too. In this case you need set the TERM to console
> perhaps (so i had it under hp-ux) - because accept needs the ADIS.
>
> C C wrote:
>
>> I think "TIME-OUT" needs a SCREEN SECTION. I don't want SCREEN SECTION
>> in
>> the sleep functionality I am trying to implement in programs under cron
>> or
>> batch control.
>>
>> "Vaclav Snajdr" <snajdr.vaclav(a)t-online.de> wrote in message
>> news:f2cdof$tbi$01$1(a)news.t-online.com...
>>> it is possible to use "accept with timeout xyz" instead call system ...
>>> (in background programs too)
>>>
>>>
>>>
>>> C C wrote:
>>>
>>>> Thanks. That's what I'm doing right now. I just want to avoid having
>>>> to
>>>> call "system". In AIX, a new-line is output by the system thus online
>>>> sessions experience a shift on their screen. This behavior still
>>>> occurs
>>>> even if my call "system" script re-directs output to /dev/null.
>>>>
>>>>
>>>> "Steve Rainbird" <news.nospam(a)rainbird.me.nospam.uk> wrote in message
>>>> news:5atoomF2qeibjU1(a)mid.individual.net...
>>>>> "C C" <someone(a)atsbcglobal.net> wrote in message
>>>>> news:yAh2i.4627$UU.2661(a)newssvr19.news.prodigy.net...
>>>>>> Hello.
>>>>>>
>>>>>> Is there a way in MF Cobol to pause program execution (sleep) for,
>>>>>> let's
>>>>>> say, 5 minutes??? My workaround is to call the AIX command "sleep
>>>>>> 300".
>>>>>> I need a routine in Cobol itself so I may vary the time to pause in
>>>>>> some
>>>>>> programs.
>>>>>>
>>>>>> Thanks in advance.
>>>>>>
>>>>>
>>>>>
>>>>> Not that I know of.
>>>>>
>>>>> I use
>>>>>
>>>>> call "system" using ws-sleep-call
>>>>>
>>>>>
>>>>> Where ws-sleep-call is defined as
>>>>>
>>>>> 01 ws-mss-sleep-call.
>>>>> 03 pic x(6) value "sleep ".
>>>>> 03 ws-mss-sleep pic 9(15).999.
>>>>> 03 pic x value x"00".
>>>>>
>>>>> Works for me.
>>>>>
>>>>> --
>>>>> Steve
>>>>>
>>>>>
>>>>>
>>>
>>> --
>>> Vaclav Snajdr
>
> --
> Vaclav Snajdr


From: Gael Wilson on

"William M. Klein" <wmklein(a)nospam.netcom.com> wrote in message
news:KVn2i.438596$c62.361592(a)fe07.news.easynews.com...
>I don't know which versions it is and is not in, but check your
>documentation for the Micro Focus callable service
>
> CBL_THREAD_SLEEP
>
> P.S. I haven't actually used it myself, so "YMMV"
>

Note that your application has to be threaded in order to use this API
otherwise it returns immediately with a non-zero RETURN-CODE, as the
CBL_THREAD_ APIs are only available in the threaded COBOL run-time.

Gael.