GET_STATISTIC_DETAIL
Script Function: Retrieves details from the statistical record of an executable object.
Syntax
GET_STATISTIC_DETAIL ([RUN#] , Detail [, Object name])
Syntax |
Description/Format |
---|---|
Run# |
10-digit run number (RunID) of the execution. |
Detail |
Information to be retrieved from the statistical record. Refer to the "Comments" section of this document which provides detailed information on all the allowed values. |
Object name |
Name of the object whose statistical record should be read. |
Return code |
---|
Detail from a statistical record |
Comments
By default, numbers have a 16-digit format. Floating-point numbers (data type float) also include 16 decimal places. Zeros are inserted in places that are not used. You can use the script function FORMAT in order to remove leading or final zeros.
Note that users require the authorization "S" for the relevant object in order to execute this script function.
This script function can be used for the following parameter constellations:
- RUN#, detail or RUN#, detail, object name
The statistical record can clearly be identified via its RUN#. - Detail, object name
The last statistical record of the specified object is read. - Detail
The object's current statistical record from which the script function is called serves the identification of details. Hence, particular values are not yet available (e.g. the runtime).
Be careful when using this script function. The default values shown below are returned for values that are not available at the time of script execution:
- For strings: " "
- For numbers: 0
- For date and time stamps: 0000-00-00 00:00:00
These values may also be values that were retrieved from the read statistical details (e.g. return code 0).
This script function returns an empty string if no statistical record could be found. The script does not abort. You can use the script element :ON_ERROR to remedy this error.
The second parameter requires the specification of the statistical detail to be read. The following table lists the values that may be retrieved:
Detail |
Description |
---|---|
ACCOUNT |
Internal account. |
ACTIVATION_TIME |
Activation time in the format "YYYY-MM-DD HH:MM:SS". |
ARCHIVE_KEY_1 |
Archive key 1 |
ARCHIVE_KEY_2 |
Archive key 2 |
ALIAS | The Alias of the executable object. |
CANCEL_FLAG |
Cancel task. Return codes: |
CHECK_COUNT |
Number of checks made in the Event object. |
COMPRESSION_RATE |
Compression level. Return codes: |
CPU_TIME |
Used CPU time. |
DST_CODE_TABLE |
The name of the destination CodeTable in file transfers. |
DST_FILE_ATTRIBUTES |
The file attributes for the destination file of file transfers. |
DST_FILE_NAME |
The name of the destination file in file transfers. |
DST_HOST |
The name of the destination agent in file transfers and jobs. |
DST_HOST_TYPE |
The host type of the destination agent in file transfers. Return codes: |
DST_LOGIN_INFO |
The complete login information of the file transfer's destination Login object. |
DST_LOGIN_NAME |
The name of the destination Login object. |
DURATION |
The runtime in seconds. |
END_TIME |
The object's end time in the format "YYYY-MM-DD HH:MM:SS". |
EVENTID | The first RunID of FileSystem and Console events. |
FILE_SIZE |
The number of bytes used by the transferred file. |
IO_COUNT |
The number of I/Os. |
KERNEL_TIME |
The used Kernel time. |
LAST_ERR_INS |
Message insertion. |
LAST_ERR_NR |
The number of the last error that occurred. |
LAST_RESTART_POINT |
The restart point that was last passed. |
LDATE |
The logical date in the format "YYYY-MM-DD HH:MM:SS". |
MOD_COUNT |
The number of object modifications. |
NAME |
The name of the object. |
OBJECT_TYPE |
The object type. |
OCCURENCE_COUNT |
The number of occurred events (in Event objects). |
PARENT_ACT |
The RUN# of the superordinate task (Activator). |
PARENT_PRC |
The RUN# of the superordinate task (Processor). |
POSTSCRIPT_START_TIME |
The start time of the Post Process in the format "YYYY-MM-DD HH:MM:SS". |
PROCESS_ID |
TSN / Process ID. |
RECORDS |
Text file transfers: Number of transferred lines/records. |
REFERENCE_NR |
The reference RUN# in a restart. |
RESTART |
Restart Return codes: |
RESTART_POINT |
The restart point for task start. |
RETURN_CODE |
The return code. |
RUNID | The RunID of the selected statistical record. |
SRC_CODE_TABLE |
The name of the source CodeTable in file transfers. |
SRC_FILE_ATTRIBUTES |
The file attributes for the source file in file transfers. |
SRC_FILE_NAME |
The name of the source file in file transfers. |
SRC_HOST |
The name of the source agent in file transfers. |
SRC_HOST_TYPE |
The host type of the source agent in file transfers. Return codes: |
SRC_LOGIN_INFO |
The complete login information from the file transfer's source Login object. |
SRC_LOGIN_NAME |
The name of the source Login object. |
START_TIME |
The object's start time in the format "YYYY-MM-DD HH:MM:SS". |
STATUS |
The status (system return code) of the execution (such as "1850"). |
TRANSFERRED_BYTE_COUNT |
The number of transferred bytes. |
USER_ID |
The name of the user in the format "NAME/DEPARTMENT". |
USER_TIME |
Used user time. |
Examples
The following line is used in a FileTransfer object. It reads the name of the file that should be transferred from the current execution.
:SET &SOURCE_FILE# = GET_STATISTIC_DETAIL(,SRC_FILE_NAME)
This example reads the start time of the superordinate task.
:SET &NAME# = SYS_ACT_PARENT_NAME()
:SET &START# = GET_STATISTIC_DETAIL(,START_TIME, &NAME#)
The script function retrieves the activation time of the object MM.DAY:
:SET &RUNNR# = GET_UC_OBJECT_NR("MM.DAY")
:SET &ACTIVATION# = GET_STATISTIC_DETAIL(&RUNNR#, ACTIVATION_TIME)
This example reads and prints the alias of the executable object.
:SET &ALIAS# = GET_STATISTIC_DETAIL(&RUNID#,ALIAS)
:PRINT &ALIAS#
See also:
Script Elements - Reading or Modifying Objects
About Scripts
Script Elements - Alphabetical Listing
Script Elements - Ordered by Function