Problems converting IS Document to fixedwidth file

I need to generate a fixedwidth flat file from the IS Document.
For that purpose i am using the ‘convertToString’ service from wmFlatfile package.
This service is working fine when converting the document to a delimited file but failing to make a fixed width format file.
It is returning the record appended to each other without carriage return separation for each record.I tried giving ‘\n’, ‘\n\r’,‘\r\n’ and all sorts of inputs.
Still its returning the same result without record separation.

Is there a way or it’s a bug?

If i understood your problem correctly then,

At first you need to create a new (FixedLength)FlatFileDictinary/Schema and based on this schema reference use the convertToString Service which will take care of the process by generating you the fixedlength string.

Regarding carriagereturn separation,select record delimiter=newline on the FlatFile schema editor.

For more understanding please follow the (ISFlatFileSchema userguide).


I appreciate your immediate response.
I did what ever you said.but no luck.I tried to give the delimiter for record …both at service level as well as at the shcema editor.Still the same result.

Sorry i have no clue as of now,please check the documentation and make sure the created Flatfile Schema is well defined along with delimiters…

If everything looks fine following with the procedure of creating Flatfile Schema, then try with using the convertToString Service located in WmEDI module.


try using pub.flatFile:converToString and not wm.b2b.edi:convertToString as there is a difference.
Also you shouldn’t be doing anything at the service level.
In the schema set the RecordParser to Fixed and the set your RecordLength below.

Let us know how that goes.

I solved the problem.
There is a bug with the convertToString in wmFlatFile package.

Genarally when you are referencing a delimited dictionary definition you will select the delimited radio button in the schema and when you had a fixed width dictionary you naturally select a fixed width radio button and give the fixed width record length.

But,this service is always calling the delimiter parser no matter whatever you select. This delimited parser is unable to parse the fixed length dictinary definition and unable to find the boundaries of that record.

So always select the delimiter radio button what ever format you may generate. Just make sure your dictionary definition is correct(fixed width/delimited).

So this way it worked for me by selecting the delimiter radio button in schema and… the dictionary is still the same as i intended(fixed width format).

Hope this solution helps you too!!

Thanks for the updating the bug.
I used the Delimited option only and not experienced the fixed/width option in my earlier work.