Table of Contents

Search

  1. Preface
  2. Introduction to PowerExchange Commands
  3. Adabas Log-Based ECCR Commands
  4. Batch VSAM ECCR Commands
  5. CICS/VSAM ECCR Commands
  6. Datacom Table-Based ECCR Commands
  7. DB2 for z/OS ECCR Commands
  8. IDMS Log-Based ECCR Commands
  9. IMS Synchronous ECCR Commands
  10. IMS Log-Based ECCR Commands
  11. PowerExchange Agent Commands
  12. PowerExchange Condense Commands
  13. PowerExchange Listener Commands
  14. PowerExchange Logger for MVS Commands
  15. PowerExchange Logger for Linux, UNIX, and Windows Commands
  16. pwxcmd Commands

Command Reference

Command Reference

Scripting pwxcmd Commands

Scripting pwxcmd Commands

You can issue pwxcmd commands from a Linux, UNIX, or Windows system through batch files, scripts, or other programs.
You might issue some pwxcmd commands on a regular basis, such as a pwxcmd close command to stop a PowerExchange Listener. In this case, you can create a shell script or a batch file to call one or more pwxcmd commands with its options and arguments.
The following example Windows batch file, pwxcmd_list.bat, verifies that a PowerExchange Listener is active and then closes it:
@echo off REM -- NAME: pwxcmd_list.bat REM -- DESCRIPTION: Sample pwxcmd script to display any PowerExchange Listener active tasks pwxcmd listtask -sv TEST if errorlevel ==32601 goto noconnect if errorlevel ==0 goto close :close pwxcmd close -sv TEST if %errorlevel% neq 0 goto noconnect if errorlevel ==0 goto end :noconnect echo %errorlevel% echo "Could not connect to pwxcmd command handler." pause goto end :end
This script does not use security for pwxcmd commands.
For this script to work, you must configure a PowerExchange Listener to receive pwxcmd commands. For example, to issue pwxcmd commands from the same system where the PowerExchange Listener runs, you might configure a PowerExchange Listener in the dbmover.cfg file, as follows:
LISTENER=(node1,TCPIP,2480) SVCNODE=(node1,6001) CMDNODE=(TEST,LISTENER,localhost,6001)
Run the script from the command line. For example, on Windows, run the script, as follows:
C:\Informatica\PowerExchange>pwxcmd_list.bat
The output from the pwxcmd commands in the script appears on the command line or in a file to which you pipe the output on the Linux, UNIX, or Windows system from which you run the script. For example, the output might appear on the command line on Windows, as follows:
C:\Informatica\PowerExchange>pwxcmd_list.bat PWX-00711 Active tasks: PWX-00713 0 active tasks PWX-00726 Close

0 COMMENTS

We’d like to hear from you!