Value Range of *TIMD(): more than 24 hours?

I’m with Natural for some decades, so to place my question is somewhat painful.

Working on IBM z/OS, I have to tune a Batch Programm.
To get a baseline I determinted the Elpased time as usual:

at the begin
START. SETTIME

at the end 
TD_ := *TIMD (START.)

with TD_  defined as

      2 TD_                              N          7 /*TIMD
   R  2 TD_                                           /* BEGIN REDEFINE: TD_
      3 TDHH_                            N          2
      3 TDMM_                            N          2
      3 TDSS_                            N          2
      3 TDTS_                            N          1

Inspecting the log I see: “Elapsed time: 19:11:39.2”

Checking the JES2 Job Log

Job Start: 13.52.46 JOB39601 ---- THURSDAY, 09 JUL 2015 ----
Natural Step started 13.56.48
Natural Step terminated
09.08.28 JOB39601 ---- SATURDAY, 11 JUL 2015 ----

Based on this *TIMD() embezzled 24 hours.

I checked all available documentation, but I was unable to find any Limitation for *TIMD().

Is the a Maximum for *TIMD()?

Any Feedback is welcomed.
Christian

For durations greater than 24 hours I use Time variables and *TIMX. For the calculations, see the TMDIFF code within my Code Sample: http://techcommunity.softwareag.com/ecosystem/communities/public/adanat/products/natural/codesamples/5ddd08f1-de89-11e4-89cb-cd8d7ef22065/?title=Date+%26+Time+Calculations.

Hi Ralph.

Thx for the reply. I’m familiar with the coding you proposed.

My initial question is still open: Is there a 24 hour limitation in *TIMD()?

As mentioned: I checked all available documentation starting with an antique Natural 2.2 Manual from 1993 up to the lastet documentation. I didn’t find any statement about a limitation.

Based on the structure of *TIMD() [HHIISST] my assumption was that the maximum elapsed time could be 99:59:59.9

Any way, thx for your hint.
Christian

Neither have I seen anything that defines a maximum value for HH. The only clue is NAT1143 Input does not correspond to input edit mask. You get this if you try to convert an hour value greater than 24.

DEFINE DATA LOCAL
1 #T (T)
1 #A (A8) INIT <'25:13:14'>
END-DEFINE
MOVE EDITED #A TO #T (EM=HH:II:SS)
WRITE #T
END

*TIMD must be a T-format value and the time portion of a T-format cannot exceed 24 hours.

Hi Ralph.

This may be the reason. So my current understanding is: There is a 24 hour limitation deep inside the natural runtime system where *TIMD() is evaluated.

For time being, I switch to *TIMX() and calculate the elapsed time myself.

Thx, Christian