How do I use the API to code a delayed replication?

Created by Yves Pelletier on
coding example

The following link shows how to do it in C:

And this one how to do it in Perl:

Roughly speaking, the approach is:

1. create the template
2. create the dataset from the template
3. create a datasubset from the dataset
4. expand the datasubset (if necessary, such as the replication descriptor being buried in a Table C)
5. find the delayed replication descriptor in the datasubset
6. set the value of the replication descriptor to your replication $count
7. expand the datasubset (again). Note that if you didn't mess with anything else, the result of the previous
find will still be valid, and now there will be $count blank and expanded replicated elements just after that
8. set the values for the replicated descriptors.

Thanks to Chris Beauregard for providing the source material