Flat File Creation

I have a flat file with a proprietary format that I have to send as a confirmation message. It might be at rivial question but … how can I create the flat file ? And then what API should I use to send it ?

Thank you,

It depends on what wM server you’re using.

If Enterprise Server, use the File I/O adapter. It can parse and create flat files and has a variety of delivery mechanisms.

If Integration Server, the EDI adapter has general-purpose flat file capabilities. You use the standard services (HTTP, FTP, SMTP) within IS to deliver.

I’m using the Integration Server4.6. Can you give me more details about the methods I could use ? Is there a way to define a template like ( field1, 20 characters, value ‘xxxxx’ ) and then to pass this template to a web method and get at the other end a flat file ?

Thank you,

Yes. The EDI docs detail how to create the template. You can create delimited files or fixed-width field files.

You have a great number of options for moving the data to other machines. wM has a set of built-in services for sending docs via HTTP, FTP and SMTP. Refer to the IS Developer Guide.

Or, if you do not require the heavy-duty operations that the WmEDI package is desigend to handle, there are 24 built-in services for managing strings. Among the services are padRight, padLeft, makeString (which concatenates an array of strings, separating them with a delimiter of your choice), and length (which checks the string length).

I am confident that, whichever road you follow, you will find built-in services that can take care of your business problem.

If you have any more questions, be sure to ask.

Are you planning on posting the confirmation information via HTTP and then writing out that data to a flat file. Also, if this is the case, how are you planning on sending the confirmation back out? (i.e. ftp, http, smtp)

Still not clear about how I can create a positional flat file. Actually I don’t need the file, all I need is the string. The template file they talk about in documentation is used to create XML from EDI, I need something to create EDI ( or whatever flat file format I have ) from an XML file.

I would agree with Rob Eamon that EDI Docs will show in detail how to create and use the templates to create the Flat file structures with convertToString to convert to EDIString from the Record structure of XML document.

See Appendix A in the EDI User Guide for details about working with custom flat files. The section about FLRs (fixed-length records) appears to be what you’re after from what you’ve described.

Chapter 4 has a description of creating EDI docs (Converting IData Objects to EDI Documents).

Look over the samples. If you have any specific questions, feel free to post them!

Im pretty new to webmethods
can anyone help me to convert an edi to xml

Hi Srinivasa,

You should invoke wm.b2b.edi:convertToValues service and then invoke pub.xml:documentToXMLString service. You’ll need the EDI schema to the first service. All this in webMethods 6.


Hi Maldonado,

I will try to use the services and work with edi. Thanks for ur help.