Re: How to let a COBOL program sleep 5 seconds
From: wahlers (ahlers_wim_at_hotmail.com)
Date: 09/07/04
- Next message: JJ: "Re: How to let a COBOL program sleep 5 seconds"
- Previous message: Robert Wagner: "Re: If you were inventing CoBOL..."
- In reply to: William Cai: "How to let a COBOL program sleep 5 seconds"
- Next in thread: JJ: "Re: How to let a COBOL program sleep 5 seconds"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 07 Sep 2004 07:57:23 -0400
To add to Frederico Fonseca's answer:
COBOL does not include a "sleep" function up to and including COBOL-85.
There might(!) be a COBOL intrinsic standard function that performs this
function (I don't know...check yourself).
There might(!) be a COBOL standard "sleep" function in the COBOL-2002
standard (or beyond). I don't know!
Assuming there is no standard "sleep" function then do the following:
1. Write a COBOL function (within OOCOBOL: a COBOL static function),
calling a system dependent(!) "sleep" routine.
2. Let your program call this (static) COBOL function when required.
This 2-phase call structure will accomplish the following:
It will prevent a massive recompile of many COBOL programmes in case you
have to change the environment or "sleep" routine.
Thus:
COBOL programs (many) -- calls -> COBOL "sleep" routine (independent) --
calls -> "sleep" routine (system dependent)
Notice that in the worst case scenario the system dependent "sleep"
routine must be replaced and maybe the COBOL "sleep" routine must be
modified (calling a different system dependent "sleep" routine name and/or
parameters).
There is, and will be, only one COBOL "sleep" routine.
The call structure relationship is thus as follows:
many COBOL programs calling 1 COBOL "sleep" routine calling 1 system
dependent "sleep" routine.
Using a construction as described as above makes your system more robust
and more adaptable for change.
I hope I was clear enough...regards, Wim Ahlers.
P.S. I don't care what the system dependent sleep routine looks like
(assembler, C++, LE routines (C), or whatever...).
- Next message: JJ: "Re: How to let a COBOL program sleep 5 seconds"
- Previous message: Robert Wagner: "Re: If you were inventing CoBOL..."
- In reply to: William Cai: "How to let a COBOL program sleep 5 seconds"
- Next in thread: JJ: "Re: How to let a COBOL program sleep 5 seconds"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|