MQ File Transfer Edition Error and Trace Handling

MQ File Transfer Edition Error and Trace Handling

The following are the trace levels that can be specified:

1. off

2. flow

3. moderate

4. verbose

5. all

Step 1: Set Agent Trace Level

Run the following command on Agent AGT1WIN, select your specific trace level:

fteSetAgentTraceLevel -traceLevel all AGT1WIN

Step 2: View Trace file

Navigate to: *\WMQFTE\config\QM_COORD1\agents\AGT1WIN\logs

Optional is to enable trace only for specific criteria:

Only enable trace for a specific transfer:

fteCreateTransfer -trace “com.ibm.wmqfte=all” -sa AGT1WIN -da AGT1LIN_XXX -dm QM_AGENTHOST2 -sd leave -t binary -de overwrite -dd “/tmp” “C:\student\*.jpg”

View the new trace by navigating to: *\WMQFTE\config\ QM_COORD1\agents\AGT1WIN\logs

Disable trace by setting trace level to off:

fteSetAgentTraceLevel -traceLevel off AGT1WIN

Setup Websphere MQ File Transfer Database Logger

Step 1. Run the following db2 command:

— drop if necessary and then create FTELOGDB

echo *******************************************************

echo the following command may fail because the database did

echo NOT previously exist, this is an acceptable error

echo *******************************************************

drop database FTELOGDB

echo — Creating database FTELOGDB

create database FTELOGDB

echo — Connect to FTELOGDB database

connect to FTELOGDB user esbuser using wesb4soa

— catalog FTELOGDB as a odbc data source

catalog system odbc data source FTELOGDB

list system odbc data sources

echo — now create the schemae, tables and views

echo — use this db2cmd command console

echo — it is already connected to the database

Step 2: Create the DB2 Schema Tables

Navigate to: C:\Program Files\IBM\WMQFTE\tools\sql

Execute the following command:

db2 –v -t –f ftelog_tables_db2.sql

Step 3: Configure the Database Logger Properties File

Navigate to: *\WMQFTE\config

Open file in Notepad: databaselogger.properties

Edit the following values:

wmqfte.queue.manager=QM_COORD1

(Coordinator Queue Manager Name)

wmqfte.database.name=FTELOGDB

(Database Name created in Step 1)

wmqfte.database.driver=D:/Applications/IBM/SQLLIB/java/db2jcc.jar;D:/Applications/IBM/SQLLIB/java/db2jcc_license_cu.jar

(DB2 Driver Path)

wmqfte.database.native.library.path=C:/Applications/IBM/SQLLIB/lib

(Library Path to DB2)

Step 4: Setup the transaction manager

Open MQ Explorer right click on the Coordinator Queue Manager and select Properties. Under XA Resource Manager click the ‘Add’ button.

Enter FTELOGDB as the Name.

Enter jdbcdb2.dll as the SwitchFile.

Enter db=FTELOGDB,uid=db2admin,pwd=db8admin,toc=p,tpm=mq as the XAOpenString.

Make sure the ThreadOfControl is set to Process.

Press the OK button to add the XA resource manager to the queue manager.

Click OK

Step 5: Copy the jdbcdb2.jar to the existing folder

Navigate to *\IBM\WebSphere MQ

execute the following command to copy the jdbcdb2.jar file: copy java\lib\jdbc\jdbcdb2.dll exits

Step 6: Execute a Controlled Stop of the Coordinator Queue Manager

Step 7: Start the Database Logger

Execute the following command in *\MQFTE\tools\bin: fteStartDatabaseLogger –F


Step 8: Run a new Transfer

Navigate to ‘Manage File Transfer’ and connect the Coordinator Queue Manager and right click on Transfer Log and select ‘New Transfer’

Select a Agent, file to transfer and Click Next till you see the following window:

Add two metadata attribute value pairs:

Click Next and Finish to start file transfer

Step 9: Open DB2 Control Panel to View the Database Logger Table

Navigate to your Database Logger Database -> Views -> Basic_Transfer_Details.

Navigate to your Database Logger Database -> Tables -> Metadata.

Optional Stop Database Logger:

Navigate to *\MQFTE\tools\bin\fteStopDatabaseLogger.cmd

Database Logger will stop succesfully else see result of error.

WebSphere MQ File Transfer Edition – Definition File

FTE Definition File Transfer

Transfer definition files enable the creation of complex transfer requests. The transfer definition file is a XML file that describes the source and destination directories or files or datasets.

Step 1: Create a Definition Transfer File (below is an example):

<?xml version=”1.0″ encoding=”UTF-8″?>

<transferSpecifications

xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance&#8221;

xsi:noNamespaceSchemaLocation=”FileTransfer.xsd”>

<item checksumMethod=”none” mode=”text”>

<source recursive=”false” disposition=”leave”>

<file>E:\student\*.txt</file>

</source>

<destination type=”directory” exist=”overwrite”>

<file>/tmp</file>

</destination>

</item>

<item checksumMethod=”none” mode=”binary”>

<source recursive=”false” disposition=”leave”>

<file>E:\student\*.zip</file>

</source>

<destination type=”directory” exist=”overwrite”>

<file>/tmp</file>

</destination>

</item>

</transferSpecifications>

Step 2: fteCreateTransfer -sa AGT1WIN -da AGT1LIN -dm QM_AGENTHOST2 -td E:\student\GroupTransferSpecification.xml

– sa is the source agent name

-da is the destination agent name

-dm is the destination Queue Manager

-td is the XML Definition File