Automation Engine Script Guide > Ordered by Function > Handle Objects > MODIFY_OBJECT

MODIFY_OBJECT

Script Function: Changes an existing objectAutomation Engine controlled activities and processes are structured in the form of objects. See also: Task (only Calendar, Login and Variable)

General Information


Calendar

Syntax

MODIFY_OBJECT(Object name, [Title], [Calendar keyword], [[Date format:]Date1], [[Date format:]Date2]])

Syntax

Description/Format

Object Name

The name of the Calendar object.
Format: script literal or script variable 

Title

The title of the Calendar object.
Format: script literal or script variableA placeholder for a value within a script. 

Calendar Keyword

The name of the calendar keywordThe attribute of a Calendar object that defines which days included in the calendar..
Format: script literal or script variable 

Date Format

Format guideline for the given date.

: or ;

The separator between Date Format and Date

Date1

The starting date of the calendarAn Automation Engine object type that defines a set of days based on calendar keywords.'s validity period.
Specification of a date which corresponds to the Date Format

Date2

The end date of the calendar's validity period.
Specification of a date which corresponds to the Date Format

[Date Format:]Date1
and
[Date Format:]Date2

The start and end of the calendar's validity.
Format: script literal or script variable


Return codes

"0" - The Calendar object was successfully changed.
"20216" - Object '&01' cannot be modified because it is being edited by userIn the Automation Engine, a user is an instance of a User object, and generally the user is a specific person who works with Automic products. The User object is assigned a user ID and then a set of access rights to various parts of the Automation Engine system and product suite. These access rights come in the form of Automation Engine authorizations and privileges, Decision user roles and EventBase rights and ARA web application object rights. You can manage all these centrally in the ECC user management functions. See also, Unified user management. '&03' since '&02'.
"20645" - This object does not exist.
"20670" - The end date for the calendar key is before the start date.

Comments

You can use this script function in order to change a Calendar object's title and the start and end date of a calendar keyword.Unused parameters leave existing calendar definitions unchanged.

Calendar keywords can be handled with the following script elements:

:SET_CALE - Inserts/deletes a date or time period in/from a calendar keyword.
VALID_CALE
- Checks whether or not a date is included in the calendar keyword.

Examples

This example changes the period of the calendar keyword "WORKDAYS". The calendar title remains unchanged.

:SET &RET# = MODIFY_OBJECT("FIRM.CALENDAR",,"WORKDAYS","DD.MM.YYYY:01.05.2011","DD.MM.YYYY:01.05.2012")

 


Login

Syntax

MODIFY_OBJECT(Object name, [Title], Name, Type, Login info, [Password], [Action])

Syntax

Description/Format

Object name

The name of the Login object.
Format: script literal or script variable 

Title

The title of the Login object.
Format: script literal or script variable 

Name

The name of an 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 or a backend system.
Format: script literal or script variable

Enter "*" when the loginAn Automation Engine object type that stores account credentials used by agents on target systems. entry should apply for all agents or systems.

The name of backend systems is defined in your user's Login object.

Type

The hostComputer, target system. type or applicationAn application is a software which helps a user to fulfill specific tasks. In the context of ARA see also: Application entity..
Format: script literal or script variable

Allowed values:

"BS2000" = Host of type BS2000/OSD
"GCOS8" = Host of type Bull GCOS 8
"JMX" = Login entry for J2EE/JMX
"MAIL" = Login entry for the mail interface
"MPE" = Host of type MPE
"MVS" = Host of type z/OS, MVS, z/OS
"OA" = Login entry for Oracle Applications
"OS400" = Host of type OS/400
"PS" = Login entry for PeopleTools
"R3" = Login entry for SAP
"SIEBEL" = Login entry for Siebel
"SQL" = Login entry for databases
"UNIX" = Host of type Unix, Linux, z/Linux
"VMS" = Host of type OpenVMS
"WINDOWS" = Host of type Windows

In addition to the listed agent platforms, you can also specify all types that the administrator has defined in the variableIt stores or retrieves values dynamically at runtime. An individual Automation Engine object type. UC_LOGIN_TYPES. 

Login Info

The login information that should be used for logging on.
Format: script literal or script variable 

The format for the login info is platform and application specific. For details, see the chapter Login object.

Password

The passwordA secret combination of characters for a Automation Engine user. for the platform of the application.
Format: script literal or script variable 

There is no plausibility check when the script function MODIFY_OBJECT is executed.

Action

The actionActions are predefined building blocks for recurring activities. They are commonly used for managing third party systems or in deployment scenarios. that should be processed.

Allowed values: "ADD" (default value), "DEL"

"ADD" = Adds the specified user entry at the end of the listShows entities in a grid view or overwrites an existing one with identical data for host, host type and login info.

"DEL" = Removes the specified user entry from the list. There is no error code if the user entry is not available in the list. No password is necessary for deleting an entry.


Return codes

"0" - The Login object was successfully changed.
"20645" - This object does not exist.

Comments

You can use this script function in order to change the title and login entries of Login objects.

The script function MODIFY_OBJECT for the Login object mainly automates the administration of users (such as changing Automation EngineThis component drives an Automation Engine system and consists of different types of server processes. passwords externally).

An existing entry is changed when you specify an agent including its type which are already available in the Login object. The scripting line has no effect when the agent and the type do not comply with each other.

Examples

The first example sets the login data for the user "Smith" to the host "UNIX01" in the Login object "LOGIN.SMITH", and the password to "uc4". When the Login object already includes this entry, only the password will be changed to "uc4".

:SET &RET# = MODIFY_OBJECT("LOGIN.SMITH",,"UNIX01","UNIX","smith","uc4","ADD")

The following example deletes the login data for the user "smith" in clientA closed environment within an Automation Engine system where you can create and run objects. A client name consists of a 4-digit number that must be indicated when a user logs on to the Automation Engine system. Users and their rights are also defined in clients. A particular Automation Engine object type. "012" of the SAP system "SAP01" in the Login object "LOGIN.SMITH".

:SET &RET# = MODIFY_OBJECT("LOGIN.SMITH",,"SAP01","R3","012,smith","","DEL")

 


Variable

Syntax

MODIFY_OBJECT(Object name, [Title], [Error Handling], [Data Type])

Syntax

Description/Format

Object Name

The name of the Variable object.
Format: script literal or script variable 

Title

The title of the Variable object.
Format: script literal or script variable 

Error Handling

The handling when the variable does not include a value at runtimeThe duration of a task's execution. It refers to the period between a task's start and end. It does not include its activation period (see also: activation and start)..

Allowed values: "E" or "I"

"E" = An error message is output
"I" = The variable is initialized according to its variable type

Data Type

The variable type.

Allowed values: "String" (or "C"), "Number" (or "N"), "Timestamp" (or "T"), "Time" or "Date"

"String", "C"= Text
"Number", "N" = Number
"Timestamp", "T" = Timestamp
"Time" = Time
"Date" = Date

For the Variable object XML only the specification of the data type "String", "C" is allowed.


Return codes

"0" - The Variable object was successfully changed.
"20640" - An invalid value was specified for the data type.
"20645" - This object does not exist.
"20651" - The data type cannot be changed as the variable contains values.

Comments

You can use this script function in order to change the title, the error handling and the data type of a static Variable object.

Keep in mind that you can only change the data type when the variable does not include any values.

Dynamic Variable objects cannot be changed with this script function.

Examples

The following example changes a variable so that the retrieved number of files can be stored.

:SET &RET# = MODIFY_OBJECT("OUTPUT.WEBHELP.VARA","Number of Help files with frames",,"F")

In this example the error number after the execution of a Variable object XML is being read and printed into a reportA report provides more detailed information about a task's execution or a component.:

:SET &HND# = MODIFY_OBJECT(VARA.XML.NEW.1, "TEST TITLE", E, C)
:SET &ERRNR# = SYS_LAST_ERR_NR()
:PRINT ">&ERRNR#<"
:IF &ERRNR# <> "0"
: SET &ERRINS# = SYS_LAST_ERR_INS()
: SET &MESSAGE# = GET_MSG_TXT (&ERRNR# ,&ERRINS#)
: PRINT &MESSAGE#
:ENDIF

 

 

See also:

Script element Description

:ON_ERROR

Determines the reaction to certain errors and messages of script elements

CREATE_OBJECT

Creates an object (Calendar, Login and Variable only)

REMOVE_OBJECT Deletes an existing object
MOVE_OBJECT Moves an object to a folderTop level entities such as Environment, Deployment Target, Activity, … are stored in folders. The permissions a user has on an entity depend on the permissions that are set on the folder for the entities.
ACTIVATE_UC_OBJECT Activates an object

Script Elements - Handle Objects
Script Elements - Error Handling and Messages

About Scripts
Script Element - Alphabetical Listing

Script Element - Ordered by Function

 


Automic Documentation - Tutorials - Automic Blog - Resources - Training & Services - Automic YouTube Channel - Download Center - Support

Copyright © 2016 Automic Software GmbH