The input request container has the count of number of records passed in the input request array container. For each input record fetched, we have to query the table and if the record is found in the table, then we have to put it in the response array container.
The response array container is declared as an unbounded dynamic array.
We do not have the count of the output records until we process the final input record. For each input record, there may/maynot be an output record.
Please suggest if the below approach is ok to populate the dynamic response array container?
Do the below processing for each record fetched from the table...
1) Calculate the dynamic response array length for the fetched record
3) Populate the response array container
4) Put the response array container
I doubt if it is a good practice to use getmain and freemain frequently in a loop. Please let me know if there are other better ways to achieve this.