A DEFCONN HFS statement can be used in the rules language to route messages and records directly to an HFS file. Doing direct writes to an HFS file has several advantages over other message routing options:
- the writes can be performed from environments where I/O is not normally allowed. Note: the log records written to most other log file formats have to be passed through buffers in the DIF address space.
- and multiple tasks can be appending log records to the file at the same time
The following DEFCONN statement is an example of connecting a log file to perform direct I/O to an HFS file. Any records written to the ACCLOG DD statement will be appended to the “/u/tom/acclog” file. Note: If necessary, the file will be created on the first write request.
Note: The HFS file name is case sensitive.
DEFCONN ACCLOG HFS(/u/tom/acclog)
Viewing Log Records
The OEDIT and OBROWSE TSO commands can be used to examine log records in HFS log files. For viewing, you would typically use the OBROWSE command. If your ISPF environment does not have a menu selection to access to HFS files, you can browse a log file using the OBROWSE command from:
- the TSO READY prompt
- the ISPF command line (i.e., TSO OBROWSE /u/tom/acclog)
- the ISPF Command Shell (Option 6)
Clearing the log file
The HFS Log File can be cleared using OEDIT to delete the records in the file, or write a rule to sending the following record to the log:
$$$CLOSE CLEAR