<FLUSH>
Specifies whether or not to flush the following data to disk immediately:
- The results of any WRITE statement
- Data written to the message file
- Anything written to an output file
- Anything written to a sidefile
You may need to flush this data to disk immediately if you experience problems with a Windows batch file or a UNIX/Linux shell script called from a <STEP> tag. Problems with batch files and shell scripts can sometimes arise if the batch file or shell script attempts to access data that was created earlier in the Enrichment job but that has not yet been written to disk. (By default, the operating system temporarily caches the data in memory before writing it to disk.) In these cases, use the <FLUSH> tag to instruct Enrichment to immediately flush data to disk. This makes the data available for the batch file or shell script immediately. For example, you have a control file that contains the following:
<RULE>
<CONTENT>
START:
WRITE("copystuf.bat", "copy filea.txt fileb.txt"
...
DOCUMENT:
WRITE("filea.txt", "some interesting stuff")
...
</CONTENT>
</RULE>
...
<PRESORT>
<STEP> copystuf
...
This series of logic may sometimes fail because the files copystuf.bat and filea.txt files may not be physically written to disk when the <STEP> command executes. To fix this problem, use the <FLUSH> WRITE command to make these files available immediately.
Using the <FLUSH> tag will reduce performance because flushing data immediately to disk results in more disk activity.
Tag Group
Syntax
<FLUSH> functions
or
<FLUSH> ALL
| Parameter | Description | Default | |
|---|---|---|---|
| functions | Specifies what data to flush to disk immediately. One or more of the following delimited by blanks: | None | |
| WRITE | WRITE statements are immediately flushed to disk, rather than letting the operating system cache them. | ||
| MESSAGE | Anything written to the message file is immediately flushed to disk, rather than letting the operating system cache them. | ||
| OUTPUT | Anything written to an <OUTPUT> file is immediately flushed to disk, rather than letting the operating system cache them. | ||
| SIDEFILE | Anything written to a sidefile is immediately flushed to disk, rather than letting the operating system cache them. | ||
| ALL | All of the above data is immediately flushed to disk. | ||