Release 10.1A: OpenEdge Getting Started:
Installation and Configuration

> ## Using the mergeprop utility

> This section provides the syntax and instructions to use the `mergeprop` utility from a command line.

> ##### Command syntax

> The following table presents the mergeprop syntax:

> Operating system | Syntax1
> --- | ---
> UNIX Windows |
>     mergeprop -type file_type
>                [-action operation_type [group_name]]
>                [-target target_file]
>                [-delta delta_file]
>                [-validate]
>                [-nobackup]
>                [-silent]
>                [-recurse]

> 1Command switches can be defined in any order following the mergeprop command. 1Reference Table 10–2 for the details about valid values for argument variables.

> ##### Command switches and arguments

> Table 10–2 summarizes the syntax elements used with the `mergeprop` command. Refer to the preceeding "Mergeprop utility overview" section for additional descriptive information.

> Table 10–2: Command line input to the mergeprop command
> Switch1 | Arguments | Notes
> --- | --- | ---
>     -type
>     (required)
>     ubroker
>     database
>     tools
>     plugin
>     none
> | Each argument (other than `none`) implies a specific target file in the `properties` directory. See the "File type" section.
>     -action
>     update (default)
>     create
>     delete
>     list group_name
>     listall group_name
> | If no action is specified, `update` is assumed by default. The `list` and `listall` actions require an additional argument, the name of the property group to be displayed (for example, `ubroker.AS.asbroker1`). Do not include the square brackets ([]) that enclose the group name in the ubroker.properties file. On `update` and `create` actions, groups listed with no properties in the delta file are ignored.
>     -target
>     (optional)
> | Path to the property file to be modified. | If you are updating a property file that is in the `$DLC``/properties` subdirectory, you can omit this option. Only use this option when the property file you plan to update exists in a location other than the `$DLC/properties/` subdirectory.
>     -delta
>     Path to the delta
>     file containing
>     changes to be made
> | File containing create, update, or delete changes.
>     -validate
> | None. | Performs all processing without actually making changes to the target file. This option lets you test for errors.
>     -nobackup
> | None. | Does not create a backup to the target file before making changes. Unless you invoke this option, mergeprop saves a copy of the original target file in the same directory. The backup copy has a system- generated unique string appended to the name (for example, `ubroker.properties (31420040644533)`.
>     -silent
> | None. | Suppresses all messages.
>     -recurse
> | None. | Lists or deletes all groups, server groups, and configurations associated with the specified database. The Recurse option is only valid when the file type is “database” and the action is “list all” or “delete.”

> 1Command switches can occur in any order following the mergeprop command.

> ##### Target file

> The target file is the existing property file that you are operating on. You can add, delete, modify or list properties in the target file. The mergeprop program automatically creates a backup of the original target file, unless you instruct it not to do so. You can also list existing properties without making any changes.

> Note: If the -`type` equals `remove`.`properties` file (`-type ubroker`), then the default location is `$DLC/properties/ubroker.properties`. If you want to override this default setting, you should use the `-target` option.

> You can explicitly specify a target file, but it is not necessary to do so if you are operating on one of the standard property files listed in Table 10–3. The file type that you provide as input implies a specific property file, which the program targets by default if no file is specified. These standard property files are located in the `OpenEdge-Install-Directory``\properties` directory.

> Table 10–3: Property files managed by the mergeprop utility
> Property file | Components configured | Corresponding file type
> --- | --- | ---
> `ubroker.properties` | Unified Broker products, including all products managed through the Progress Explorer tool with the exception the database products. | ubroker
> `conmgr.properties` | Database startup parameters. | database
> `JavaTools.properties` | Client-side tool configuration, for example the Progress Explorer and command line tools. | tools
> `AdminServerPlugins.properties` | Plugin products loaded by the AdminServer. | plugins

> If explicitly specified, the target file is expressed as an argument to the `-target` command switch.

> ##### Delta file

> To use the utility to make changes, you must list the affected groups and properties in a delta file. The delta file must specify at least one property group; it can also specify one or more properties and associated values. The content of the delta file must conform to the syntax rules for property files, as explained in the "Logical structure and syntax of property files" section.

> Note: When simply listing (not changing) properties, you do not specify a delta file.

> The delta file is expressed as an argument to the `-delta` command switch.

> ##### File type

> There are five distinct property file types:

> - Ubroker

> - Database

> - Tools

> - Plugin

> - None

> As indicated in Table 10–3, one standard property file of each type is found in the `OpenEdge-Install-Directory``\properties` directory.

> Specifying the file type enables the mergeprop utility to process delta and target files appropriately. It also makes it unnecessary to explicitly identify the target file, unless you are operating on a copy or test file other than the standard file in the `properties` directory. The program can recognize “none” as a valid type and perform default processing, but you should provide a specific type as input.

> The file type is expressed as an argument to the `-type` command switch.

> ##### Action switch argument values

> The `mergeprop` utility operates on the target file, based on action you provide as input, in one of the following ways:

> - Update — Creates any new property groups and modifies any existing groups found in the delta file. Properties in the target file are updated to match those in the delta file. This operation is performed by default if you do not explicitly specify an action.

> - Create — Creates new property groups listed in the delta file, with properties as specified in the delta file. (The delta file must contain only new groups; inclusion of a group that already exists in the target file causes an error and cancels the operation.)

> - Delete — Removes from the target file any property groups listed in the delta file. The entire groups are deleted; individual properties are not processed. No exception occurs if the delta file contains groups that do not exist in the target file; such groups are simply ignored.

> - List — Displays (to `stdout`) all properties and values defined specifically for a given group. Inherited properties are not displayed.

> - List all — Displays (to `stdout`) all properties and values defined for a given group, including inherited properties. (This action applies only to the database.)

> In this context, group refers to a group as listed in the `ubroker.properties` file. For example, [UBroker.AS.asbroker1]. (Note that the brackets are not part of the command.) For more information about groups, see the "Logical structure and syntax of property files" section.

> Note: The List and List all actions are useful for creating a delta file. You can redirect output to a file and use the result as a template for modifying existing instances or creating new ones.

> The following sections provide several examples to demonstrate how you can perform various modifications using the mergeprop utility.

> The following example has two parts. The first code fragment shows the contents of the delta file in which a new AppServer Broker instance, `addasbroker2`, is defined. The contents of this delta file is based on minor changes made to the sample default broker `asbroker1`, as shown:

>     $ cat addasbroker2
>     [UBroker.AS.asbroker2]
>     appserviceNameList=asbroker2
>     brokerLogFile=@{WorkPath}\asbroker2.broker.log
>     portNumber=3092
>     uuid=932.99.999.XX:lee77e:cf3bbe3d33:-8000

> The command in the following example adds the new asbroker2 to the standard, OpenEdge-supplied `ubroker.properties` file.

>     $ mergeprop -type ubroker -action update -delta addasbroker2

> This same command structure can be used to update a group.

> Note: On an add action, you are only required to specify those properties whose values you intend to override. Default values are applied in all other circumstances.

> The second example demonstrates how to add and delete property specified as an “environment” property to the asbroker2 previously created. It is also defined in two parts. The following code fragment shows the environment property is being added to the asbroker2 definition in the ubroker.properties file:

>     $ cat asbroker2prop
>     [UBroker.AS.asbroker2]
>     emvironment=asbroker2
>     [Environment.asbroker2]
>     MYENV=hello

>     mergeprop -type ubroker -action add -delta asbroker2prop

> It also is helpful to know how to perform a deletion. In reviewing the third example, keep in mind that you can only perform group-level deletions; you cannot delete a single property within a group. The following example shows how to delete the instance of asbroker2:

>     $ mergeprop -type ubroker -action delete ubroker.AS.asbroker2

> The fourth example lists the properties defined specifically for the `UBroker.AS.asbroker1` group in `ubroker.properties`, omitting inherited properties, as follows:

>     mergeprop -type ubroker -action list UBroker.AS.asbroker1

> The fifth example lists all properties of the `UBroker.AS.asbroker1` group, including inherited properties, as shown:

>     mergeprop -type ubroker -action listall UBroker.AS.asbroker1

> The sixth example lists all properties, including inherited properties, of the `FMCONFIGCLI.OSFI` group in the file `installation-path\%DLC%\properties/JavaTools.properties,` as shown:

>     $ mergeprop -type tools -action listall FMCONFIGCLI.OSFI

> As shown in the seventh example, it is helpful to know how to list a full group definition. The following code fragment shows how to enter the mergeprop command for a full database group definition. In the following example, the sports database, is referenced and its full group definition which lists all configurations and server groups associated with the sports database noted:

>     $ mergeprop -type database -action listall sports -recurse
>     [database.sports]
>     Autostart=false
>     Configurations=sports.defaultconfiguration
>     DatabaseName=/usr1/sports
>     DefaultConfiguration=sporsts.defaultconfiguration
>     DisplayName=sports
>     MonitoredLicense=true
>     [configuration.sports.defaultconfiguration]
>     AfterImageProcess=false
>     AsynchronousPageWriters=1
>     BeforeImageProcess=true
>     Database=sports
>     DisplayName=defaultConfiguration
>     Monitored=true
>     OtherArgs=
>     ServerGroups=sports.default.configuration.defaultservergroup
>     WatchDogProcess=true
>     [servergroup.serverGroups=sports.default.configuration.defaultservergroup]
>     Configuration=sports.defaultconfiguration
>     DisplayName=defaultServerGroup
>     Port=4441
>     Type=both

> Referencing the previous code fragment, you could update a port specification for the sports database using the following example commands:

>     $ cat changeport
>     [servergroup.sports.defaultconfiguration.defaultservergroup]
>     port=4444

>     $mergeprop -type database -action update -delta changeport

Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095