Macro Language Reference > PIs > Text > <?logclose>
  
<?logclose>
Description
The <?logclose> command closes the specified log and prevents further writing to that log until it is reopened. Use the <?logopen> command to reopen the log if required.
 
Example 475. Log messages and display log content to the windows system
This example, using inline PIs, will write the words `hello' and 'world" to the log number 7 (LOG7), then display the content of LOG7 to a windows system pop up box:
The quick <?logwrite LOG7 hello> brown fox <?logwrite LOG7
world> jumps over a <?logopen LOG7 SYSTEM> lazy dog.
Putting an <?logclose> at the end of the line would close the log, thus preventing any more writing to it.
Syntax
<?logclose logspec:b>
logspec
The type of log or log instance to be closed.
SYSTEM
Writes to a predetermined SYSTEM display box.
ODS
Windows specific Output Display System messages.
There are 10 log instances where the log could be written:
LOG0
Log number 0 (default log location: BFOUT LOG0 SYSTEM)
LOG1
Log number 1 (default log location: BFERR LOG1 {@}serrlog.3at )
LOG2
Log number 2 (default log location: BFDBG LOG2 3B2 debug file, or BFERR if no debug file specified)
LOG3
Log number 3 (default log location: BFODS LOG3 ODS)
LOG4
Log number 4 (default log location: BFLOG LOG4 None)
LOG5
User Log number 5 (default log location: None)
LOG6
User Log number 6 (default log location: None)
LOG7
User Log number 7 (default log location: None)
LOG8
User Log number 8 (default log location: None)
LOG9
User Log number 9 (default log location: None)
Additional Information
The <?logclose> processing instruction is identical in function to its macro equivalent. Its purpose is to allow logs to be controlled within a formatting operation instead of through a script. The use of the processing instruction is completely interchangeable with the macro so, for example, it is possible to write to a log using the logwrite macro, and close it via the <?logclose> PI detailed here.
Related Links