FORECAST_OBJECT

Use the FORECAST_OBJECT script function to generate a forecast for an object. You can generate a forecast of the expected runtime of any executable object. This script function generates the same type of object forecast as you can manually generate through the context menu in the Automic Web Interface.

Tip: Use the FORECAST_TASK script function to create forecasts of running tasks.

Syntax

FORECAST_OBJECT (Object Name, Title, [Date Format:]Date, [Time Format;]Start Time [, Registrations] [, Group_ERT])

Parameters

Parameter Description Format Allowed Values Default Value
Object Name Defines the name of the object. Script literal or script variable n.a. n.a.
Title

Defines the name of the forecast in uppercase letters without blanks.

Important: Use a name that is not already in use.

Script literal or script variable n.a. n.a.
Date Format (Optional) Date format for the start date for the forecast. For more information about date formats, see Date, Time and Period Formats in Scripts. YYMMDD or YYYYMMDD n.a. n.a.
Date Defines the logical start date in YYMMDD or YYYYMMDD format. Script literal or script variable n.a. n.a.
Time Format (Optional) Time format for the start time for the forecast. For more information about time formats, see Date, Time and Period Formats in Scripts. HHMMSS n.a. n.a.
Start Time Defines the start time of the task in HHMMSS format. Script literal or script variable n.a. n.a.
Registrations (Optional) Considers or ignores registrations for groups of tasks. Script literal or script variable
  • Y
    Considers registrations.
  • N
    Ignores registrations.
N
Group_ERT

(Optional) Expected runtime (ERT) for groups.

Note: This parameter only applies when Registrations is set to N.

Number
  • 0
    Uses ERT of the group.
  • 1 to 7199
    Fixed value in seconds.
0

Important Considerations

Key considerations include:

  • This script function writes all open transactions of the script to the AE database. For more information, see Script Processing.

  • If you specify a date or time format, include a separator (: or ;) between the date format and date, and time format and time.

Return Codes

The FORECAST_OBJECT function returns a 16-digit number with leading zeros. The function returns the value 0000000000000000 after a successful forecast creation.

Examples

The following script creates a forecast for a file transfer, and specifies date and time formats.

: SET &RET# = FORECAST_OBJECT ("C70.WINDOWS""FORECAST_FT_C70.WINDOWS"

"MM/DD/YY:11/03/03""HH:MM;12:30")

The following example creates a forecast for a Job running in a group. Instead of using the ERT of this group, the forecast uses a fixed value of 60 seconds.

: SET &RET# = FORECAST_OBJECT ("T91.REM.03""FORECAST_T91.REM.03"

"MM/DD/YY:11/07/03""200000""Y" ,60)

See also: