TIRFTMTS

TIRFTMTS is a called module supplied with CA Gen. TIRFTMTS is called every time an CA Gen action diagram uses the TIMETIMESTAMP function.

TIMETIMESTAMP converts the time part of a timestamp value into a valid time.

TIMETIMESTAMP generates the following COBOL statements:

Statement

Quantity

Call

1

Compute

1

Move

3

Initialize

1

IF

1

Heavy use of TIMETIMESTAMP can drastically increase CPU costs.

Hints

If an action diagram uses TIMETIMESTAMP more than once for the same timestamp:

  • use TIMETIMESTAMP once for the desired timestamp

  • save the time returned in a local view

  • use the local view instead of TIMETIMESTAMP for the remaining instances

  • pass the local view to the import view of any called action diagrams that need it.

If TIMETIMESTAMP is used in an action diagram that uses several CA Gen functions, or the action diagram has high CPU usage due to TIMETIMESTAMP, consider converting the action diagram to an external action block.

Example (COBOL External Action Block)

In this example, one COBOL statement is needed to convert the time part of a timestamp value into a valid time.

 

LINKAGE SECTION.

01 IMPORT-0001EV.

03 WORK-VIEW-0001ET.

05 TIMESTAMP-FLD1-0001AS PIC X(0001).

05 TIMESTAMP-FLD1-0001.

07 FILLER-ZERO-DATE PIC 9(0008).

07 FILLER-ZERO-TIME PIC 9(0012).

05 TIMESTAMP-FLD1-0001XX REDEFINES TIMESTAMP-FLD1-0001

PIC X(0020).

01 EXPORT-0002EV.

03 WORK-VIEW-0002ET.

05 TIME-FLD1-0002AS PIC X(0001).

05 TIME-FLD1-0002 PIC S9(0006).

05 TIME-FLD1-0002XX REDEFINES TIME-FLD2-0001

PIC X(0006).

PROCEDURE DIVISION.

COMPUTE TIME-FLD1-0002 = FILLER-ZERO-TIME / 1000000.