Use the Program Call wizard to call an i program or procedure from your Java™ application. The wizard prompts you
for information regarding program or service program objects, along with the
parameters for the objects, and then creates the desired Java beans
and PCML file.
Before you begin
Before launching the wizard, you must have a Java project
or a Dynamic Web project.
- If you want to use the generated Java beans in a Java application, you must create the Java beans
in a Java project
, and it is recommended that you launch the Program call wizard from a Java perspective.
- If you want to use the generated Java beans in a Web service, you must create
the Java beans
in a Dynamic Web project, and it is recommended that you launch the Program
Call wizard from a Web perspective.
About this task
This wizard helps you to define:
- The program objects or service program procedures
- The parameters needed by the program objects or procedures
- The structures used by the parameters
Based on your definition, the wizard creates a PCML file and Java beans
for you to call your IBM® i program
or procedure. If you already have an existing PCML file that contains all
the definitions, you can import the PCML file, and the wizard can generate Java beans
from it.
To use the first page of the Program Call wizard:
Procedure
- Launch the wizard. If you have a Program Call bean created previously,
you can double-click on the MPCML file. This is the recommended method because
it brings all information (such as package and configuration information)
into the wizard as well as PCML data. Otherwise do one of the following:
- Select the project or package in which you want the wizard to generate
the Java beans
and PCML file. Click the icon.
- Select a PCML file if you want to bring the information contained
in that PCML file into the wizard. Click the Create Program Call
Bean icon in the main menu bar.
- Optional: If you want to retrieve the information defined
in an existing PCML file, or if you have an RPG or COBOL source file and want
to have a PCML file generated from it, click Import.
- You can import an existing PCML file that you created, a PCML file
that was previously generated by the Program Call wizard, or a PCML file that
was generated by the ILE RPG compiler or the ILE COBOL compiler.
- You can select an RPG or COBOL source file and generate a PCML file
directly from it.
Read the related task on Importing PCML.
- To define a program or service program procedure that you want
to call, click Add Program. Define a program as described
in the related references below. The definition appears in the left pane of
the wizard.
- To define a parameter required by the program or procedure, select
the node that represents the program in the tree view, then click Add
Parameter.
- When you have defined a program or structure, you can right-click
your program, parameter or structure definition in the left pane and select
one of the following. (You can also right-click a node in the left pane to
add a program or structure definition even if nothing has been defined.)
- Add Program (to add a program)
- Add Parameter (to add a parameter to the selected
program or structure)
- Add Structure (to add a structure)
- Move Up (to move the selected element up)
- Move Down (to move the selected element down)
- Delete (to delete the selected element)
What to do next
When you have defined at least one program or service program
object, you can proceed to the next page of the wizard (Create IBM i program call Java bean and PCML file). Click the links
below for further information about this wizard.