gtpg2m48General Macros

TMCNA-Time Conversion

This general macro provides three services:

Format




label
A symbolic name can be assigned to the macro statement.

MODE=BCDBIN
Indicates that the conversion is from EBCDIC to binary.

NUMBCD
This parameter specifies whether the EBCDIC input is based on the 12-hour or 24-hour clock.

NO
Indicates the 12-hour clock format.

YES
Indicates the 24-hour clock format.

NUMBCD is optional and is used only when MODE=BDCBIN is selected.

INPUT=label
The symbolic address of the field containing the value to be converted.

When NUMBCD=NO, the input parameter addresses a 5-byte field containing the following:

  • Byte 0-1 - EBCDIC hour
  • Byte 2-3 - EBCDIC minutes
  • Byte 4 - an alpha character from the list A, N, P or M representing AM, NOON, PM or Midnight, respectively.

When NUMBCD=YES, the input parameter addresses a 4-byte field containing the following:

  • Byte 0-1 - EBCDIC hour
  • Byte 2-3 - EBCDIC minutes

OUTPUT=label
The symbolic address of a 2-byte field which will contain the number of minutes after midnight upon return from this macro. No alignment is necessary for this field.

MODE=BINBCD
Indicates that the conversion is from binary to EBCDIC.

INPUT=label
The symbolic address of the field containing the value to be converted. When MODE=BINBCD, this parameter references a 2-byte field containing a binary number less than 1440. No error checking is done on this value.

OUTPUT=label
The symbolic address of a 5-byte field which will contain the following upon return from this macro.
  • Byte 0-1 - EBCDIC hour
  • Byte 2-3 - EBCDIC minutes
  • Byte 4 An alpha character from the list A, N, P or M representing AM, NOON, PM or Midnight, respectively.

RGEVEN=Re
The even numbered register of a consecutive even-odd register pair.

WORK=label
The symbolic address of an 8-byte work area aligned on a doubleword boundary.

Entry Requirements

None.

Return Conditions

Programming Considerations

Examples

ANYNAME  TMCNA MODE=BCDBIN,NUMBCD=YES,INPUT=EBW010,OUTPUT=EBW014,
               WORK=EBW024,RGEVEN=R2