Previous Topic: 4.2.4.5 Common Data Element Definition Statements

Next Topic: 4.2.4.5.2 Alias Statement (ALIAS)

4.2.4.5.1 Type Statement (TYPE)

This statement defines the type, length, and SAS format
attributes for common data elements.

STATEMENT FORMAT

This keyword is coded with the KEYWORD starting in column 1,
free-form, and continuing through column 72.  Continuation is
not supported.  The following describes the format and coding
rules for the TYPE Statement.

  TYPE tt lll.l ffffff lll.l fffffff lll.l fffffff
       |   |     |       |     |       |     |
       |   |     |       |     |       |     +---YMF - SAS
       |   |     |       |     |       |         FORMAT for
       |   |     |       |     |       |         YEARS and
       |   |     |       |     |       |         MONTHS
       |   |     |       |     |       |
       |   |     |       |     |       +---YML - SAS LENGTH
       |   |     |       |     |           for YEARS and
       |   |     |       |     |           MONTHS
       |   |     |       |     |
       |   |     |       |     +---DWF - SAS FORMAT for
       |   |     |       |         WEEKS and DAYS
       |   |     |       |
       |   |     |       +---DWL - SAS LENGTH for WEEKS and
       |   |     |                 DAYS
       |   |     |
       |   |     +---DTF - SAS FORMAT for DETAIL
       |   |
       |   +---DTL - SAS LENGTH for DETAIL
       |
       +---DATATYPE - Type of data element defined as
           computed with generic, common retained, common
           accumulated, common maximum, or common minimum.

STATEMENT OPTION DEFINITIONS

  TYPE    - Defines data elements' type, length, and SAS
            format attributes.  The definitions provided in a
            TYPE statement will be used for all data elements
            following the statement (NAME statements) until a
            new TYPE statement is encountered.

            DATATYPE - Defines the type of data element and
                       the manner in which this element is
                       operated on by the CA MICS
                       summarization process.  The valid
                       codes include:

                       XC - Common Derived element
                       XR - Common Retained element
                       XA - Common Accumulated element
                       XM - Common Maximum element
                       XN - Common Minimum element
                       XCN - Common Derived data element
                             with no expressions

            DTL      - Defines the number of bytes to use for
                       the data element's LENGTH in the
                       DETAIL timespan.  The LENGTH is
                       required.  Any valid SAS numeric or
                       character LENGTH may be used.  The
                       maximum length of this value is 5
                       characters.  Refer to the LENGTH
                       definition recommendations below.

            DTF      - Defines the display mask that is to be
                       used as the data element's FORMAT and
                       INFORMAT when used in the DETAIL
                       timespan.  The format is not required
                       and is coded as a (.) to specify no
                       format.  Any valid SAS FORMAT may be
                       used.  The maximum length of this
                       value is 12 characters.  Refer to the
                       FORMAT definition recommendations
                       below.

            DWL      - Defines the number of bytes to use for
                       the data element's LENGTH when used in
                       the DAYS or WEEKS timespans.  The
                       LENGTH is required.  Any valid SAS
                       numeric or character LENGTH may be
                       used.  The maximum length of this
                       value is 5 characters.  Refer to the
                       LENGTH definition recommendations
                       below.

            DWF      - Defines the display mask that is to be
                       used as the data element's FORMAT and
                       INFORMAT when used in the DAYS or
                       weeks timespans.  The format is not
                       required and is coded as a (.) to
                       specify no format.  If no format has
                       been specified but a FORMAT was
                       defined for the DETAIL timespan
                       (DTF), then that FORMAT will be used
                       in place of the "no format"
                       specification.  Any valid SAS FORMAT
                       may be used.  The maximum length of
                       this value is 12 characters.  Refer to
                       the FORMAT definition recommendations
                       below.

            YML      - Defines the number of bytes to use for
                       the data element's LENGTH in the YEARS
                       or MONTHS timespans.  The LENGTH is
                       required.  Any valid SAS numeric or
                       character LENGTH may be used.  The
                       maximum length of this value is 5
                       characters.  Refer to the LENGTH
                       definition recommendations below.

            YMF      - Defines the display mask that is to be
                       used as the data element's FORMAT and
                       INFORMAT when used in the YEARS or
                       MONTHS timespans.  The format is not
                       required and is coded as a (.) to
                       specify no format.  If no format has
                       been specified but a FORMAT was
                       defined for the lower timespans (DWF
                       or DTF), then that FORMAT will be used
                       in place of the "no format"
                       specification.  Any valid SAS FORMAT
                       may be used.  The maximum length of
                       this value is 12 characters.  Refer to
                       the FORMAT definition recommendations
                       below.

LENGTH definition recommendations

    Integer values:     Maximum Value      SAS LENGTH

                                  255           2
                               65,535           3
                           16,777,215           4
                        4,294,967,295           5
                    1,099,511,627,775           6
                  281,474,946,710,655           7
              720,557,594,037,928,000           8

    Fractions to 0.1     Maximum Value      SAS LENGTH

                                255.9           3
                             65,535.9           4
                         16,777,215.9           5
                      4,294,967,295.9           6
                  1,099,511,627,775.9           7
                281,474,976,710,656.9           8


    Fractions to 0.01    Maximum Value      SAS LENGTH

                                255.99          3
                             65,535.99          4
                         16,777,215.99          5
                      4,294,967,295.99          6
                  1,099,511,627,775.99          7
                281,474,976,710,656.99          8

    Times in 0.01 Seconds Maximum Value      SAS LENGTH

                           HH:MM:SS.HS
                           18:12:15.99           4
                        4,660:20:15.99           5
                    ??????????????????           6

FORMAT definition recommendations

    o Do not specify formats for integer, fraction, and
      character data elements.  Instead, enter a period
      (missing value) in the format field.

    o Percentage data elements should have a LENGTH of 3 and
      a FORMAT of MAPCT, which will display the percentage as
      999.99%.

    Times in 0.01 Seconds      FORMAT        SAS LENGTH

                              TIME11.2           5
                              TIME15.2           6
                              TIME18.2           7
                              TIME18.2           8

    o Timestamp data elements should have a LENGTH of 7 and a
      FORMAT of DATETIME19.2 (DDMMMYY:HH:MM:SS.HS) or
      DATETIME21.2 (DDMMMYYYY:HH:MM:SS.HS).

STATEMENT DEFINITION EXAMPLE

    TYPE XM 7 DATETIME19.2 7 DATETIME19.2 7 DATETIME19.2

The data elements defined by the NAME statements to follow
are common data elements that are to be operated on as
maximum values (XM).  The value is a timestamp having a
length of 7 bytes and a format of DATETIME19.2
(09APR82:11:17:23.22) for the DETAIL, DAYS/WEEKS, and
MONTHS/YEARS definitions.