AE provides the REPLACE and REPLACE_PART statements to create scripting files for the AE DB ChangeDienstprogramm zum Ändern von Transportkoffer-Exporten. utility.
REPLACE Object Type, Name, Attribute, Old Value, New Value
REPLACE_PART Object Type, Name, Attribute, Part of the old Value, New Value
Syntax | Description/Format |
---|---|
Object type |
The short name of the object type. |
Name |
The name of the object that should be modified. Automic recommends specifying the whole path in folders (such as \TEST\Workflow"Ermöglicht das Hinzufügen, Anordnen, Verknüpfen, Definition von Eigenschaften und Entfernen von Aufgaben eines Workflows. Ein eigener Objekttyp in der Automation Engine. [Früher ""AblaufPlan"" und ""JobPlan"" gennant.]"). Note that it is not allowed to indicate a path for objects. Object names are unique within a client. |
Attribute |
The name of the attribute that should be modified. For a list of all object attributes including their allowed values, refer to the User Guide. For Rapid Automation attributes, see Changing Rapid Automation Job Attributes below. |
Old Value |
The attribute value that should be changed. Note that uppercase and lowercase letters used in the value are distinguished. No distinction is made if they are replaced within a script. |
New Value |
The attribute value that should replace the old value. |
The script file can contain comment lines. These lines must start with a semicolon.
You cannot assign abbreviations to AE DB Change. Always use complete attribute names (such as "INT_ACCOUNT" instead of " INT_ACC").
Please note that you cannot change Pre- or Postconditions (or their values) of tasks inside of a Workflow object with AE DB Change.
Using REPLACE vs. REPLACE_PART
Use either the REPLACE or REPLACE_PART script elements for your script replacements. The differences are described below.
REPLACE
Old Value is only replaced by New Value if Old Value exactly equals the old value. An exception to this rule are modifications that are made in an object's script. This is similar to the Search/Replace function of common text editors. Every string that is located within a text line is replaced.
Apostrophes can be used instead of quotation marks in order to specify Old Value and New Value. This is important when you replace strings that contain quotation marks.
REACE_PART
REPLACE_PART can be used to replace parts of Old Value. The specified New Value is then inserted instead of the old value.
Apostrophes can be used instead of quotation marks to specify Old Value and New Value. This is important when replacing strings containing quotation marks.
When you use the command REPLACE in combination with the attribute SCRIPT, you can only replace complete scripting lines. The utility will not replace parts of scripts. REPLACE_PART can be used for this purpose.
Changing Attribute Values for "Y" and "N"
An exception applies for attributes permitting the values "Y" and "N". These two letters cannot be assigned to the utility AE DB Change. In this case Automic recommends using the number "1" instead of "Y" and "0" instead of "N".
Changing Object Variables
The utility can also be used to modify object variables. For this purpose, you enter the term "VALUE" followed by a colon and the name of the object variable with a leading "&" character in the parameter Attribute.
Changing Rapid Automation Job Attributes
You can also change the specific attributes of all Rapid Automation jobs using the utility AE DB Change. In this case, you use one of the following:
To change the value of: | Enter the attribute name as: |
---|---|
Job attributes | "CVALUE" followed by a colon and the name of the RA attribute of the Attribute. |
Workflow task's when they have been overridden. |
"JPCVALUE" followed by a colon and the name of the RA attribute for the Attribute. |
If you change attributes for all Rapid Automation jobs or workflows by specifying * as the Name for the change, the AE DB Change utility will make the changes you specify for all jobs or workflows that meet the requirements you specify; even if they belong to different agents or agent types.
Many Rapid Automation agents include a list of attributes in the agent's documentation. Rapid Automation job attributes are not documented in the Automation EngineDiese Komponente steuert ein Automation Engine-System. Besteht aus verschiedenen Serverprozessen. documentation, because they each agent is versioned separately and released on a different schedule than the Automation Engine.
Another way to retrieve the Rapid Automation attribute names including their values is to run the following command in the AE database (replace the JOBNAME by the job's actual object name):
select OCV_VName,ocv_value from OCV,oh where OCV_OH_Idnr=OH_Idnr and oh_name='JOBNAME'
Changing Object Assignments
The parameters OBJECT_USE and OBJECT_USE_ATTR of the AE DB Change utility can replace object uses.
OBJECT_USE_ATTR replaces the same fields as OBJECT_USE, with the exception of OT table columns. You would choose to use OBJECT_USE_ATTR if you had an object that was assigned as an attribute and a script, because OBJECT_USE would cause it to be renamed twice.
You can replace used objects in the following object types: CALL, JOBS, EVNT, JOBP, JOBF, JSCH, JOBG, SCRI, JOBI, JOBQ, DOCU, VARA, SYNC, FILTER, CALE, LOGIN, CPIT.
The old value is the name of the object that is currently used and the new value is the name of the object that should be used instead.
To change the connection and the login of SQL type VariableSpeichert oder ermittelt Werte dynamisch zur Laufzeit. Auch ein eigener Objekttyp in der Automation Engine. objects, you can use the keywords "SQL_CONNECTION" and "SQL_LOGIN" for Attribute . You can either change the complete value (REPLACE) or only part of the value (REPLACE_PART).
If a scripting file changes the same attribute several times, you must always use the original value as the "Old Value". When an attributes is modified, the system reads the lines always from the source transport file and not from the output file.
Use the attribute PSCRIPT in order to change the !Process of events.
Changing Folder Names
This utility can also change the names and paths of folders. For this purpose, you would use REPLACE_PART in combination with the attribute FOLDER_NAME and for the name, you would specify the complete path of the folder that should be changed. For the old and new value, you can either specify an individual folder name or part of the path.
As of version 9, you can use folder titles. In the transport file, it will be displayed in curly brackets within the path (for example: \OBJECTS{TITLE}\TEST{}\
The curly brackets will be empty if you do not use a title.
Note that you cannot change folder titles by using the utility AE DB Change.
When you change a folder within the path by replacing one or several folders, the titles will still be used at the old folder level.
For example:
Old path: \OBJECTS{TITLE1}\TEST{}\JOBS{TITLE2}
ScriptEigener Objekttyp in der Automation Engine command: REPLACE_PART FOLD, \OBJECTS\TEST\JOBS, FOLDER_NAME, "OBJECTS", "ARCHIV\OBJ"
New path: \ARCHIV{TITLE1}\OBJ{}\TEST{TITLE2}\JOBS{}
In the new path, the titles are still used at the old folder level. The folder "TEST" now has a title (TITLE") although it had no title in the beginning.
Note that in the script file, you must specify the complete path (Name) without curly brackets. Otherwise, your modifications will be ignored.
Examples
In the job SAP.Job.2, the SAP target system changes from SAP1 to SAP2.
REPLACE JOBS, SAP.JOB.2, SAP_DST_SYSTEM, "SAP1", "SAP2"
The target host changes from FSU to FSB in all file transfers of the name FT*.
REPLACE JOBF, FT*, FT_DST_HOST, "FSU", "FSB"
The string TEST is replaced by REAL in all scripts of objects with the name EM*.
REPLACE_PART *, EM*, SCRIPT, "TEST", "REAL"
The modifiable attribute UC100T is replaced by UC100E in all objects.
REPLACE *, *, *, "UC100T", "UC100E"
The value of the workflow's object variable "HOST#" changes from "unix01" to "unix02".
REPLACE JOBP, MM.DAY, VALUE:HOST#, "unix01", "unix02".
In the job JOB.TEST.1, C:\Temp is replaced by D:\Temp.
REPLACE_PART JOBS, JOB.TEST.1, WIN_CMD, "C:\Temp", "D:\Temp"
The calendar changes from FIRM_CALENDAR_2016 to FIRM_CALENDAR_2017 in all Notification object names that start with MM*,.
REPLACE_PART CALL, MM*, CALENDAR, "2016", "2017"
The name of the folder SCHEDULE changes to SCHEDULE_WEEKDAYS.
REPLACE_PART FOLD, \MM\SCHEDULE, FOLDER_NAME, "SCHEDULE", "SCHEDULE_WEEKDAYS"
The following example switches the folder SCHEDULE to the path TEST\JSCH.
REPLACE_PART FOLD, \MAWI\SCHEDULE, FOLDER_NAME, "SCHEDULE", "TEST\JSCH"
The specific parameter "OBJECT_USE" of the utility AE DB Change replaces used objects. The following example replaces the SyncSynchronisiert aktivierbare Objekte auf der Grundlage definierter Zustände und Aktionen. Auch ein eigener Objekttyp in der Automation Engine. object "SYNC1" with "SYNC2" in all workflows that use this Sync object.
REPLACE_PART JOBP, *, OBJECT_USE, "SYNC1", "SYNC2"
The specific parameter "OBJECT_USE_ATTR" of the utility AE DB Change replaces used objects with the exception of OT table columns. The following example replaces "TSM." in object assignments with "TSM.V1.".
REPLACE_PART *, TSM.*, OBJECT_USE_ATTR, 'TSM.', 'TSM.V1.'
The following example replaces the connection and login data of an SQL Variable object.
REPLACE VARA, VARA.SQL.TEST, SQL_CONNECTION, "CONNECTION.OLD", "CONNECTION.NEW"
REPLACE VARA, VARA.SQL.TEST, SQL_LOGIN, "LOGIN.OLD", "LOGIN.NEW"
The following examples change the value of the JMS queue from "test.tibco.queue" to "prod.tibco.queue". The first line overrides it in JMS jobs. The second line overrides it when JMS jobs are included as tasks in workflows. This syntax works for jobs of any Rapid Automation agent, you just switch out the Attribute name after "CVALUE:" and/or "JPCVALUE:" and specify appropriate Old Value and New Value.
REPLACE JOBS, *, CVALUE:queueName ,"test.tibco.queue","prod.tibco.queue"
REPLACE JOBP, *, JPCVALUE:queueName ,"test.tibco.queue","prod.tibco.queue"
The following example changes the SAP start mode parameter from 1 for Immediate to 0 for As Soon As Possible.
REPLACE JOBS,*,SAP_STARTMODE,"1","0"
See also:
General Procedure - Transport Case
Modifying Exported Data
Structure of the INI file, AE DB Change