4. CA MICS Facilities › 4.2 CA MICS Component Generator (MCG) › 4.2.4 Generator Definition Statements › 4.2.4.4 Standard Data Element Definition Statements › 4.2.4.4.1 Type Statement (TYPE)
4.2.4.4.1 Type Statement (TYPE)
This statement defines the type, length, and SAS format
attributes for 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
described below.
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/NAMX statements)
until a new TYPE statement is encountered.
Note: The length for any data element is forced
to 8 if the MONEY format is used on the TYPE
statement.
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:
R - Retained data element
A - Accumulated data element
M - Maximum data element
N - Minimum data element
C - Derived data element with
expressions
CN - Derived data element with no
expressions
X - Common data element
XR - Common Retained data element
XA - Common Accumulated data element
XM - Common Maximum data element
XN - Common Minimum data element
XC - Common Derived data element
XCN - Common Derived data element
with no expressions
DTL - Defines the number of bytes that is to
be used for the data element's LENGTH
when used 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. Reference the
recommendations on LENGTH definition
provided 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. Reference the
recommendations on FORMAT definition
provided below.
DWL - Defines the number of bytes that is to
be used for the data element's LENGTH
when used in the WEEKS or DAYS
timespans. The LENGTH is required.
Any valid SAS numeric or character
LENGTH may be used. The maximum
length of this value is 5 characters.
Reference the recommendations on
LENGTH definition provided below.
DWF - Defines the display mask that is to be
used as the data element's FORMAT and
INFORMAT when used in the WEEKS or
DAYS 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.
Reference the recommendations on
FORMAT definition provided below.
YML - Defines the number of bytes that is to
be used for the data element's LENGTH
when used 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.
Reference the recommendations on
LENGTH definition provided 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 (WDF
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.
Reference the recommendations on
FORMAT definition provided 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 Integer, fraction, and character data elements should
not have FORMATs defined. 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 operated on as maximum
values (XM). The value is a timestamp having a length of 7
bytes and a format of DATETIME19.2 (e.g. 09APR00:11:17:23.22
for April 9, 2000) for the DETAIL, DAYS/WEEKS, and
MONTHS/YEARS definitions.