Previous Topic: TLMDATE FROM_EXTERNAL Macro—Convert to Internal DateNext Topic: TLMDATE FROM_JFCB Macro—Convert Date to Internal Format


TLMDATE FROM_HDR1 Macro—Convert Date to Internal Format

Use the FROM_HDR1 form of the TLMDATE macro to convert a date in HDR1 format to a date in CA TLMS internal format. This function translates FRDATE (HDR1 format) into TODATE (CA TLMS internal format).

This function uses registers 0, 1, 14 and 15. These registers cannot be used to pass information to the macro.

This macro has the following format:

label TLMDATE FROM_HDR1
,FRDATE=hdrldate
,TODATE=internal
,ANCHOR=anchor 
,PARM=plist 
[,NORMAL=branch]
[,ERROR=branch]
[,FAIL=branch]

[,ZEROS=branch]

[,JDATE=branch]

[,PERM=branch]

FRDATE=hdrldate

Specifies the date to be converted.

Type: RX-type label, HDR1 format (6 bytes)

TODATE=internal

Specifies the date to receive the translated internal date.

Type: RX-type label, (Rn), internal packed (4 bytes)

ANCHOR=anchor

Points to the label specified by the ANCHOR form of the TLMDATE macro.

Type: RX-type label or (Rn)

PARM=plist

Points to the label specified by the PARM form of the TLMDATE macro.

Type: RX-type label or (Rn)

NORMAL=branch

(Optional). Specifies the instruction to receive control on return from the CTSDATE module when no errors occurred. If not defined, the next instruction after the macro is executed.

Type: RX-type label

ERROR=branch

(Optional) Specifies the instruction to receive control on return from the CTSDATE module when a date or range error occurred. If not defined, the next instruction after the macro is executed.

Type: RX-type label

FAIL=branch

(Optional) Specifies the instruction to receive control on return from the CTSDATE module when a critical error has occurred. If not defined, the next instruction after the macro is executed.

Type: RX-type label

The following branches are performed only if the return from CTSDATE is NORMAL. If neither is specified, the default is to NORMAL.

JDATE=branch

(Optional) Specifies the label to get control if the resulting date is a Julian date.

Type: RX-type label

ZEROS=branch

(Optional) Specifies the label to get control if the resulting date is equal to zeros.

Type: RX-type label

The following branch is performed only if the return from CTSDATE is NORMAL. It represents dates that are CA TLMS keywords.

PERM=branch

(Optional) Specifies the label to get control if the resulting date is the CA TLMS keyword PERM or PERMANENT.

Type: RX-type label

Example: TLMDATE FROM_HDR1 Macro

                                                                  Pos. 72
                                                                  |
TLMDATE  FROM_HDR1,FRDATE=FL1EXPDT,TODATE=XEXPDT,                 X
      ANCHOR=XWANCHOR,PARM=XWPARM