Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Microfocus Cobol "SLEEP" routine
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.



Report this thread to moderator Post Follow-up to this message
Old Post
C C
05-15-07 11:55 PM


Re: Microfocus Cobol "SLEEP" routine
"C C" <someone@atsbcglobal.net> wrote in message
news:yAh2i.4627$UU.2661@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




Report this thread to moderator Post Follow-up to this message
Old Post
Steve Rainbird
05-15-07 11:55 PM


Re: Microfocus Cobol "SLEEP" routine
On 15 Mai, 14:20, "C C" <some...@atsbcglobal.net> wrote:
> 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.

Hello,

I don't know a commando for sleep.

Either you write a loop with perform varying... or you use a loop with
checking out the time while it is looping.
But in both solutions the program/machine is (very) busy and not
sleeping!

Thomas


Report this thread to moderator Post Follow-up to this message
Old Post
Thomas
05-15-07 11:55 PM


Re: Microfocus Cobol "SLEEP" routine
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@rainbird.me.nospam.uk> wrote in message
news:5atoomF2qeibjU1@mid.individual.net...
> "C C" <someone@atsbcglobal.net> wrote in message
> news:yAh2i.4627$UU.2661@newssvr19.news.prodigy.net... 
>
>
> 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
>
>
>



Report this thread to moderator Post Follow-up to this message
Old Post
C C
05-15-07 11:55 PM


Re: Microfocus Cobol "SLEEP" routine
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@rainbird.me.nospam.uk> wrote in message
> news:5atoomF2qeibjU1@mid.individual.net... 

--
Vaclav Snajdr

Report this thread to moderator Post Follow-up to this message
Old Post
Vaclav Snajdr
05-15-07 11:55 PM


Re: Microfocus Cobol "SLEEP" routine
"C C" <someone@atsbcglobal.net> wrote in message
news:Pzi2i.3295$zj3.230@newssvr23.news.prodigy.net...
> 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@rainbird.me.nospam.uk> wrote in message
> news:5atoomF2qeibjU1@mid.individual.net... 
>
>


Have you tried call "SYSTEM" there is a difference but I can't remember
offhand what it is.

Or maybe even CBL_EXEC_RUN_UNIT although I have never used this.

--
Steve




Report this thread to moderator Post Follow-up to this message
Old Post
Steve Rainbird
05-15-07 11:55 PM


Re: Microfocus Cobol "SLEEP" routine
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@t-online.de> wrote in message
news:f2cdof$tbi$01$1@news.t-online.com...
> it is possible to use "accept with timeout xyz" instead call system ...
> (in background programs too)
>
>
>
> C C wrote:
> 
>
> --
> Vaclav Snajdr



Report this thread to moderator Post Follow-up to this message
Old Post
C C
05-15-07 11:55 PM


Re: Microfocus Cobol "SLEEP" routine
Why just not to call it directly ?

CALL 'sleep' USING BY VALUE 300.

Regards,
Sergey


"C C" <someone@atsbcglobal.net> wrote in message
news:yAh2i.4627$UU.2661@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.
>



Report this thread to moderator Post Follow-up to this message
Old Post
Sergey Kashyrin
05-15-07 11:55 PM


Re: Microfocus Cobol "SLEEP" routine
I don't know which versions it is and is not in, but check your documentatio
n
for the Micro Focus callable service

CBL_THREAD_SLEEP

P.S.  I haven't actually used it myself, so "YMMV"

--
Bill Klein
wmklein <at> ix.netcom.com
"C C" <someone@atsbcglobal.net> wrote in message
news:yAh2i.4627$UU.2661@newssvr19.news.prodigy.net...
> Hello.
>
> Is there a way in MF Cobol to pause program execution (sleep) for, let's s
ay,
> 5 minutes???  My workaround is to call the AIX command "sleep 300".  I nee
d a
> routine in Cobol itself so I may vary the time to pause in some programs.
>
> Thanks in advance.
>



Report this thread to moderator Post Follow-up to this message
Old Post
William M. Klein
05-15-07 11:55 PM


Re: Microfocus Cobol "SLEEP" routine
William M. Klein wrote:
> I don't know which versions it is and is not in, but check your documentat
ion
> for the Micro Focus callable service
>
>    CBL_THREAD_SLEEP
>
> P.S.  I haven't actually used it myself, so "YMMV"
>
Out of curiosity I went looking, searching on 'WAIT', 'SLEEP' - no luck.
Never thought of CBL_THREAD......

Here's the reference to it in Net Express V 5.0 :-

http://supportline.microfocus.com/s...ndx.ht
m

Jimmy

Report this thread to moderator Post Follow-up to this message
Old Post
James J. Gavan
05-15-07 11:55 PM


Sponsored Links




Last Thread Next Thread Next
Pages (2): [1] 2 »
Search this forum -> 
Post New Thread

Cobol archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 09:36 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.