Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

LPUT Write to log file

You use the LPUT (log file PUT) call to write a record to the user log file. UTM prefixes this record with the current contents of the KB header. The maximum length of a record is defined at generation (MAX statement, LPUTLTH operand). The records in the log file are not in exactly the same sequence as the LPUT calls in the application.

Setting the 1st parameter (KDCS parameter area)

The table below shows the various options and the necessary entries in the KDCS parameter area.

Function of the call

Entries in the KDCS parameter area

KCOP

KCLA

Message area

Write to log file

"LPUT"

Length

Data to be logged

Setting the 2nd parameter

Here you enter the address of the message area from which openUTM is to read the data to be logged.

Setting the parameters

Field name in the KDCS parameter area

Contents

KCOP

"LPUT"

KCLA

Length in bytes

Message area



Data

KDCS call

1st parameter

2nd parameter

KDCS parameter area

Message area

C/C++ macro call

Macro names

Parameters

KDCS_LPUT

(nb,kcla)

openUTM return information

Field name in the KB return area

Contents

KCRCCC

Return code

KCRCDC

Internal return code

For the LPUT call you make the following entries in the KDCS parameter area:

KCOP

In the KCOP field, the LPUT operation code.

KCLA

In the KCLA field, the length of the data to be transferred in bytes. openUTM prefixes the length to the data record.

Message area

In the message area, you specify the data which you want to write to the user log file.

You specify the following for the KDCS call:

1st parameter

The address of the KDCS parameter area.

2nd parameter

The address of the message area from which UTM is to read the message. You enter the address of the message area even if you have entered the length 0 in KCLM.

Macro names

The use of C/C++ macro calls is described in detail in the section "C/C++ macro interface".

openUTM returns:

KCRCCC

in the KCRCCC field, the KDCS return code, see next section.

KCRCDC

in the KCRCDC field, the internal return code of openUTM (see the openUTM manual ”Messages, Debugging and Diagnostics”).

KDCS return codes in the KCRCCC field for the LPUT call

The following codes can be analyzed in the program:

000

Operation carried out.

01Z

Value specified in KCLA too large. It is shortened to the generated maximum length (LPUTLTH operand in the MAX statement).

40Z

System cannot perform the operation (generation error or system error, timeout), see KCRCDC.

43Z

Length entry in KCLA is invalid (e.g. negative).

47Z

Message area missing or cannot be accessed in the specified length.

An additional error code can be found in the dump:

71Z

INIT call missing in this program.

Features of the LPUT call

  • You can still roll back the LPUT operation prior to the next synchronization point.

  • The PEND ER/FR/RS and RSET calls roll back the LPUT operation.

The structure of the user log file is described on "User log file".