openlog - UDM Command

Syntax

openlog log_file_path[append=yes|no]

Description

The openlog command opens a log file on disk for writing custom log information.


IBM i

The log file must be a LIB file system file; openlog does not support the HFS file system.

Windows

The log file is open shared so that other processes can read it from while it is still open by UDM.

z/OS

The log file must be allocated as part of the job. The log file name takes the format of dd:ddname.


Only one log file can be open at any one time in UDM. If the user issues an openlog command while a log file is open, the user receives an error. The user can explicitly close the open log file by issuing a closelog command; otherwise the log file will be closed automatically when the manager ends.


UNIX, Windows

An optional append parameter indicates whether or not an existing log file should be appended to.

  • If append is set to YES and the log file exists, any log statements written are appended to the end of that file.
  • If append is set to NO and the log file exists, the file is truncated to zero length as part of the open operation.
  • If append is set to either YES or NO, and the log file does not exist, it will be created.
  • If append is not included in an issued openlog command, the log file is opened as if append were set to NO.

Parameters

Parameter

Description

log_file_path

Pathname of the log file to open.

append=yes | no

Specification for whether or not to append log statements to an existing log file.

Examples

To open a log file under z/OS, execute:


To open a log file with an absolute path, execute:


To open a log file with a relative path, execute:


To open a log file so that new entries are appended to the end of the existing data in the file, execute: