HPlogo ALLBASE/SQL Reference Manual > Chapter 11 SQL Statements E - R

LOG COMMENT

MPE documents

Complete PDF
Table of Contents
Index

E0300 Edition 9 ♥
E0399 Edition 8
E0897 Edition 7

The LOG COMMENT statement permits the entry of comments into the ALLBASE/SQL DBELog file. These comments can be extracted using the Audit Tool.

Scope


ISQL or Application Programs

SQL Syntax



  LOG COMMENT {'String'
               :HostVariable
               :ProcedureParameter
               :ProcedureLocalVariable
               ?                       }

Parameters


String

specifies the comment as a constant character string (up to 3996 bytes)

HostVariable

specifies the comment to be logged as a host variable. No indicator may be specified. The data type of the host variable must be CHAR or VARCHAR. If the value is null, an error is returned and no comment is logged.

ProcedureParameter or ProcedureLocalVariable

specifies the comment to be logged as a procedure parameter or local variable. If the value is null, an error is returned and no comment is logged. The data type must be CHAR or VARCHAR.

?

specifies the comment to be logged as a dynamic parameter. The data type is assumed to be VARCHAR(3996). If the value is null, an error is returned and no comment is logged.

Description


  • The maximum length of a comment is 3996 bytes.

  • A comment can use the DBEnvironment language or the native language.

  • An error is returned if LOG COMMENT is used and audit logging is not enabled with the COMMENT audit element or the COMMENT PARTITION is NONE.

Authorization


Any user can issue this statement from within a database session.

Example


Generate a comment audit log record.

   LOG COMMENT 'Select From Table PurchDB.Parts';
   SELECT PartNo FROM PurchDB.Parts WHERE PartNo='1234';




LOCK TABLE


OPEN