# Substitution Process for EMS ESB Definitions

There is one “Substitution” value that can be used in the `EMS URL` field or in the `ECF Name` field (these are the only fields supporting the process). The value is &intfid which is changed value of parameter “INTF-ID” (example: INTFID.ECFNAME). The maximum length of interface Id is 8 characters.

Note: &intfid is all lower case.

At execution time, Substation ES will scan the text values for `EMS URL` and/or `ECF Name` while searching for the above substitution keyword. When found, Substation ES will replace the keyword with the corresponding value. If no substitution keyword is found, then the value remains unchanged.

Examples of using Substitution Process with `ECF Name`.

ECF Name ===>&intfid.ECFNAME

ECF Name ===>PROD.&intfid.ECFNAME

ECF Name ===>TEST.ECFNAME.&intfid

Based on the above definition, Substation ES would replace &intfid with the Intf-Id defined in the EMS ESB interface member and send a request to the ECF URL Lookup Server for that Object.

If the Substation ES EMS ESB Interface Id is “ABCD”, then the ECF names used are as follows:

- ABCD.ECFNAME
- PROD.ABCD.ECFNAME
- TEST.ECFNAME.ABCD

The ECF Lookup Server must have the above ECF Lookup objects to prevent Connection Errors.

The contents of the Lookup Objects can be anything needed to get to the EMS Data Server (Fault Tolerant or Not)

Examples of using Substitution Process with `EMS URL`.

URL ===>tcp://&intfid.PRIMARY-URL:7888,tcp://&intfid.ALT-URL:7889

URL ===>tcp://PROD.&intfid.PRIMARY-URL:7888,tcp://PROD.&intfid.ALT-URL:7889

URL ===>tcp://TEST.PRIMARY-URL.&intfid:7888,tcp://TEST.ALT-URL.&intfid:7889

Based on the above definition, Substitution ES would replace &intfid with the Intf-Id in the EMS ESB interface member and then ask the DNS Lookup for the network address.

If the Substation ES EMS ESB Interface Id is “ABCD”, then the URLs used are as follows:

tcp://ABCD.PRIMARY-URL:7888,tcp://ABCD.ALT-URL:7889

tcp://PROD.ABCD.PRIMARY-URL:7888,tcp://PROD.ABCD.ALT-URL:7889

tcp://TEST.PRIMARY-URL.ABCD:7888,tcp://TEST.ALT-URL.ABCD:7889

The Substituted URL must be a valid URL name and syntax.

The URL value must be available in the DNS lookup server to prevent connection errors.

Note: You cannot change the socket numbers in URL substitution. If a different socket (port) number is required, then use ECF NAME lookup, as explained above.

How to Use

The “Substitution” process allows one VSAM configuration file with one EMS ESB connection definition that needs to be used in multiple Substation ES instances and multiple EMS ESB interfaces that will connect to different EMS Servers. This reduces the maintenance level for Recipes and Triggers definitions that reside in a multiple EMS server environment.

Further, using the “Substitution” can increase reliability and reduce business outages by having multiple EMS ESB interfaces going to different EMS Servers which create a High Availability (HA) environment.

Copyright © TIBCO Software Inc. All rights reserved.