TIRFDAYS
TIRFDAYS is a called module supplied with CA Gen. TIRFDAYS is called every time an action diagram uses the DAYS function.
DAYS converts a valid date to the number of days since December 31, 0000. DAYS is typically used to calculate the number of days between two dates.
DAYS generates the following COBOL statements:
Statement |
Quantity |
Call |
1 |
Compute |
2 |
Move |
2 |
Initialize |
1 |
IF |
1 |
Heavy use of DAYS can drastically increase CPU costs.
Example
The following example calculates the number of days a policy has been in effect.
SET local work_set nbr_of_days TO days(CURRENT_DATE) - days(local policy
start_date)
Hints
If an action diagram uses DAYS more than once for the same date:
-
use DAYS once for the desired date
-
save the converted number of days in a local view
-
use the local view instead of DAYS for the remaining instances
-
pass the local view to the import view of any called action diagrams that need it.