DATETIME
The DATETIME control statement defines the overall date and time range for the data you want to use in your reports.
A record is selected for a report only if the date and time of the start of its recording interval falls within the specified DATETIME range. To clarify, if you define DATETIME as the following, any SMF record whosestart-of-interval date and time falls between 8:00:00 A.M. of March 22, 2008 through midnight of March 23, 2008, is selected for processing.
Note that the data collection (or extraction) interval affects how reports are produced. For example, if REPORT CPM,SYNCH=59, INTERVAL=30 was specified when starting the CMF MONITOR Extractor, records will exist which have a start-of-interval time before 8:00 A.M. Thus, using the above DATETIME statement, these records will not be selected even though most of their data was gathered after 8:00 A.M.
A specific report time range can be smaller because there are other control statements, such as the CYCLE, SHIFT, and PERIOD statements that divide the overall DATETIME range into smaller ranges of time. When applied to a report control statement, the report is modified to include only data that falls between the defined period.
When using this statement, both a begin date-time and an end date-time must be specified.
Parameters
The parameters for the DATETIME control statement are as follows:
sdate | specifies the start date for the report data range This parameter is required for the DATETIME statement. This parameter is expressed in one of the following three formats:
|
---|---|
stime | specifies the start time for the DATETIME range start date Specifying stime is optional. The time is based on a 24-hour clock. This parameter is expressed as hhmmss{.th} where
|
edate | specifies the end date for the DATETIME range This parameter is required and must be expressed in the same format as the sdate parameter. |
etime | specifies the end time for the DATETIME range end date The end time is optionally defined. The same format used to define the optional stime parameter is used to define this parameter. |
Syntax rules for the DATETIME statement
Syntax rules for the DATETIME statement are as follows:
- If a time value is specified, a colon (:) must precede the time value, separating it from the date value.
- A comma must separate the start and end dates.
The relative format is useful for running reports on a consistent basis because the dates defining the DATETIME range need not change each time the reports run.
For example, if a site requires weekly reports to be produced each Monday, *-7 as the start range date and * as the end range date could be defined once; otherwise, the Julian day or Gregorian day or month values must be changed each week to obtain the current data.
- If the CYCLE or PERIOD statement is used, a DATETIME control statement must be used (see the table that shows permitted values for the cycle name parameter in CYCLE, and PERIOD for additional information). The order of these statements must be
- DATETIME
- CYCLE
- PERIOD
Examples
The following examples illustrate the use of the DATETIME control statement.