OpenTP1 Version 7 Programming Reference COBOL Language

[Contents][Index][Back][Next]

CBLDCJNL('UJPUT ') - Acquire a user journal

Format

PROCEDURE DIVISION specification

CALL  'CBLDCJNL'  USING  unique-name-1  unique-name-2

DATA DIVISION specification

01  unique-name-1.
    02  data-name-A    PIC X(8) VALUE 'UJPUT   '.
    02  data-name-B    PIC X(5).
    02  FILLER        PIC X(3).
    02  data-name-Z    PIC S9(9) COMP VALUE ZERO.
01  unique-name-2.
    02  data-name-C    PIC 9(9) COMP.
    02  data-name-D    PIC 9(9) COMP.
    02  data-name-E    PIC X(n).

Description

CBLDCJNL('UJPUT ') acquires a user journal (UJ), which is UAP historical information, into the system journal file (system_jnl_file). The unit of UJ acquired by CBLDCJNL('UJPUT ') once is called a UJ record.

A user journal is not output to the system journal file immediately after CBLDCJNL('UJPUT ') is called. The UJ record is output to the system journal file when the journal buffer becomes full or when the transaction processing is committed.

CBLDCJNL('UJPUT ') can be called only after CBLDCRPC('OPEN ') has been called and before CBLDCRPC('CLOSE ') is called. Even if an error occurs in the transaction processing that called CBLDCJNL('UJPUT '), the UJ record that has already been output cannot be invalidated through rollback processing (partial recovery). Even when rollback processing is executed for the transaction processing that called CBLDCJNL('UJPUT '), the UJ record is output to the system journal file.

Data areas whose values are set in the UAP

data-name-A

Specify VALUE 'UJPUT[Figure]' for the request code indicating user journal acquisition.

data-name-Z

Using one of the following values, specify whether to output the UJ record to the system journal file at acquisition of the UJ record.

1: Output the UJ record to the system journal file at acquisition of the UJ record. If the UJ record is acquired inside the transaction, this setting is ignored.

0: Do not output the UJ record to the system journal file at acquisition of the UJ record.

data-name-C

Specify the length of the UJ to be acquired. The specified length must be in the range from 1 to (the value specified for the jnl_max_datasize operand of the system journal file service definition at the acquisition destination - 8).

data-name-D

Specify a value from 0 to 255 as a UJ code.

data-name-E

Specify the UJ data to be acquired. The length of valid data as UJ can be up to the length specified for data-name-C.

Data area to which a value is returned from OpenTP1

data-name-B

A status code of 5 digits is returned.

Status codes

Status code Explanation
00000 Normal termination.
01101 The value specified for the data-name is invalid.
This error also occurs if the request code (data-name-A) is invalid.
01102 The value specified for the length of user journal (data-name-C) is 0 or less.
01103 The value specified for the length of user journal (data-name-C) exceeds the limit.
01105 The CBLDCRPC('OPEN ') function has not been called. Or, the CBLDCJNL('UJPUT ') function cannot be used because the execution environment of the applicable system is in the journal fileless mode.

Note

A UJ record that is outside the transaction is output to the system journal file when the journal buffer becomes full or when a transaction of another application terminates normally (when the transaction processing is committed). To acquire the UJ record using an application that does not generate transactions, call CBLDCJNL('UJPUT ') in which 1 is set for data-name-Z at the appropriate timing.