Script Function: Retrieves details from the statistical record of an executable objectAutomation Engine controlled activities and processes are structured in the form of objects. See also: Task.
GET_STATISTIC_DETAIL([RunID], Detail, [Object name])
Syntax |
Description/Format |
---|---|
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 |
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 functionPre-defined run book template in the Automation Engine. One single step only, e.g. Start Windows Service, Copy file,… 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:
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:
These values may also be values that were retrieved from the read statistical details (e.g. return codeThe value that represents the result of tasks and script functions. 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 |
CANCEL_FLAG |
Cancel taskAn executable object that is running. Tasks are also referred to as activities.. 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 agentA program that enables the de-centralized execution of processes (such as deployments) on target systems (computers or business solutions) or a service that provides connectivity to a target system (such as for databases or middleware). An agent is also an object type in the Automation Engine. [Formerly called "Executor."] See also: host in file transfers and jobs. |
DST_HOST_TYPE |
The hostComputer, target system. type of the destination agent in file transfers. Return codes: |
DST_LOGIN_INFO |
The complete loginAn Automation Engine object type that stores account credentials used by agents on target systems. information of the file transferTransfers files from one computer to another. A particular Automation Engine object type (FileTransfer object).'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 restartA restart refers to the repetition of an object's execution. This action differs from a new start in some parts. point that was last passed. |
LDATE |
The logical dateThe logical date is used as a comparison date for checking Calendar conditions. in the format "YYYY-MM-DD HH:MM:SS". |
MOD_COUNT |
The number of object modifications. |
NAME |
The name of the object. |
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 taskThere are various ways of activating objects. The originator of the activation is referred to as the superordinate task (parent). (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 estart 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 statusThis represents the condition of a task (such as active, blocked, generating). (system return code) of the execution (such as "1850"). |
TRANSFERRED_BYTE_COUNT |
The number of transferred bytes. |
USER_ID |
|
USER_TIME |
Used user time. |
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)
The second 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)
See also:
Script Elements - Reading or Modifying Objects
About Scripts
Script Elements - Alphabetical Listing
Script Elements - Ordered by Function
Automic Documentation - Tutorials - Automic Blog - Resources - Training & Services - Automic YouTube Channel - Download Center - Support |
Copyright © 2016 Automic Software GmbH |