The function put_buffer_in_document is always used in combination with the function open_buffer. These functions together save part of a result document to file while the saved part (as opposed to the put_in_document function) is also written to the result document.
This function will save all text from the location where the marker tag was registered upto the call to this function. Markers are registered using the function open_buffer.
put_buffer_in_document ( document_name;folder_name;overwrite_Y/N;
pagination_Y/N;process_includes_Y/N;marker_name )
The result of the function is type BOOL. The function yields TRUE if the result document could be written. The function yields FALSE if the file could not be written or if the function is not supported (ITP/Workstation)
The function put_buffer_in_document call has six parameters, separated by semicolons (;):
Note
This folder must exist.
open_buffer.The function put_buffer_in_document fails if one of the following conditions is met:
Calling the function put_buffer_in_document will remove the marker specified.
This function can only be used in combination with ITP/Server.
Example
BOOL ok2 := put_buffer_in_document( "document"; "folder"; "Y"; "Y"; "N" ; "example" )
In other words, part of the result text, starting with the marker "example", will be written to the file "document" that resides in the folder "folder". If the file already exists it will be overwritten. Pagination is not yet implemented; the parameter is ignored, and post-includes set with __INC will not be processed. After this, the marker 'example' is removed from the result document.