Table of Contents

Search

  1. Preface
  2. Part 1: Introduction
  3. Part 2: PowerExchange Client for PowerCenter (PWXPC)
  4. Part 3: PowerExchange ODBC
  5. Appendix A: PowerExchange Interfaces for PowerCenter Tips
  6. Appendix B: Datatypes and Code Pages
  7. Appendix C: PowerExchange Interfaces for PowerCenter Troubleshooting

PowerExchange Interfaces for PowerCenter

PowerExchange Interfaces for PowerCenter

DTLREXE to Submit MVS Batch Jobs

DTLREXE to Submit MVS Batch Jobs

PowerExchange provides a utility program called DTLREXE which can be used to cause remote execution of a program on another platform running PowerExchange. One option of this utility is the SUBMIT option which provides the ability to submit a MVS batch job remotely.
This utility can be invoked in PowerCenter workflows with PowerCenter Command Tasks. Command tasks can either be stand-alone tasks or pre/post session commands. Which you choose depends upon what you want to do. There are advantages in using a stand-alone command task for repeatable functions as it only needs to be coded once and can then be used by numerous workflows. On the other hand, it is possible to easily configure a session to fail if a pre-session command task fails.
Some examples of the type of tasks that can be performed with DTLREXE PROG=SUBMIT are:
  • Truncate a database table prior to loading data into it in a session. This is useful for database types for which PowerCenter does not support truncate, such as Adabas.
  • Notify a MVS-based job scheduler that the workflow is starting or ending. Some job scheduler products provide batch posting utilities and they can be utilized with DTLREXE to submit a batch job.
  • Unload a database to a flat file so it can then be used in a session to load another database.
  • Clean up DB2 bulk load files when the session completes successfully.
  • Submit any type of MBS Batch JOB for which waiting for the completion and returning a set of messages is required.
In the
Edit - Command
dialog box, you can enter a command. The following code is an example of a DTLREXE PROG=SUBMIT command entered as a pre-session command:
dtlrexe prog=submit loc=mvs fn=\"dtlusr.jcl(db2load)\" mode=(job,wait) output=dtlusr.output result=c:\submit\output\output.txt uid=user01 pwd=pass01
In this example, the DTLREXE command specifies mode=(job,wait) which means that the DTLREXE will wait for the job to complete. This, in turn, will cause the session to wait until this pre-session command completes. In the “Error Handling” section of the Config Object, you can specify how to handle errors for pre-session commands in the
On Pre-session command task error
field.
Ensure that the JOB submitted through DTLREXE includes the appropriate DTLNTS steps if WAIT mode is requested. The PowerExchange RUNLIB, in member DTLREXE, contains sample JCL to be used with DTLREXE that includes the required DTLNTS steps.
If you use a stand-alone command task to submit a batch JOB with DTLREXE, there are no session configuration options to check for success or failure. If you want to test the status of the command task in the following session, you will need to use one of the task-specific workflow variables available in the Workflow Manager, that is, PrevTaskStatus or Status. These variables can be used in link conditions to test the status of tasks in a workflow.
The link condition is created by double-clicking on the link between the DTLREXE command task and the s_bulk_db2demo123_db2demoabc session to which it is connected. This action invokes the Expression Editor, enabling you to add the test to ensure that the DTLREXE command task succeeded.

0 COMMENTS

We’d like to hear from you!