From: "Farley, Peter x23353" <[email protected]>
Sent: Friday, 9 March 2012 2:17 AM


PMFJI here: I do not know offhand what facilities PL/1 provides,
but neither COBOL nor LE facilities provide time functions
that return anything finer-grained than milliseconds.

 COBOL native facilities are limited to hundredths of a second
(ACCEPT from TIME).  In addition, you cannot measure CPU time
with any of these facilities, only elapsed time.

PL/I's still at the millisecond level (DATETIME).
However, to time a statement, it's usual to establish a loop for a few
thousand/million iterations and to time that.

The OP's original request seems to be asking for the equivalent
of a profiling tool that will show CPU time spent in a COBOL
program by statement or block of statements.  Language-based
time facilities will not help solve that request.

For that, some profiling tool would be required.
For individual statements, even that may be inadequate,
since some statements may not measure anything much
when they take a microsecond or so to execute.

For the PC, elapsed time is effectively the same as CPU time.
And anyway, elapsed time is what one is most concerned about.

Reply via email to