Skip to main content

skip to main content

developerWorks  >  Rational | Sample IT projects  >

Calling IBM i programs from EGL using Rational Business Developer

developerWorks
Go to the previous pagePage 4 of 10 Go to the next page

Document options
PDF format - Fits A4 and Letter

PDF - Fits A4 and Letter
3117 KB (66 pages)

Get Adobe® Reader®


My developerWorks needs you!

Connect to your technical community


Rate this tutorial

Help us improve this content


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.

  1. Expand the EGLCALLWEB project.
  2. Expand EGLSource.
  3. 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.
  4. Double-click the build file to open it.

Figure 6. Open the build file
project explorer

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.

  1. Locate the Outline view in your workspace. It should be below the Project Navigator, as shown in Figure 7.
  2. If it does not show up, click the Outline tab to select it.

Figure 7. Open the Outline view
four workspace areas with tabs
  1. 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
context menu
  1. Select Linkage Options, as shown in Figure 9.
  2. Click Next.

Figure 9. Populate the EGL build file
choose the EGL part type
  1. 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
linkage options name and description

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.

  1. When the dialog opens, click the Add button, as shown in Figure 11.

Figure 11. List of CallLink Elements
elements listed on left, properties on right
  1. 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.
  2. Select remoteCall from the Type drop-down list.
  3. 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
element listed on left, properties on right

Specify linkage values

  1. 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
Element on left, properties on right

After completing the entry for these properties,

  1. Save the Linkage options. Press Ctrl + S to save the entries.
  2. Select the eglcallwebWebBuildOptions tab to open the Build Options editor window, as shown in Figure 14.

Figure 14. Select the tab
tab at bottom of the window

Adding linkage to build file

In the Build options editor:

  1. Clear the Show only specified options check box to show all of the options that are available for the Build Options file.
  2. Find the linkage option shown in Figure 15
  3. Click the (no value set) entry field

Figure 15. Show all available options
options on left, symbolic parameters on right
  1. Click the little arrow at the end of the field. It will provide you with a list of all available linkages.
  2. Select callsysipgms, as shown in Figure 16.

Figure 16. Select a linkage value
drop-down list for selected value
  1. Select the Show only specified options check box options to reduce the number of options shown in the list, as shown in Figure 17.
  2. Save by using Ctrl+S.
  3. Click the X in the editor tab to close the editor.

Figure 17. Reduce displayed options
Options on left and parameters on right


Back to top



Go to the previous pagePage 4 of 10 Go to the next page