Script Function: Changes an existing object (only Calendar, LoginDonnées de connexion pour les systèmes cible. Egalement un type d'objet distinct dans l'Automation Engine. and VariableEnregistre ou fournit les valeurs dynamiques de l'exécution. Egalement un type d'objet distinct dans Automation Engine.)
General Information
Use the script statement :ON_ERROR to define the reaction to errors that might occur. You can also analyze error messages with the script functions that deal with the handling of errors (see links on bottom of this page). By default, script processing continues but it can also be stopped.
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. |
Title |
The title of the Calendar object. |
Calendar Keyword |
The name of the calendar keyword. |
Date Format |
Format guideline for the given date. |
: or ; |
The separator between Date Format and Date |
Date1 |
The starting date of the calendar's validity period. |
Date2 |
The end date of the calendar's validity period. |
[Date Format:]Date1 |
The start and end of the calendar's validity. |
Return codes |
---|
"0" - The Calendar object was successfully changed. |
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")
Syntax
MODIFY_OBJECT(Object name, [Title], Name, Type, Login info, [Password], [Action])
Syntax |
Description/Format |
---|---|
Object name |
The name of the Login object. |
Title |
The title of the Login object. |
Name |
The name of an agent"Programme permettant l'exécution de Traitements sur des systèmes cible comme un ordinateur ou des solutions d'entreprise. Egalement un type d'objet distinct dans l'Automation Engine. [Anciennement appelé ""Exécuteur de tâches"".]" or a backend system. Enter "*" when the login entry should apply for all agents or systems. The name of backend systems is defined in your user's Login object. |
Type |
The host type or applicationUne application est un logiciel qui aide l'utilisateur à réaliser des tâches spécifiques. Dans un environnement ARA, voir aussi : Entité d'application.
. Allowed values: "BS2000" = Host of type BS2000/OSD In addition to the listed agent platforms, you can also specify all types that the administrator has defined in the variable UC_LOGIN_TYPES. |
Login Info |
The login information that should be used for logging on. The format for the login info is platform and application specific. For details, see the chapter Login object. |
Password |
The password for the platform of the application. There is no plausibility check when the script function MODIFY_OBJECT is executed. |
Action |
The action"Voir ""Action en cas de non-respect (AWI Service Orchestrator)""." that should be processed. Allowed values: "ADD" (default value), "DEL" "ADD" = Adds the specified user entry at the end of the list 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. |
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 EngineCe composant commande un système Automation Engine. Il se compose de plusieurs processus serveur. 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 clientEnvironnement indépendant pour la création et l'exécution d'objets dans un système AE. Le nom d'un client est un nombre de quatre chiffres à saisir lors de la connexion d'un utilisateur au système AE. Les utilisateurs et leurs droits y sont aussi définis.Egalement un type d'objet distinct dans l'Automation Engine. "012" of the SAP system "SAP01" in the Login object "LOGIN.SMITH".
:SET &RET# = MODIFY_OBJECT("LOGIN.SMITH",,"SAP01","R3","012,smith","","DEL")
Syntax
MODIFY_OBJECT(Object name, [Title], [Error Handling], [Data Type])
Syntax |
Description/Format |
---|---|
Object Name |
The name of the Variable object. |
Title |
The title of the Variable object. |
Error Handling |
The handling when the variable does not include a value at runtime. Allowed values: "E" or "I" "E" = An error message is output |
Data Type |
The variable type. Allowed values: "C" = Text For the Variable object XML only the specification of the data type "C" is allowed. |
Return codes |
---|
"0" - The Variable object was successfully changed. |
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
In this example the error number after the execution of a Variable object XML is being read and printed into a report:
: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 |
---|---|
Determines the reaction to certain errors and messages of script elements |
|
Creates an object (Calendar, Login and Variable only) |
|
REMOVE_OBJECT | Deletes an existing object |
MOVE_OBJECT | Moves an object to a folder |
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