Linkage properties file
A linkage properties file file is a text file that is used at Java™ run time to give details on how to call a remote program.
- The value of the callLink element type property is remoteCall or ejbCall; and
- The value of the callLink element remoteBind property is runtime.
A linkage properties file may be handwritten, but EGL generates a file if (in addition to the settings described earlier) you generate a Java™ program or wrapper with the genProperties build descriptor option set to GLOBAL or PROGRAM.
How the linkage properties file is identified at run time
- A Java™ program checks the cso.linkageOptions.LO Java™ runtime property, where LO is
the name of the linkage options part used for generation. If the property
is not present, the EGL runtime code seeks a linkage properties file
named LO.properties. Again, LO is
the name of the linkage options part used for generation.
In this case, if the EGL runtime code seeks a linkage properties file but is unable to find that file, an error occurs on the first call statement that requires use of that file. For details on the result, see Exception handling.
- The Java™ wrapper
stores the name of the linkage properties file in the program object
variable callOptions, which is of type CSOCallOptions.
The generated name of the file is LO.properties,
where LO is the name of the linkage options
part used for generation.
In this case, if the Java™ Virtual Machine seeks a linkage properties file but is unable to find that file, the program object throws an exception of type CSOException.
Deploying a linkage properties file
The linkage properties file must be in the same project as the Java™ program that uses the file. If the file is in the top-level directory of the application, set the cso.linkageOptions.LO Java™ runtime property to the file name, without path information. If the file is under the top-level directory of the application, use a path that starts at the top-level directory and includes a forward slash (/) for each level, even if the application is running on a Windows™ platform.
When you are developing a J2EE project, the top-level directory corresponds to the appClientModule, ejbModule, or WebContent directory of the project in which the module resides. When you are developing a Java™ project, the top-level directory is the project directory.
Format of the linkage properties file
As used during run time, the linkage properties file includes a series of entries to handle each call from the generated Java™ program or wrapper that you are deploying.
- The remoteBind property is necessarily runtime and is ignored.
- The type property cannot belocalCall, because linkage for local calls must be established at generation time.
cso.serverLinkage entries
cso.serverLinkage.programName.property=value
- programName
- In most cases, the name of the called program. If the called program
is generated by EGL, the name you specify is that of a Program part,
not the value of an alias property that is specific to the
Program part.A special case applies if your call statement includes the linkageKey property. Here is an example call statement:
call "MyProgram01" {linkageKey = "MyProgram02"};In this situation, set the programName qualifier in the linkage properties file to the linkageKey value; in this case, to MyProgram02.
- property
- Any of the properties appropriate for a Java™ program, except for properties remoteBind and pgmName. For details, see callLink element. Use externalName for the alias property, not alias.
- value
- A value that is valid for the specified property.
cso.serverLinkage.Xyz.type=remoteCall
cso.serverLinkage.Xyz.remoteComType=TCPIP
cso.serverLinkage.Xyz.remotePgmType=EGL
cso.serverLinkage.Xyz.externalName=xxx
cso.serverLinkage.Xyz.package=xxx
cso.serverLinkage.Xyz.conversionTable=xxx
cso.serverLinkage.Xyz.location=xxx
cso.serverLinkage.Xyz.serverID=xxx
cso.serverLinkage.Xyz.parmForm=COMMDATA
cso.serverLinkage.Xyz.providerURL=xxx
cso.serverLinkage.Xyz.luwControl=CLIENT
The literal values TCPIP, EGL, and so on are not case sensitive and are examples of valid data.
cso.application entries
If you wish to create a series of cso.serverLinkage entries that refer to any of several called programs, precede those entries with one or more entries of type cso.application. Your purpose in this case is to equate a single application name to multiple program names. In the subsequent cso.serverLinkage entries, you use the application name instead of programName; then, at Java™ run time, those cso.serverLinkage entries handle calls to any of several programs.
cso.application.wildProgramName=appName
- wildProgramName
- A valid name, an asterisk, or the beginning of a valid name followed
by an asterisk. The asterisk is the wild card equivalent of one or
more characters and provides a way to identify a set of names. Two
special cases apply:
- If a linkageKey property is in a call statement, the value that is tested against wildProgramName is the value of the linkageKey property.
- If no linkageKey property is in a call statement and the called program is generated by EGL, the value that is tested against wildProgramName is the name of the Program part, not the value of the alias property for that part.
- appName
- A series of characters that conforms to the EGL naming conventions. The value of appName is used in subsequent cso.serverLinkage entries.
cso.application.Xyz*=myApp
cso.serverLinkage.myApp.type=remoteCall
cso.serverLinkage.myApp.remoteComType=TCPIP
cso.serverLinkage.myApp.remotePgmType=EGL
cso.serverLinkage.myApp.externalName=xxx
cso.serverLinkage.myApp.package=xxx
cso.serverLinkage.myApp.conversionTable=xxx
cso.serverLinkage.myApp.location=xxx
cso.serverLinkage.myApp.serverID=xxx
cso.serverLinkage.myApp.parmForm=COMMDATA
cso.serverLinkage.myApp.luwControl=CLIENT
cso.application.Abc=myApp
cso.application.Def=myApp
cso.application.Xyz=myApp
cso.serverLinkage.myApp.type=remoteCall
cso.serverLinkage.myApp.remoteComType=TCPIP
cso.serverLinkage.myApp.remotePgmType=EGL
cso.serverLinkage.myApp.externalName=xxx
cso.serverLinkage.myApp.package=xxx
cso.serverLinkage.myApp.conversionTable=xxx
cso.serverLinkage.myApp.location=xxx
cso.serverLinkage.myApp.serverID=xxx
cso.serverLinkage.myApp.parmForm=COMMDATA
cso.serverLinkage.myApp.luwControl=CLIENTIf multiple cso.application entries are valid for a program, EGL uses the first entry that applies.
You can find more information in the topics "Naming conventions" and "Exception handling" in the EGL Language Reference.