LOG call
The Log (LOG) call is used to send and write information to the IMS system log.
Format
Call Name | DB/DC | DBCTL | DCCTL | DB Batch | TM Batch |
---|---|---|---|---|---|
LOG | X | X | X | X | X |
Parameters
- i/o pcb
- Specifies the I/O PCB for the call. This parameter is an input and output parameter.
- aib
- Specifies the AIB for the call. This parameter is an input and
output parameter. These fields must be initialized in the AIB:
- AIBID
- Eye catcher. This 8-byte field must contain DFSAIBbb.
- AIBLEN
- AIB lengths. This field must contain the actual length of the AIB that the application program obtained.
- AIBRSNM1
- Resource name. This 8-byte, left-justified field must contain the PCB name, IOPCBbbb.
- AIBOALEN
- I/O area length. This field must contain the length of the I/O area specified in the call list.
- i/o area
- Specifies the area in your program that contains the record that
you want to write to the system log. This is an input parameter. This
record must follow the format shown in the following tables.
Table 1. Log record formats for COBOL, C, assembler, Pascal, and PL/I programs for the AIBTDLI, ASMTDLI, CBLTDLI, CEETDLI, CTDLI, and PASTDLI interfaces LL ZZ C Text 2 2 1 Variable Table 2. Log record formats for COBOL, C, assembler, Pascal, and PL/I programs for the PLITDLI interface LLLL ZZ C Text 4 2 1 Variable The fields must be:
- LL or LLLL
- Specifies a 2-byte field (or, for PL/I, a 4-byte-long field) to
contain the length of the record. The length of the record is equal
to LL + ZZ + C + text of the record. When you calculate the length
of the log record, you must account for all fields. The total length
you specify includes:
- 2 bytes for LL or LLLL. (For PL/I, include the length as 2, even though LLLL is a 4-byte field.)
- 2 bytes for the ZZ field.
- 1 byte for the C field.
- n bytes for the length of the record itself.
If you are using the PLITDLI interface, your program must define the length field as a binary fullword.
- ZZ
- Specifies a 2-byte field of binary zeros.
- C
- Specifies a 1-byte field containing a log code, which must be equal to or greater than X'A0'.
- Text
- Specifies any data to be logged.
Usage
An application program
can write a record to the system log by issuing the LOG
call.
When you issue the LOG
call, specify the I/O area
that contains the record you want written to the system log. You can
write any information to the log, and you can use different log codes
to distinguish between different types of information.
You
can issue the LOG
call:
- In a batch program, and the record is written to the IMS log
- In an online program in the DBCTL environment, and the record is written to the DBCTL log
- In the IMS DB/DC environment, and the record is written to the IMS log
Restrictions
The length of the I/O area (including all fields) cannot be larger than the logical record length (LRECL) for the system log data set, minus four bytes, or the I/O area specified in the IOASIZE keyword of the PSBGEN statement of the PSB.
For function shipping in the CICS® environment, the local and remote CICS must both be DBCTL.