Join wMUsers | Blog at wMUsers | User Control Panel | Site Map | webMethods Jobs |For Employers

Ed Aponasko -- webMethods Ezine Columnist

View Binary Objects in Transit



By Ed Aponasko

 


Introduction

For IBM mainframe-based integrations, webMethods developers must often FTP files from the IBM EBCDIC (Extended Binary-Coded Decimal Interchange Code) to a traditional ASCII flat file format.

Using standard FTP protocol, data is converted from ASCII to EBCDIC and back to ASCII. However, many mainframe files contain formats that are not representable in ASCII format. Some of these formats include:

  • Packed Decimal
  • Zoned Decimal
  • Signed
  • Binary

To workaround this mapping issue, therefore, developers must transmit the mainframe files using the FTP protocol's binary mode.

For example, in a Packed Decimal field, seven decimal digits and its sign are packed into four bytes. Any character-by-character EBCDIC to ASCII translation will corrupt these fields -- the original data will no longer be recoverable. Using binary format, this issue is avoided.

This webMethods Ezine article introduces HEXViewer, a tool giving developers the power to read, parse and translate the binary-formatted webMethods Object data type created by the binary FTP.


What is HEXViewer

HEXViewer is a freeware hexadecimal viewer designed for the webMethods Platform and requires at least Integration Server v4.6.

HEXViewer allows a developer to view the binary data of any Object or String field as if a common hex viewer were being used. Bytes are displayed as Hex characters; character data is displayed on the right. Starting positions of each row are displayed on the left.

Here is a brief output of the HEXViewer service showing the content of an IData object:

0000:  2D 2D 2D 20 66 69 65 6C 64 3A 30 3A 6F 70 74 69  --- field:0:opti
0010:  6F 6E 61 6C 20 41 42 52 56 57 2C 5B 36 34 5D 5B  onal ABRVW,[64][
0020:  69 5D 20 2D 2D 2D 20 66 69 65 6C 64 3A 30 3A 6F  i] --- field:0:o
0030:  70 74 69 6F 6E 61 6C 20 41 42 52 56 57 5F 42 45  ptional ABRVW_BE
0040:  5A 3A 6F 70 74 69 6F 6E 61 6C 20 4C 49 46 53 4B  Z:optional LIFSK
0050:  2C 5B 36 37 5D 5B 69 5D 20 2D 2D 2D 20 66 69 65  ,[67][i] --- fie
0060:  6C 64 3A 30 3A 6F 70 74 69 6F 6E 61 6C 20 4C 49  ld:0:optional LI
0070:  46 53 4B 5F 42 45 5A 2C 5B 36 38 5D 5B 69 5D 20  FSK_BEZ,[68][i]
0080:  2D 2D 42 54 4E 52 2C 5B 37 30 5D 5B 69 5D 20 2D  --BTNR,[70][i] -
0090:  2D 2D 20 66 69 65 6C 64 3A 30 3A 6F 70 74 69 6F  -- field:0:optio
00A0:  6E 61 6C 20 44 45 4C 43 4F 2C 5B 37 31 5D 5B 69  nal DELCO,[71][i
00B0:  5D 20 2D 2D 2D 20 66 69 65 6C 64 3A 30 3A 6F 70  ] --- field:0:op
00C0:  74 69 6F 5D 20 2D 2D 2D 20 66 69 65 6C 64 3A 30  tio] --- field:0
00D0:  3A 6F 70 74 69 6F 6E 61 6C 20 51 55 41 4C 46 2C  :optional QUALF,
00E0:  5B 37 34 5D 5B 69 5D 20 2D 2D 2D 20 66 69 65 6C  [74][i] --- fiel


Installing HEXViewer as an IS Package

Included with this article is the . The package includes Java code, Flow and shared code. Once installed, the package will resemble the following in Developer:


HEXViewer package structure

 

For debugging purposes, a developer can invoke bytesToHEXDump or stringToHEXDump at any time within a Flow. Map the binary-formatted, pipeline Object to the appropriate service's Service In variable and step into the service using F7.

By selecting the Result tab from the Developer GUI, the developer can view a well-formatted HEX dump of the Object content.

For example, the Result tab may resemble the following:


HEXViewer Results Tab

 


Wrapping Up

As a reminder, don't forget to disable (or delete) the HEXViewer services from your Flow when promoting to production environments. Your integrations will take an unnecessary performance hit.



[1]  

Go Deeper on the Subject: The wMUsers Discussion Forums


Ed Aponasko has over 14 years IT-related exerience. For last 5 years Ed working with EAI products such as webMethods B2B/Enterprise, BEA webLogic and IBM webSphere MQ. He has a strong Java programming experience as well as SAP ABAP/4, ALE and RFC. He has done several successful integration projects using Enterprise Application Integration.

Ed can be reached via email at .


Advertise at wMUsers






  Home | Join wMUsers | Discussion Forums | Knowledge Center | Jobs | Shareware | User Groups | Links |
Contact Us | Terms of Service | Privacy Policy

wMUsers is an independent organization and is not sponsored in any manner by Software AG.


© All Rights Reserved, 2001-2008.