Understanding Populating and Retrieving Document Data

This section provides guidelines for instantiating Document objects, and populating and retrieving document data from document message types.

Memory Management in Message Segments that Use Documents

Following these guidelines when populating or retrieving document data from message segments:

  • After your code to populate a segment, set the following statement to NULL:

    &DOC = null;

    Including this statement in your code releases the segment data from memory. If you do not include this statement in your code, data from all segments accumulates in memory.

  • Start each new segment processing section by setting the following statement to TRUE:

    &DOC = &MSG.GetDocument(true)

    Including this statement in your code guarantees that only one segment is in memory at a given time.