Previous Topic: TLMDATE FROM_HDR1 Macro—Convert Date to Internal FormatNext Topic: TLMDATE NUM_DAYS Macro—Days Between Dates


TLMDATE FROM_JFCB Macro—Convert Date to Internal Format

Use the FROM_JFCB form of the TLMDATE macro to convert a date in JFCB format to a date in CA TLMS internal format. This function translates FRDATE (JFCB 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_JCFB 
,FRDATE=jfcbdate
,TODATE=internal
,KEY=[YES|NO|LABEL]
,ANCHOR=anchor
,PARM=plist
[,NORMAL=branch]
[,ERROR=branch]
[,FAIL=branch]
[,ZEROS=branch]
[,JDATE=branch]
[,KEYWORD=branch]
[,USER=branch]
[,MSG=branch]
[,CATLG=branch]
[,CATLGDD=branch]
[,CYCLE=branch]
[,FOREIGN=branch]
[,LDATE=branch]
[,PERM=branch]
[,AGE=branch]
FRDATE=jfcbdate

Specifies the date to be converted.

Type: RX-type label, JFCB format, hexadecimal (3 bytes)

TODATE=internal

Specifies the date to receive the translated internal date.

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

KEY=[YES|NO|LABEL]

Indicates whether the date being translated can contain keywords (97000-99366).

Valid values:YES, NO, or a field containing the value

Type: RX-type label, (Rn) or constant (quotes)

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 they are omitted, NORMAL is assumed. 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 branches are performed only if the return from CTSDATE is NORMAL. They represent dates that are CA TLMS keywords. If the value KEYWORD= is coded, all branches default to this value. If KEYWORD= is not coded, the default is to NORMAL.

AGE=branch

(Optional) Specifies the label to get control if the resulting date is the CA TLMS keyword AGE/ddd.

Type: RX-type label

CATLG=branch

(Optional) Points to the label to get control if the resulting date is the CA TLMS keyword CATLG or CATALOG.

Type: RX-type label

CATLGDD=branch

(Optional) Specifies the label to get control if the resulting date is the CA TLMS keyword CATLG/ddd.

Type: RX-type label

CYCLE=branch

(Optional) Specifies to the label to get control if the resulting date is the CA TLMS keyword CYCLE/ccc.

Type: RX-type label

FOREIGN=branch

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

Type: RX-type label

KEYWORD=branch

(Optional) Specifies the label to get control if the resulting date is a CA TLMS keyword (associated branch for that keyword was not coded).

Type: RX-type label

LDATE=branch

(Optional) Specifies the label to get control if the resulting date is the CA TLMS keyword LDATE/ddd.

Type: RX-type label

MSG=branch

(Optional) Specifies the label to get control if the resulting date is the CA TLMS keyword MSG/mmm.

Type: RX-type label

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

STATS=branch

(Optional) Specifies the label to get control if the resulting date is the CA TLMS keyword STATS/nnn.

Type: RX-type label

USER=branch

(Optional) Specifies the label to get control if the resulting date is the CA TLMS keyword USER/nnn.

Type: RX-type label

Example: TLMDATE FROM_JFCB Macro

                                                                  Pos. 72
                                                                  |
TLMDATE  FROM_JFCB,FRDATE=JFCBCRDT,TODATE=TMCRTDT,                X
      KEY='NO',ANCHOR=XWANCHOR,PARM=XWPARM,                       X
      ERROR=ABEND10,FAIL=ABEND10