The MERGEPROP utility allows the content of OpenEdge property files to be managed from the command line interface.
- A single property within a group cannot be deleted explicitly but can be updated, only group-level deletions can be performed. To add new Groups or delete a property within a group, the group needs to first be deleted then re-added
- Properties can be added and value change of existing properties without having to delete the existing Group
Due to the variation of parameters and requirements, it is recommended to review the documentation on mergeprop usage in:
Examples:A.
To add or delete GroupsTo add new Groups or delete a property within a group, the group needs to first be deleted then re-added. The following example shows how to manipulate the
ubroker.properties, to adjust the
asbroker1 configuration.
1. First make a record of the group to delete:
$ mergeprop -type ubroker -action list UBroker.AS.asbroker1 -target $DLC\properties\ubroker.properties > changeasbroker1
2. Now perform the actual Group deletion:
$ mergeprop -type ubroker -action delete ubroker.AS.asbroker1 -delta changeasbroker1 -target $DLC\properties\ubroker.properties
3. Edit the changeasbroker1 delta file to add/update/remove the required properties and include unchanged properties.
4. Re-add the Group back into the properties file:
$ mergeprop -type ubroker -action update -delta changeasbroker1 -target $DLC\properties\ubroker.properties
5. Verify the new properties by reviewing the output, specifically lines with "VALIDATION MESSAGE:"
$ ubconfig -f $DLC\properties\ubroker.properties > verifyubproperties
B. To change the value of existing properties and add properties
The Group does not need to be deleted , only the specific property and value change need to be in the 'delta' file.
If existing string property values need to remain, these must be included as the line is overwritten with that in the 'delta' file. The following example shows how to manipulate the AdminServerPlugins.properties, to adjust the AdminServer Plugin configuration by updating the jvmargs string and adding new properties (port, adminport).
$ mergeprop -type plugin -action list PluginPolicy.Progress.AdminServer -target DLC\properties\AdminServerPlugins.properties > changejvmargs
# changejvmargs
[PluginPolicy.Progress.AdminServer]
jvmargs=-Xmx1024m -XX:MaxPermSize=128m -Djava.awt.headless=true -
Dsun.lang.ClassLoader.allowArraySyntax=true -Djava.rmi.server.hostname=<IPAddress>
port=20941
adminport=7841
$ mergeprop -type plugin -action update -delta changejvmargs -target $DLC\properties\AdminServerPlugins.properties
Notes:
-
The default location for property files is "DLC\properties", another target can be specified if an alternate location is used to store .properties files. Specifying the default location is not entirely necessary in the above example as this is assumed otherwise.
-
By default, the original target file is backed up in the same directory unless '-nobackup' is used.
- A restart of the Adminserver is not required after adding Groups using mergeprop, changes will take effect with the Adminserver running.
- The 'mergeprop' utility simply updates the .properties file. Once the properties file is updated, the AdminServer does a 'warmstart' to populate the changes. For 'delete', the AdminServer will find that the resource in the configdb is no longer there and will Alert to this fact. The next action is then to delete the resource in the OpenEdge Console.
APPSERVER: ASBROKER1
ALERTS: WarmStartFinished
Delete Resource
The AdminServer configuration definition for this AppServer resource no longer exists
Choose delete to permanently remove this AppServer resource
- As detailed above, when .properties files are either manually edited or the mergeprop utility is used when the AdminServer is online, new instances updated within the current properties files are recognised.
The mergeprop utility was never intended to be used for upgrading .properties from older versions, but does work between some versions.
mergeprop is meant to be used to create/update/delete instances in a given .properties file of the same version.
If there have been no changes to the .properties files between versions, only then will mergeprop migrate prior version resource configuration to the new version.
Specifically in cases where properties have been deprecated or renamed or are new mandatory entries, while mergeprop will populate the new version with the old version's values, it will not make the necessary corrections for new version changes. That is what the AdminServer does when it finds a .properties file that needs updating when it starts up. - When the properties files are updated elsewhere and then overwrite the current properties files while the AdminServer is running, configurations of the file being coped will not be recognized until the AdminServer is restarted.