*CPU-TIME variable

Would like to understand why *CPU-TIME always contains the value zero for CICS TP monitor (some others as well) system on Mainframe computers?

Not sure, but I am guessing the difference under a TP monitor has to do with the fact that individual sessions are not charged CPU time by the system - just the TP monitor itself - and the accounting of this is not allocated to each user’s session. This is unlike batch where your Natural session is running in its own address space.

The Natural documentation confirms that Natural under VSE/ESA, CICS, IMS/TM, UTM and versions of Complete under 6.3 will show *CPU-TIME=0 always.

You do have an alternative measuring elapsed time would substitute:

LBL1. SETTIME
(bunch of code in Natural)



WRITE ‘TIME ELAPSED:’ *TIMD (LBL1.)

*CPU-TIME is zero for those (TP monitor) systems that do not provide the possibility for individual CPU time accounting, e.g. CICS.