how to use ffIterator in converToValues() service.

Hello All,

I am using following flat file schema:-

(top level record) occurance is once
<gl_acc> (sub record) occurance is multiple times
(field in subrecord)
(field in subrecord)
(field in subrecord)
(field in subrecord)
(field in subrecord)
(composite record)
(field in composite record)
(field in composite record)
(another sub record under )
(field under header recoed)
(field under header recoed)

I have the above mentioned flat file schema.
i want to process it by ffIterator. So plz can anyone tell me that how i can do this. How should i use convertToValues() service?

Plz reply soon.

Thanks and Regards
sunny</GL_Acc>

Hi Sunny,

You can set the iterator variable in the pub.flatFile:convertToValues service to true to process top level records (children of the document root) in the flat file schema one at a time.

After all child records of the top level record are parsed, the pub.flatFile:convertToValues service returns and the iterator moves to the top level of the next record in the schema, until all records are parsed.

This parsing should be done in a flow service using a REPEAT step where each time the pub.flatFile:convertToValues service returns, the results are mapped and dropped from the pipeline to conserve memory. If the results were kept in the pipeline, out–of–memory errors might occur.

The pub.flatFile:converToValues service generates an output object (ffIterator variable) that encapsulates and keeps track of the input records during processing.

When all input data has been parsed, this object becomes null. When the ffIterator variable is null, you should use an EXIT step to exit from the REPEAT step and discontinue processing.

Regards,
Yasmin