WebSphere Transformation Extender MQ PUT in IF statement

Call a MQ PUT or Get in a WTX Input or output card with an IF statement:

IF ( Field1 < Field2, PUT("MQS","-QMN QM1 -QN WTX.OUT -DH", LEFT(PACKAGE(MessageDescriptor2 Header:In2),348)+PACKAGE(IndexNumber)+RIGHT(PACKAGE(MessageDescriptor2 Header:In2),12)+TEXT(In1) ),PUT("MQS","-QMN QM1 -QN WTX.OUT -DH", LEFT(PACKAGE(MessageDescriptor2 Header:In3),348)+PACKAGE(IndexNumber)+RIGHT(PACKAGE(MessageDescriptor2 Header:In3),12)+TEXT(In1) ))

The WTX statement will test if Field 1 is bigger than Field 2 if True it will put the content of the message built onto a queue using the PUT command. The "MQS" tells WTX to use the MQ Adapter and -QMN specifies Queue Manager and QN specifies Queue Name.

WebSphere Transformation Extender DB2 insert

WebSphere Transformation Extender can be used to insert transformed data into a Database in this case I used DB2. Below is the steps to follow to do a DB2 Insert into WTX:

Step 1: Open WebSphere Transformation Extender Database Interface Designer. Select New to create a new Database Query File. Right Click on Databases to specify all the parameters to connect to your database, specify a data source and specify username and password of database:

Step 2: Right click on your newly created Data Source and Select: Generate Tree From -> Table

Step 3: Select the table you want to Generate a Type Tree for to do the insert

Step 4: Add this newly created Type Tree to your WTX Design Studio as an input card. Add the following tree called DB2load.mtt as your output Card.

Step 5: Complete your Output Card with all the necessary DB2 parameters and fields by dragging and dropping the from input card to output card:

Step 6: Run and compile your map, make sure all the database parameters are set and DB2 has started successfully.

Using WebSphere Transformation Extender inside Sterling Integrator

BM® WebSphere® Transformation Extender, formerly called DataStage TX, and hereafter referred to as WebSphere TX, has been part of the IBM WebSphere portfolio since 2005. WebSphere TX maps provide complex, any-to-any and many-to-many transformation capabilities that can be executed standalone or embedded into other IBM products such as WebSphere Message Broker, WebSphere ESB, and WebSphere DataPower® SOA Appliances.

In August of 2010, IBM purchased Sterling Commerce. Its Sterling Integrator product enables enterprise and B2B integration through a single solution, handling EDI and XML side-by-side to integrate order retrieval and processing. Sterling Integrator offers a number of transformation or translation options including XSLT and support for proprietary maps developed using the Sterling Integrator Map Editor. It also enables you to develop additional services using its Software Development Kit.

This article describes a WebSphere TX Extender for Sterling Integrator. It does not cover how to develop a Sterling Integrator service — for information on that, see the MESA Developer Studio documentation.

http://www.ibm.com/developerworks/websphere/library/techarticles/1011_hudson/1011_hudson.html

Websphere Transformation Extender Partner Manager Tutorial- Define Internal and External Trading Partners

Internal Partners

1. Open Partner Manager.

2. From the Address Book navigator, select Internal → X12.The Address Book for Internal X12 window opens.

3. Click Add.The Add X12 Trading/Application Partner window opens.

4. Complete the Fields in the Partner window. Below is an example:

5. Click Save. The Address Book will display the entry.

6. Close the Address Book window.

External Partners

For external Partners following the same steps as above but from the External Address Book. Below is an example of the form to complete

Websphere Transformation Extender Partner Manager Tutorial- Define Database in Partner Manager

1. Start Partner Manager. From the Start menu, select Programs → IBMWebSphere Transformation Extender n.n → Trading Manager → PartnerManager.

2. Click on the Utilities icon in the Partner Manager tool bar.

3. On the Utilities navigator, click Database Settings. The Partner ManagerDatabase Selection dialog appears.

4. Select Microsoft Access from Database Vendor drop-down list as shown below.5. Select TradingManagerTutorial from the DSN drop-down menu.

6. Click OK.

7. Partner Manager will restart to activate the new database.

Websphere Transformation Extender Partner Manager Tutorial- Define ODBC Data Source

Trading Manager uses a relational database to store information about tradingpartners, routing instructions, access privileges, document tracking and tradingrelationships. A sample Microsoft Access database is included with the PartnerManager installation.

1. From the Windows Start menu, select Settings → Control Panel →Administrative Tools → Data Sources ODBC.The ODBC Data Source Administrator dialog opens.

2. Select the System DSN tab, and then click the Add button.The Create New Data Source dialog opens.

3. Select Microsoft Access Driver (*.mdb) from the list box, and then click Finish.The ODBC Microsoft Access Setup dialog opens.

4. In the Data Source Name field, enter the following information:TradingManagerTutorial5. Click Select.The Select Database dialog opens.

6. Navigate to C:\install_dir\<tmgr_vn.n\pmgr and select the tmgrnn.mdb file.

7. Click OK.The Select Database dialog closes. The new entry, TradingManagerTutorial, isnow displayed in the ODBC Data Source Administration dialog in the SystemData Sources list box.

8. Click OK.The ODBC Data Source Administrator dialog closes and the System DataSource Name is defined.

Websphere Transformation Extender with Websphere MQ

How do you set a input or Output Card to post the transformed or incoming file to a Websphere MQ queue?

This will show how WTX can GET or PUT a untransformed or transformed input or output to a MQ queue.

Step 1: Open up WTX Design Studio and create a Transformation map with input and output card.

Step 2:  Specify the Map Location for the WTX input or output card (depending if you want the message to come from MQ or to put a transformed data to an MQ queue)

Step 3: Select the source to be Websphere MQ (server) and specify the Queue Manager name and Queue you want to place or put the message:

-QMN YOUR_QUEUE_MANAGER_NAME -QN YOUR_QUEUE_NAME

Test this by putting a message on that queue and running the transformation map.

Websphere Transformation Extender Launcher Monitor and Management Console

After you have created your WTX Launcher project as seen in the previous post you can get more information on your transformation in the Management Console in a text based interface and Launcher Monitor in a graphical interface.

Setup the Management Console setup:

1. Open the Management Console and Click on Launcher New, complete the following fields:

– Launcher Name :  a descriptive name for your Launcher.

– Host name: host name where your WTX launcher is running

– Login Name: the name of the Access User you created in the WTX Launcher Administration (make sure that the user has Granted access)

– Password: password for the User

2. Right click on the new Launcher you have created and click -> Connect

This is the information after I have completed 21 transformations

There is more information that can be retrieved looking at the Status, History and Configuration tabs.

Setup the Launcher Monitor

1. Open the Launcher Monitor click on Options->Select Launcher

2. Select the Appropriate Launcher by Name

3. Provide the Login Username and Password as specified in the Management Console.

4. Click on Connect to verify that the connection is valid and it will show the System Name and System File Name.

5. Click on OK and the following view can be seen as maps are being transformed.

So the small red dots show unsuccessful maps and green dots show successful maps transformed.

You can set up different colours for: Map Warnings, Map Error, Map Success and Map in Progress.

Websphere Transformation Extender Launcher Tutorial

So how do you set up Websphere Transformation Extender Launcher to automatically transform incoming files with the correct transformation map en produce an output map. With this the launcher also comes with the Launcher Management Console which provides you detailed information on the status of transformed files. The Launcher Monitor provides you a graphical interface of your transformed maps. I will show how they all are used and how they can provide you with almost any level of detail on transformations in your enterprise.

Below is the steps to configure Websphere Transformation Extender Launcher:

1. Open Integration Flow Designer.

2. Click on the purple circle icon and drag it onto the pallet. It will ask to navigate to a .mms file, that is a map file already create in WTX Design Studio.

3. Double click on the newly imported .mms map to see the input and output cards respectively.

4. Confirm that the map executes without errors click on System -> Build Maps

5. If no errors occurred click on System->Deploy-> Definitions
6. Double click on ‘Generate and Transfer Launcher Control File’ and save it to the following directory: C:/IBM/Websphere Transformation Extender 8.3/system

7. After you have set your system file location close the Definition window and click on System Deploy->THE_NAME_OF_YOUR_MAP

You will see the following message if the map was deployed successfully.

8. Click on Yes to see the deployed map, it mus look something like this:

Deploy Results for System LauncherTest (Version 8.3(23))
Script:   DeployTest
Date:     Wed Sep 15 12:29:37 2010
File:     C:\TXTest\Launcher.msd
Deploy has completed successfully.
Total # of errors:  0
Map Building:
Number of maps processed:    1
Number of successful builds:  1
Number of maps with errors:   0
Number of maps with warnings:   0
The following map built successfully:
C:\Documents and Settings\Administrator\My Documents\LauncherLab_Verify\FiletoFile.mms: FileTest
Launcher File Generated For: LauncherTest
Map File Transfers:
Copied C:\Documents and Settings\Administrator\My Documents\LauncherLab_Verify\FileTest.mmc to C:\TXTest\FileTest.mmc.
Launcher File Transfer:
Copied C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\SE5C.tmp to C:\IBM\WebSphere Transformation Extender 8.3\systems\LauncherTest.msl.

Deploy Results for System LauncherTest (Version 8.3(23))
Script:   DeployTest Date:     Wed Sep 15 12:29:37 2010 File:     C:\TXTest\Launcher.msd

Deploy has completed successfully.
Total # of errors:  0

Map Building:
Number of maps processed:    1
Number of successful builds:  1Number of maps with errors:   0Number of maps with warnings:   0

The following map built successfully:
C:\Documents and Settings\Administrator\My Documents\LauncherLab_Verify\FiletoFile.mms: FileTest

Launcher File Generated For: LauncherTest

Map File Transfers:
Copied C:\Documents and Settings\Administrator\My Documents\LauncherLab_Verify\FileTest.mmc to C:\TXTest\FileTest.mmc.
Launcher File Transfer:
Copied C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\SE5C.tmp to C:\IBM\WebSphere Transformation Extender 8.3\systems\LauncherTest.msl.

9. Open up WTX Launcher Administrator

10. Click on the Access Tab and create a new user which you Grant access to All systems.

11. Click on the Deployment Directory tab and confirm that the Directory path is the same as where you created you msl file.

12. Now you are ready to start WTX service in your Windows service registry

13. Navigate to the file from which you imported the mms file in Step 2. Copy and paste the input the folder to see the output being created automatically by the launcher.