AE DB Change

Administrators use the AE DB Change utility (ucybchng) to modify data that has been exported from the database by using the Transport Case. You can change selected object attributes and replace strings by using a specific script file for which the AE provides the two statements REPLACE and REPLACE_PART. Special keys are available that allow you to replace the usage of objects in a specific object type, change the connection, or the login of SQL-type Variable objects. You can also change object variables, folder names, condition values in workflows, or the attributes of RA Jobs. Doing so makes it easy to adjust data that should be used in a different AE system or client.

This page includes the following:

Overview of Required Steps

  1. Move all objects that should be adjusted to the Transport Case and unload the Transport Case by using the AE DB Unload utility. See Transporting Data
  2. Write one or several script files that include the commands that modify the relevant attributes. See below in the section Syntax of the Script File That Modifies Attributes
  3. Call the AE DB Change utility with the corresponding start parameters. See below in the section Starting the Utility

Make sure that the transport file contains all attributes that should be changed. Do so by setting the all_entities= parameter to "1" in the INI file of the AE DB Unload utility. In this case, all attributes are exported, even those that do not contain any values. For details, see the INI file Utility DB Unload

[TRANSPORT]
all_entities=1

Object Attributes That Can Be Changed

The links below guide you to topics that inform you whether a specific attribute can be changed by using this utility. If so, you can use a script file which includes commands that modify the attributes that are stored in the transport file.

Syntax of the Script File That Modifies Attributes

The Automation Engine provides the two statements REPLACE and REPLACE_PART which you can use to create a script file for the AE DB Change utility. The differences between these statements and their structures are described below.

REPLACE Object Type, Name, Attribute, Old Value, New Value

REPLACE_PART Object Type, Name, Attribute, Part of the old Value, New Value

Notes:

Example

The following example script changes the existing agent from AGENT.WIN.1 to AGENT.WIN2 in the MY.JOB Job object.

REPLACE JOBS, MY.JOB, HOST, "AGENT.WIN.1", "AGENT.WIN.2"

Using Use REPLACE and REPLACE_PART

You can either use the REPLACE, or the REPLACE_PART script element for your script replacements. The differences are described below.

REPLACE

The parameter Old Value will only be replaced by New Value if both formats are exactly the same. An exception to this rule are modifications that are made in the script of an object. This is like the Search/Replace function of common text editors. Every string that is located within a text line will be replaced.

REPLACE_PART

REPLACE_PART can be used to replace parts of Old Value. The specified New Value is then inserted instead of the old value.

Important! When you use the REPLACE command in combination with the SCRIPT attribute, you can only replace complete scripting lines. The utility does not replace parts of scripts. In this case, you would use REPLACE_PART. 

Changing the Attribute Values "Y" and "N"

The values "Y" and "N" cannot be assigned to the AE DB Change utility. You must use the number "1" instead of "Y" and "0" instead of "N".

Examples

In the job JOB.TEST.1, the path C:\Temp is replaced by D:\Temp using the object attribute WIN_CMD.

REPLACE_PART JOBS, JOB.TEST.1, WIN_CMD, "C:\Temp", "D:\Temp"

The host WIN1 is replaced by WIN2 in all Event objects. The attribute that is used for this purpose is HOST.

REPLACE EVNT, *, HOST, "WIN1", "WIN2"

The target host changes from FSU to FSB in all file transfers of the name FT* using the object attribute FT_DST_HOST.

REPLACE JOBF, FT*, FT_DST_HOST, "FSU", "FSB"

The TEST string is replaced by REAL in all scripts of objects with the name EM* using the SCRIPT object attribute, see SCRIPT.

REPLACE_PART *, EM*, SCRIPT, "TEST", "REAL"

The calendar changes from FIRM_CALENDAR_2019 to FIRM_CALENDAR_2020 in all Notification object names that start with MM*. The attribute CALENDAR is used.

REPLACE_PART CALL, MM*, CALENDAR, "2019", "2020"

In the job SAP.Job.2, the SAP target system changes from SAP1 to SAP2 using the object attribute SAP_DST_SYSTEM.

REPLACE JOBS, SAP.JOB.2, SAP_DST_SYSTEM, "SAP1", "SAP2"

The following example changes the SAP start mode parameter from 1 for Immediate to 0 for As Soon As Possible using the object attribute SAP_STARTMODE.

REPLACE JOBS, *, SAP_STARTMODE, "1", "0"

Special Keys for the Attribute Parameter

Instead of specifying an object attribute in the Attribute parameter of your script file, you can use some special keys.

Keys that replace the usage of objects in a specific object type

Keys that change the connection or the login of SQL-type Variable objects

Notes:

Key that modifies object variables

Keys that modify Rapid Automation attributes

Key that changes folder names


(JOBP only) Keys that change condition values

Starting the Utility

Start the program from the command line by using the following parameters:

UCYBCHNG[.EXE] [-B] [-IPath and name of the INI file] -1Script File-2Transport File[-3Output File][-LE]

Parameters

Example

ucybchng -b -1c:\transport\uc_change.txt -2c:\transport\uc_transport.txt -3c:\transport\uc_transport_new.txt

Processing and its results are logged in a file whose name you can specify in the INI file of the utility, see Utility DB Change.

Return Codes

The utility returns specific return codes when processing has ended, depending on the occurred situation.

See also: