Pubstringpadrightpadleft taking too long Performance

We have a complex WM Record with several layers of Records underneath the parent Record. As an output for Mainframe this record has to be written out as file with specific lengths for each element in the Record. We are using padright & padleft for this purposes but this is taking almost 20 minutes to process a list of this record (size 200) to just do the padding. The server seems to have about 50% memory available while doing this padding. Any suggestions to improve this performance would be much appreciated.

What are you using to create the flat file? Using the EDI adapter or the FF adapter (in 6) can perform padding during the creation of the output string so you don’t have to do so during mapping.

Thanks for your response, well we are living a few years behind and are using plain B2B 4.0.2 without any adapters. Btw the padding is done as the last step after all the mapping, which (mapping) takes all of about 70 seconds. The padding step to format the output (file) of the record is taking about 18 minutes.

I installed a service patch form WM and it has resolved the issue. Btw my mapping was being done using padding functions as transformers within maps.

Which patch? Could you post the patch description?

Thanks for sharing the solution!!

I installed the service pack 2 for B2B 4.0.2. Supposedly there was an issue with using flow transformers for this B2B version. More details can be found in the readme file for this service pack.