LOG

LOG — which actions are logged to an external file and when

Synopsis

Content model

LOG ::=
EMPTY

Attributes

NameTypeDefaultDescription
whichEnumeration:
none
data
msg
qc
none

The value for this attribute is one or more (space-delimited) words from the enumerated list. Inclusion of a word in the attribute value indicates that the batch is interested in the action of this operation.

Edit checks operate in three distinct areas:

  • data - changes that are made to data field values
  • qc - addition/modification of queries to data fields by dfaddqc() and dfeditqc or missing page query operations by dfaddmpqc() and dfdelmpqc()
  • msg - messages that are generated by dfmessage(), dfwarning(), and dferror()

none is beneficial only when used on its own. Specifying another word in addition to none is the same as not specifying none at all. For example,

which="none msg"

is equal to

which="msg"

whenEnumeration:
all
changes
summary
NoneIf the value is all, every record, or edit check (in the case of LOG), every action is taken. If the value is changes, only those records which are changed, or edit checks (in the case of LOG) that cause a change, are actioned.
fileCDATANoneA relative or absolute pathname. For relative pathnames, the base directory is the same as the base directory of the input file. The pathname must be specified using UNIX file and directory naming semantics. If the pathname is not given, the processing system with create a pathname from:
  1. the base directory of the input file followed by

  2. the name of the batch, and terminated with

  3. the fixed suffix, _out.xml

The pathname specification can also include a sub-folder, the basic rule is, /STUDY_DIR/batch/sub-folder/xx_out.xml, which starts from absolute path, or sub-folder/xx_out.xml, which is a relative path. In both ways, the output file should be found in /STUDY_DIR/batch/sub-folder/xx_out.xml. The filename cannot contain ../ or /.. to alter the file path. Doing this will lead to error.
shareEnumeration:
yes
no
NoneIs this file sharable (meaning readable and writable) with other members of the same group? If the attribute value is no, the file can be read and written by the creator only. If the attribute value is yes, the file can be read and written by the creator and others in the same group as the creator. If the attribute is not specified, the sharing is inherited from the user's environment. In UNIX, this is defined by the umask command.
modeEnumeration:
create
write
writeshould the file be created, (create), or (over)written, (write)? Generally, files will be created with write so that they can be subsequently overwritten when the batch is re-run. However, if a batch is only intended to be run once or you would like to ensure that the log file does not accidentally overwrite a log file from another batch that might have the same name, use create.
[Note]Note

The combination of attributes mode="create" and history="yes" has no semantic meaning as it will never be possible to preserve the history of a log file that can only be created once.

historyEnumeration:
yes
no
NoneShould the log file mark those entries that were generated by a previous execution, yes, or should all entries be marked equally, no, as though they were all created by the current execution.

Description

Parents

These elements contain LOG: ACTION.

Children

The following elements occur in LOG: None.

Examples

Example 6.41. Log all records that have had data values changed, messages generated, or queries added or deleted

<LOG
        when="all"
        which="data msg qc"
/>

Example 6.42. Log records which have had data values changed or messages generated to an output file in a subfolder

<LOG
        when="all"
        which="data msg"
    file="test/example_out.xml"
/>

or

<LOG
        when="all"
        which="data msg"
    file="/STUDY_DIR/batch/test/example_out.xml"
/>

The output file should be found in /STUDY_DIR/batch/test/example_out.xml