TIMESTAMP-OFFSET-RECORD SQL Type

Note: OpenESQL only

Syntax

SQL [TYPE] [IS] TIMESTAMP-OFFSET-RECORD
Use TIMESTAMP-OFFSET-RECORD to generate a group-level record for the timestamp containing individual records for each element of the timestamp as follows:
  • Year
  • Month
  • Day
  • Hour
  • Minute
  • Second
  • Fractional second
  • Offset hours
  • Offset minutes

To insert data, you must pass valid data in the generated field names.

Example

01 hv-name SQL TYPE IS TIMESTAMP-OFFSET-RECORD.

generates

01 hv-name.
  03 hv-name-year  PIC S9(4) COMP-5.
  03 hv-name-month PIC 9(4) COMP-5.
  03 hv-name-day   PIC 9(4) COMP-5.
  03 hv-name-hour  PIC 9(4) COMP-5.
  03 hv-name-min   PIC 9(4) COMP-5.
  03 hv-name-sec   PIC 9(4) COMP-5.
  03 hv-name-frac  PIC 9(9) COMP-5.
  03 hv-name-tz-hour PIC S9(4) COMP-5.
  03 hv-name-tz-min  PIC S9(4) COMP-5.