HPlogo MPE/iX Intrinsics Reference Manual > Chapter 4 Command Definitions (ABORTSESS - FCLOSE)

BEGINLOG

MPE documents

Complete PDF
Table of Contents
Index

Edition 7 E0701 ♥
Edition 7 E0300
Edition 6 E0195

NM and CM callable.

Posts a special record to the user logging file to mark the beginning of a logical transaction. When BEGINLOG is called, the logging memory buffer is flushed to ensure that the record gets to the logging file. User logging (LG) or system supervisor (OP) capability is required.

Syntax



            I32    U16A  I16     I16   I16
  BEGINLOG (index, data, length, mode, logstatus)

Parameters


index

32-bit signed integer by reference (required)

Passes access information to the user logging system. This is the value returned in the index parameter of the OPENLOG intrinsic.

data

16-bit unsigned integer array (required)

Passes the information to be logged. A log record contains 128 half words where 119 are available for writing data. For the most efficient use of log file space, structure arrays with lengths in multiples of 119 half words.

length

16-bit signed integer by reference (required)

Passes the length of the data. A positive value indicates half words; a negative value indicates bytes. If the length is greater than 119 half words (or 238 bytes), the information in data is divided into two or more physical log records.

mode

16-bit signed integer by reference (required)

Passes a value indicating whether the logging process should suspend the process if it cannot complete the request for service immediately. If it is not possible to log the transaction and mode is set to nowait, the BEGINLOG intrinsic indicates, through logstatus, that it could not complete the request:

ValueMeaning
0Wait
1Nowait

logstatus

16-bit signed integer by reference (required)

Returns a value, indicating the success/failure of the intrinsic call:

ValueMeaning
0Successful
1Nowait mode requested, and user logging process is busy
2Parameter out of bounds
4Incorrect index parameter passed
5Incorrect mode parameter passed
9Error occurred while writing
12System out of disk space, user logging cannot proceed
14Invalid access
15End-of-file

Operation Notes


Use the data parameter of this intrinsic to post user data to the logging file. This use of BEGINLOG is similar to using the WRITELOG intrinsic, but also denotes the beginning of a logical transaction.

Related Information


Intrinsics BEGINLOG, CLOSELOG, ENDLOG, FLUSHLOG, LOGINFO, LOGSTATUS, OPENLOG, WRITELOG
Manuals User Logging Programmer's Guide




ASCII


BINARY