Re: Need to generate a COBOL binary file

111 views
Skip to first unread message

Fady

unread,
Feb 20, 2013, 1:44:37 AM2/20/13
to legsta...@googlegroups.com
Hello Alex,

When you say binary file, are you saying the entire CSV becomes a single message in WebSphere queue2? Or does each line of the CSV become a different message in queue2?

Fady



On Tuesday, February 19, 2013 10:39:54 PM UTC+1, Alex wrote:
Hi!
I'm new to this subject.
As part of the pilot project, I need to use Mule ESB to:

1. Read CSV file from WebSphere MQ queue1
2. Map it to to a COBOL structure from copybook file
3. Generate COBOL bin file based on copybook file and put it on WebSphere MQ queue2

I installed the legstar Eclipse plug-in and generated transformers. But I'm not sure how I can generate binary file using this transformer in Mule Studio.

Any help will be appreciated.

Alex.

Alex

unread,
Feb 20, 2013, 5:11:27 PM2/20/13
to legsta...@googlegroups.com
Hi!
The entire content of the CSV file (up to 130 lines) is converted into a single WMQ message with binary data for a COBOL program. With LegStar I can use generated transformer classes to convert XML or Java into binary format. So, I'm looking for help with two steps:
1. Convert CSV to XML or Java
2. Some direction on using LegStar generated classes within Mule ESB to transform XML/Java to COBOL format

I'm trying to explore Mule ESB built-in transformation as much as I can. I see that there is no direct CSV -> Java or XML transformation that I can use out of the box. One option I found is described here:
http://forum.mulesoft.org/mulesoft/topics/_csv_file_to_xml_tranformer

Is it the only option?

Alex.

Andreas Fritz

unread,
Feb 21, 2013, 4:54:51 AM2/21/13
to legsta...@googlegroups.com
Hello Alex,

as I know there is no built-in CSV transformer in the Mule Community Edition.

In the Enterprise Edition of Mule you can use the Data Mapper to graphical map between CSV and Java and various other data types.

Andreas

Alex

unread,
Feb 21, 2013, 3:40:25 PM2/21/13
to legsta...@googlegroups.com
Thanks, Andreas!
I was able to do it in a two step process: CSV to Mapes, then Maps to XML. I feel that it is not the best way of doing transformation, but it works for now. I'll give Data Mapper a try.

What I need now is to be able to convert XML data to Cobol binary data and put it on WMQ. I generated transformers based on copybook data structure using Legstar. But I'm not sure if there is a provision in Mule ESB to build a custome transformer using generated classes.

Does anyone know how to do this?

Alex.

Andreas Fritz

unread,
Feb 21, 2013, 3:47:37 PM2/21/13
to legsta...@googlegroups.com
Have a look at this tutorial:

You can use the LegStar for Mule Eclipse Plugin to generate everything that you need.
After the last step you have a complete Mule flow that transforms from Java or XML to the copybook structure and calls the CICS program.

Andreas
Reply all
Reply to author
Forward
0 new messages