Defining and changing date and time attributes

Attributes relating to a field used to store date and time values can be defined and changed on the Date/Time Attributes panel. This panel allows you to:

You can also specify data create and scrambling options on this panel.

Selecting a field for date and time attribute definition or change

You select a field from the Field Selection/Edit panel (Figure 1). To select a field for date and time attribute definition or change, enter DT in the Cmd field adjacent to the required field. You can enter DT against as many fields as you like. For each field you select, Z Data Tools displays a Date/Time Attributes panel.

The attributes you can define or change are:

  • Internal format used to store the date and time value
  • Alternate data type used for date and time processing
  • Output format used to display the date and time value
  • Values used when creating new records and modifying copied records
  • Options for scrambling the date and time values from copied records

The Date/Time Attributes panel

The Format field in the Internal Attributes section of the panel is used to specify the format in which a date and time value is stored in the field. The format value can be a string containing picture characters supported by the Language Environment® date and time callable services. For example if an 8 byte, external decimal field is used to store a date in the form of a 4 digit year value followed by a 2 digit month value followed by a 2 digit day value you would specify the format string as:

      YYYYMMDD

You can also enter one of the following formats supported by Z Data Tools:

CENTSECS
Time of day in hundredths of seconds.
CBLDATE
COBOL date (the number of days since 31 December 1600)
CYYDDD
Julian date with C as the century indicator (0 = 1900s, 1 = 2000s)
LILDATE
Lilian date (the number of days since 14 October 1582)
LILTIME
Date and time stored as the number of seconds since 00:00:00 14 October 1582.
MICSECS
Time of day in millionths of seconds.
MILLSECS
Time of day in thousandths of seconds.
STCK
Date and time stored as a TOD clock value.
STCKE
Date and time stored as an extended TOD clock value.

The Type field in the Internal Attributes section of the panel allows you to specify a data type that differs from that defined in the field attributes. This is used when the field data type is not appropriate for the processing of the date and time value. For example if an alphanumeric field is used to store microsecond time values BI(binary) can be entered in the Type field to ensure Z Data Tools performs valid processing of the time values. The Format field in the Output Attributes section of the panel allows you to specify the format used to display the date and time values for this field. You enter the format as a string containing picture characters supported by the Language Environment date and time callable services. For example to display a date value as a string showing a 3 character day-of-week, a 3 character month, 2 digits for the day of the month, and 4 digits for the year you could specify the format string as:

     Www Mmm DD, YYYY

When Z Data Tools displays a date and time field in formatted mode, the output width for the field is set to the length of the specified output format.