 | Customize the build file
The EGL build file contains the information necessary for EGL to communicate with your target environment.
Open the EGL build file
The build file must be configured once for each project to define options that will control the generation of the executable program code.
-
Expand the EGLCALLWEB project.
-
Expand EGLSource.
-
Locate the EGL build file. This will be the project name with the extension .eglbld. In this example, it is EGLCALLWEB.eglbld, as shown in Figure 6.
-
Double-click the build file to open it.
Figure 6. Open the build file
The default build file editor opens.
Creating the linkage options for the program call
The linkage options are part of the build file, but they are handled by a different wizard. The linkage options describe where the remote object (in this case, the program on IBM i) resides, and what interface should be used to access it.
Now you will create the linkage option for the program call.
-
Locate the Outline view in your workspace. It should be below the Project Navigator, as shown in Figure 7.
-
If it does not show up, click the Outline tab to select it.
Figure 7. Open the Outline view
-
Right-click the eglcallweb.eglbld node in the tree and select Add Part, as shown in Figure 8.
Figure 8. Select to open the Add EGL Build Part dialog
-
Select Linkage Options, as shown in Figure 9.
-
Click Next.
Figure 9. Populate the EGL build file
-
On the dialog page displayed in Figure 10, type the name of the linkage option (in this case,
callsysipgms)
Figure 10. Enter the part name
After you complete this one-time set up for your project, you can now use this to create linkages to any program on System i5 or other systems.
-
When the dialog opens, click the Add button, as shown in Figure 11.
Figure 11. List of CallLink Elements
-
Click inside the Program Name field and type the name of the program that you wish
to call on IBM i. In this case it is
GETDATAE.
Note: You can add as many programs as you need to this list. EGL programs in the project may call any number of programs on your System i5 or other machines.
-
Select remoteCall from the Type drop-down list.
-
Click anywhere in the dialog and press Enter to make sure that the change applies.
You will see that the program name GETDATAE and remoteCall appear in the right hand list of linkage options, as shown in Figure 12.
Figure 12. CallLink elements and properties
Specify linkage
values
-
Provide the following property values (shown in Figure 13) exactly as listed in Table 1.
Table 1. Correct property values
|
Property
|
Value
|
Comment
|
pgmName
|
GETDATAE
|
should appear as default
|
type
|
remoteCall
|
should appear as default
|
conversionTable
|
CSOE037
|
CS letter O (Oh) E zero 37 See note below.
|
library
|
EGLLABv7xx
|
Name of the IBM i library where the program resides on the System i5, or nothing for libl.
|
location
|
iseriesd.dfw.ibm.com
|
This is the TCP/IP name of your machine or the IP address.
|
remoteBind
|
GENERATION
|
Select from drop-down list.
|
remoteComType
|
JAVA400
|
Select from drop-down list
|
remotePgmType
|
STATELESS
|
Select from drop-down list
|
Note: EGL handles conversions from ASCII or UNICODE to EBIDIC in the IBM i system. The converstionTable property specifies the code page and language to use for conversions. The first four characters of the conversion table are always “CSOE” (letter oh, not zero). The last three digits are the three digit code for your national language. The code 037 is US English.
Figure 13. Property values now listed in view
After completing the entry for these properties,
-
Save the Linkage options. Press Ctrl + S to save the entries.
-
Select the eglcallwebWebBuildOptions tab to open the Build Options editor window, as shown in Figure 14.
Figure 14. Select the tab
Adding linkage to build file
In the Build options editor:
-
Clear the Show only specified options check box to show all of the options that are available for the Build Options file.
-
Find the linkage option shown in Figure 15
-
Click the (no value set) entry field
Figure 15. Show all available options
-
Click the little arrow at the end of the field. It will provide you with a list of all available linkages.
-
Select
callsysipgms, as shown in Figure 16.
Figure 16. Select a linkage value
-
Select the Show only specified options check box options to reduce the number of options shown in the list, as shown in Figure 17.
-
Save by using Ctrl+S.
-
Click the X in the editor tab to close the editor.
Figure 17. Reduce displayed options
|  |