Add program

The options in the Add Program area of the wizard page are available by default when you select the Use an iSeries program or procedure radio button. The options, which are described in the following table, are used to define the program object or service program object that you want to call. If you have previously defined programs or service programs for Web interactions, the Edit Program area lets you change the options that you previously defined. Click the Add Program button if you want to define a new program or service program. You can also right-click the root icon or program icon in the Program Call definitions view and select Add Program.

Option Description
Program alias Enter a name as a program alias for the program object that you specify. This value is used when creating the Java classes for this interaction.
Program object The name of a program object or a service program object. It must be a valid iSeries object name. Click Browse and connect to an iSeries server to look up the program object that you want to call. See Browse for objects below for more information.
Library The name of the library that contains the program object. It must be a valid iSeries library name. You can also select *LIBL if the library that contains the program object is your library list, or *CURLIB if the library that contains the program object is your current library. The resulting path will be /QSYS.LIB/%LIBL%/programName.pgm.
Program type Default: *PGM. Select *PGM to indicate that the object is a program object. Select *SRVPGM if the object is a service program object.
Entry point The name of the procedure or function within a service program object. The target of this program call, to be supplied if the object is a service program object. Note that this value is case sensitive. Click Browse and connect to an iSeries server to look up the service program that you want to call. See Browse for procedures below for more information.
CCSID of entry point The CCSID of the entry point within a service program. For more information, see the service program entry notes in the ServiceProgramCall javadoc.
Return type The type of value, if any, that is returned from a service program call. Only *SRVPGM objects can have a return type.

void: The program does not return a value.

integer: The program returns a 4-byte signed integer.

The default value is void.

void and integer are the only valid return types. The only way to have a service program return other data types is to specify an output or an input & output parameter, using Add parameter.

Parse order The order in which output parameters will be processed. The value specified is a blank separated list of parameter names in the order in which the parameters are to be processed. The names in the list must be identical to the names specified on the name attribute of tags belonging to the program. The default value is to process output parameters in the order the tags appear in the document.
Thread safe When you call a Java program and an iSeries program that are on the same server, use this field to specify whether you want to call the iSeries program in the same job and on the same thread as the Java program. If you know your program is thread-safe, setting the property to true results in better performance. To keep the environment safe, the default is to call programs in separate server jobs. The default value is false.
Source location If you want to view the program source to determine program or parameter attributes, select one of the following in the drop down list, then click View to see the source:
Associate this program with the interaction. This check box is automatically selected when the program you are defining is the only program that appears in the Program call definitions area. If more than one program appears in the list, you can select the program that you want to use with the interaction you are defining:
  1. Select the program in the list that you want to use with the Web interaction. The description above the program options changes to Edit program.
  2. Select the check box Associate this program with the interaction and click OK.

A small asterisk on the upper right of the program icon indicates that it is associated with the Web interaction currently being defined.

Note: To remotely call a service program object or procedure, you must meet the following requirements:
  • The service program must be on an iSeries or AS/400e server running OS/400 V4R4 or later.
  • You can pass no more than seven parameters to a service program.
  • The return value of the service program is void or a 4-byte signed integer.

The Import PCML and Synchronize All buttons always appear on the page.

Control Description
Import PCML Click Import PCML to select a standalone PCML file from your workspace or from the remote file system. You can also select ILE COBOL or ILE RPG source code from the remote file system which will automatically generate a PCML file for import..
  • Click Workspace to open the Workspace File Selection window. Select a PCML file and click OK.
  • Click Remote File System to open the Browse for File window. Select a PCML file and click OK. If you are importing a PCML file generated by the ILE RPG or ILE COBOL Program Verifier, choose Remote File System and navigate to your local workspace.

    A tree view of the selected PCML file is shown in the right pane of the window. You can select one or more structures and programs in the left pane.

Click OK to import the selected items into your current program call definitions.

If the name of an imported item conflicts with the name of an existing item in the current program call definitions, a dialog box will appears to prompt users for overwrite. To keep existing item from overwritten, user should rename the item prior to import. If the selected item requires a structure, the wizard also imports the required structure.

Synchronize All If you retrieved properties of a field from the database reference on the iSeries host, and you find that the properties defined in the Web Interaction wizard no longer match the actual properties in the database reference, click Synchronize All to automatically refresh them.

Browse for objects

Allows you to select an object in the iSeries native libraries.

  1. If you have not defined a connection to your iSeries server, expand New Connection to define a connection; otherwise expand the connection that you want to browse for an object.
  2. If you want to browse for a program object from your logon profile library list, expand *LIBL; otherwise expand Work with libraries to create a new library filter string.
  3. Expand the library that you want to browse.
  4. Select a program or service program object.
  5. Click OK.
    • The Program object field is populated with the name of the object you selected.
    • The Library field is populated with the library name.
    • The Program type field is set to either *PGM or *SRVPGM.

Browse for procedures

Allows you to select a procedure in the iSeries native libraries.

  1. If you have not defined a connection to your iSeries server, expand New Connection to define a connection; otherwise expand the connection that you want to browse for an object.
  2. If you want to browse for a service program object from your logon profile library list, expand *LIBL; otherwise expand Work with libraries to create a new library filter string.
  3. Expand the library that you want to browse.
  4. Select a service program object.
  5. Expand a module.
  6. Select a procedure.
  7. Click OK.
    • The Entry point field is populated with the name of the procedure you selected.
    • The Library field is populated with the library name.
    • The Program object is populated with the service program object name.
    • The Program type field is set to *SRVPGM.

Browse iSeries native files

Allows you to select a file in the iSeries native libraries.

  1. If you have not defined a connection to your iSeries server, expand New Connection to define a connection; otherwise expand the connection that you want to browse for an object.
  2. If you want to browse for a file from your logon profile library list, expand *LIBL; otherwise expand Work with libraries to create a new library filter string.
  3. Expand the library that you want to browse.
  4. Expand a source physical file.
  5. Select a source file.
  6. Click OK.
    • The Source location field of the Add Program page shows the name of the source file.
  7. Click View to view the source.

Browse iSeries IFS

Allows you to select a file in the iSeries integrated file system or a local file system.

  1. If you want to browse for a file from your local file system, expand Local and select a file.
  2. If you want to browse for a file from the IFS, then define a connection to your iSeries server by expanding New Connection, or expand an already defined connection and select a file.
  3. Click OK.
    • The Source location field of the Add Program page shows the name of the source file.
  4. Click View to view the source.