Using stored procedure linkage to call z/OS® batch from Java™
Whenever you generate Java™ code that does a remote call to z/OS® batch, do as follows:
- Configure a linkage options part with the remoteComType set to STOREDPROCEDURE. This will direct the call to the host through the stored procedure so it participates in the transaction.
- Configure your build descriptor so that the build descriptor linkage option points to the linkage options part that you created.
- Configure the host environment, as described in the next section.
Configuring the host environment
Ensure
that the following applications are in use on z/OS®:
- DB2® version 7 or higher.
- Resource Recovery Services (RRS)
- Workload Manager (WLM)
Carry out the following actions on your host system, fulfilling
these steps only once:
- Create the WLM (Workload manager) (ELADBWLM). For more information, see Workload manager in Configuring DB2® for stored procedure linkage.
- Create the DB2® stored procedure (EZESP1CR and EZESP1GR). For more information, see DB2® stored procedure in Configuring DB2® for stored procedure linkage.
Configuring your local workspace for remote debugging
To
enable remote debugging, do as follows in your local workspace:
- You must have JDBC on the client system. The actual jar files you need depend on the version of JDBC that you are running.
- Make sure that you have a functioning default JDBC DB2® connection to the host.
- If you access a DB2® database in both the EGL-generated Java™ code and in a called program, ensure that the default JDBC connection is set to NOAUTOCOMMIT.