Previous Topic: ENQUEUE()Next Topic: ILOGC()


ILOG()

This function returns information from an ILOG subfile.

Syntax

Form 1:

handle = ILOG(OBTAIN)

Form 2:

ILOG(POINT,handle,lognum,subfile,recnum,[direction])

Form 3:

record = ILOG(GET,handle)

Form 4:

ILOG(RELEASE,handle)

Parameters

handle

Numeric ID for an internal workspace. A handle must be obtained and then passed to the function with each subsequent call.

OBTAIN

Obtains a new value for the handle argument. This value must be passed to the function on each subsequent call.

POINT

Positions to a specific record.

lognum

ILOG file number, 0 through 99.

subfile

Subfile number within the ILOG file, 0 through 9.

recnum

Record number in the log to locate (POINT). Specify the relative number of the record, or specify FIRST for the first record, or LAST for the last record.

record

Returned record.

direction

Direction in which the subfile is read. Specify FORWARD or BACKWARD.

Default: FORWARD

GET

Retrieves a record. The results are placed in the ilog_ variables, as shown in the following section.

ELEASE

Releases the storage that is associated with handle. Automatically performed at IMOD task termination.

Variables Returned by the GET Argument

When an ILOG record is read (GET argument), the retrieved information is placed in a series of predefined REXX variables:

ilog_asid

ASID of the issuer of the WTO.

ilog_date

Date the message was issued, in yymmdd format.

ilog_jobid

Job ID of the issuer of the WTO.

ilog_jobnm

Job name of the issuer of the WTO.

ilog_raw

Unformatted ILOG record.

ilog_seg

Number of message lines in the ILOG record.

ilog_seq

Sequence number of a record.

ilog_sysid

GRS system name of the issuer of the WTO.

ilog_text.n

Individual line of text.

ilog_time

Time the message was issued, in hh.mm.ss format.

ilog_type

Record type set by ILOGR(). WTOs are recorded with type = 0.

Usage Notes

The ILOG() and ILOGG() functions handle records from the ILOG subfiles in different ways:

Function

Treats ILOG subfiles as...

Useful for...

ILOG()

Individual files. Specify the ILOG file number and the specific subfile you want to process.

Copying a single subfile for archiving purposes

ILOGG()

Parts of a single file in chronological order.

Searching for all occurrences of a particular message

To read an ILOG subfile

  1. Establish linkage to an ILOG by obtaining a handle.
  2. Specify with which record the retrieval is to begin and in what direction you want to read.
  3. Read the records sequentially or directly.
  4. Release the handle.

Return Codes

101 - 106

ARG n MISSING OR INVALID

121

END OF LOG

122

REQUESTED LOG NOT FOUND

123

INVALID FILE HANDLE

124

REQUESTED LOG NOT ACCESSIBLE

125

REQUESTED RECORD NOT IN LOG

Example

handle = ilog('obtain')         /* Get a new handle      */
result = ilog('point',handle,0,2,'last','backward')
                                /* Start at end          */
ilog('get',handle) == ''        /* Got the last record   */
ilog_asid          == '1D'      /* For example           */