Previous Topic: ILOGC()Next Topic: ILOGR()


ILOGG()

This function returns information from an ILOG file.

Syntax

Form 1:

handle = ILOGG(OBTAIN)

Form 2:

ILOGG(POINT,handle,lognum,recnum,[direction])

Form 3:

record = ILOGG(GET,handle)

Form 4:

ILOGG(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.

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.

RELEASE

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.

How ILOGG() Differs from ILOG()

ILOGG() differs from the ILOG() function in that all subfiles in the ILOG file are treated as one chronologically sequenced file. For an ILOG file overview, see the administrating topics.

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 = ilogg('obtain')      /* Get a new handle      */
result = ilogg('point',handle,0,,'last','backward')
                              /* Start at end          */
ilogg('get',handle) == ''     /* Get the last record   */
ilog_asid == '1D'             /* For Example           */
ilog_jobnm == 'CUSTAPE'