Try OpenEdge Now
skip to main content
Installation and Configuration
Configuration : Configuration : Mergeprop utility overview : Mergeprop examples
 
Mergeprop examples
The following examples demonstrate how you can perform various modifications using the mergeprop utility.

Updating and adding

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 following command line 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.

Adding a property

This example demonstrates how to add a property specified as an "environment" property to the asbroker2 created in the earlier example.
The following code fragment shows the environment property being added to the asbroker2 definition in the ubroker.properties file:
$ cat asbroker2prop
[UBroker.AS.asbroker2]
environment=asbroker2
[Environment.asbroker2]
MYENV=hello
$ mergeprop -type ubroker -action update -delta asbroker2prop

Deleting a property

It is also helpful to know how to perform a deletion. Remember that you can only perform group-level deletions; you cannot delete a single property within a group. The command line demonstrates how to delete the instance of asbroker2:
$ mergeprop -type ubroker -action delete ubroker.AS.asbroker2

Updating properties

You can delete items in a property, by updating the property in a series of steps:
1. Save the property to a temporary file, as shown:
$ mergeprop -type ubroker -action list UBroker.AS.asbroker2 > changeasbroker2
2. Delete the property, as shown:
$ mergeprop -type ubroker -action delete ubroker.AS.asbroker2
3. Edit the temporary file, changeasbroker2, to remove the items no longer required.
4. Add the property back to the ubroker.properties file, as shown:

$ mergeprop -type ubroker -action update -delta changeasbroker2

Listing properties

The following command line lists the properties defined specifically for the UBroker.AS.asbroker1 group in ubroker.properties, omitting inherited properties:
$ mergeprop -type ubroker -action list UBroker.AS.asbroker1
The following command line lists all properties of the UBroker.AS.asbroker1 group, including inherited properties:
$ mergeprop -type ubroker -action listall UBroker.AS.asbroker1
The following command line lists all properties, including inherited properties of the FMCONFIGCLI.OSFI group in the file installation-path\%DLC%\properties/JavaTools.properties:
$ mergeprop -type tools -action listall FMCONFIGCLI.OSFI
The following command line shows how to list a full group definition, specifically a full database group definition. In this example the sports database is referenced and its full group definition which lists all configurations and server groups associated with the sports database is 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
You can update a port specification for the sports database using the following commands:
$ cat changeport
[servergroup.sports.defaultconfiguration.defaultservergroup]
port=4444
$mergeprop -type database -action update -delta changeport