Unique DMSII Date/Time Represented as ALPHA or NUMBER

You may be able to decode DMSII date/time formats represented as NUMBER or ALPHA items, and convert them to relational database date/time format even if you could not find the correct encoding scheme in the previous sections. For instance, if the DMSII date item has no day (mmyy or yymm), dms_subtype of 0x32 or 0x23 converts this to relational database date/time with a day as "1" and the time as all zeros. For this to work, the DMSII item cannot include any ALPHA data (such as slashes, dashes, or month names). Therefore, 01-FEB-05 would not convert, but 0205 would.

To decode these unique date or date/time layouts using the DATABridge Client, write a script (script.user_layout.primary_tablename) that does the following:

  1. Sets the DIOPT_Clone_as_Date (2) and the DIOPT_VarFormat_Date (2048) bits in di_options.
  2. Sets the dms_subtype column in DMS_ITEMS to indicate the hexadecimal string, in the same order as the host item layout, as follows:

    Date/Time Encoding Scheme

    Description

    Hexadecimal Value for dms_subtype Column

    yyyy

    Four-digit year

    1

    yy

    Two-digit year within 1950-2049

    To adjust this range, use the century_break configuration parameter. See century_break.

    2

    mm

    Two-digit month

    3

    dd

    Two-digit day

    4

    hh

    Two-digit hours

    5

    mn

    Two-digit minutes

    6

    ss

    Two-digit seconds

    Note: The DATABridge SQL Server Client stores all host values for seconds (ss) as zero unless you add the DIOPT_Use_LongDate (128) bit to di_options in step one of the layout script. See "di_options" in DMS_ITEMS.

    7

As stated previously, the format can be as short as yymm (dms_subtype 0x23 or 35 decimal). Formats like mmhhyy are supported (dms_subtype of 0x253 or 850 decimal) as well as longer ones. For example, a mainframe date/time layout of mmsshhmnddyy uses the dms_subtype value of 0x375642 or 3626562 decimal.