Re: Microfocus Cobol "SLEEP" routine



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@xxxxxxxxxxx> wrote in message
news:f2cdof$tbi$01$1@xxxxxxxxxxxxxxxxxxxx
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@xxxxxxxxxxxxxxxxxxxxx> wrote in message
news:5atoomF2qeibjU1@xxxxxxxxxxxxxxxxxxxxx
"C C" <someone@xxxxxxxxxxxxxxx> wrote in message
news:yAh2i.4627$UU.2661@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
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
.



Relevant Pages

  • Re: Timer Task?
    ... "sleep" for scheduling? ... I use cron for most of these periodic, ... in most cases "sleep" is a perfectly acceptable way to do it. ... guarantee is that it will be *at least* 10 seconds. ...
    (comp.lang.ruby)
  • Re: Leaving a Computer Running ?
    ... > when to perform the nightly maintenance. ... I turn my computer off over night so I can sleep. ... This would mean missing the ... cron stuff but since most of it is done by periodic, I have a script that is ...
    (freebsd-questions)
  • Re: OT. Cron jobs
    ... We have a perl script that needs to run 4 times a minute. ... cron or is there an easier way to do this within the Perl script itself? ... Your best best would be to create a script that continuously forks and ... Since sleep only handle's whole seconds, you'll want to take a look at ...
    (perl.beginners)
  • [SLE] RANT: Advantages of Dual Core
    ... when my computer has gone to sleep when running the cron update. ... and despite that this function is reduntant function from the ... all manuals, which nobody reads anymore. ...
    (SuSE)