Use the ILOGG() function to return information from an ILOG file.
The ILOGG() function has this 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)
The ILOGG() function takes these arguments.
Numeric ID for an internal workspace. A handle must be obtained and then passed to the function with each subsequent call.
Obtains a new value for the handle argument. This value must be passed to the function on each subsequent call.
Positions to a specific record.
ILOG file number, 0 through 99.
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.
Returned record.
Direction in which the subfile is read. Specify FORWARD or BACKWARD.
Default: FORWARD
Retrieves a record. The results are placed in the ilog_ variables as shown in the following section.
Releases the storage associated with handle. This is automatically performed at IMOD task termination.
When an ILOG record is read (GET argument), the retrieved information is placed in a series of predefined REXX variables. The following table shows these variables and their use:
The ASID of the issuer of the WTO.
The date the message was issued, in yymmdd format.
The job ID of the issuer of the WTO.
The job name of the issuer of the WTO.
The unformatted ILOG record.
The number of message lines in the ILOG record.
ilog_seq
The sequence number of a record.
ilog_sysid
The GRS system name of the issuer of the WTO.
An individual line of text.
The time the message was issued, in hh.mm.ss format.
The record type set by ILOGR(). WTOs are recorded with type = 0.
ILOGG() differs from the ILOG() function in that all subfiles in the ILOG file are treated as one chronologically sequenced file. See the Administration Guide for an overview of ILOG files.
The ILOG() and ILOGG() functions handle records from ILOG subfiles in different ways, as explained in the following table:
|
Function |
Treats ILOG subfiles as... |
Useful for... |
|---|---|---|
|
ILOG() |
Individual files. You must therefore specify both 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
The ILOGG() function produces these return codes.
ARG n MISSING OR INVALID
END OF LOG
REQUESTED LOG NOT FOUND
INVALID FILE HANDLE
REQUESTED LOG NOT ACCESSIBLE
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'
| Copyright © 2012 CA. All rights reserved. | Tell Technical Publications how we can improve this information |