Use the ILOG() function to return information from an ILOG subfile.
The ILOG function has this 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)
The ILOG() function takes these arguments:
|
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 to position to, or FIRST or LAST. |
|
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 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. These variables and their use are listed next.
|
ilog_asid |
The ASID of the issuer of the WTO. |
|
ilog_date |
The date the message was issued, in yymmdd format. |
|
ilog_jobid |
The job ID of the issuer of the WTO. |
|
ilog_jobnm |
The job name of the issuer of the WTO. |
|
ilog_raw |
The unformatted ILOG record. |
|
ilog_seg |
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. |
|
ilog_text.n |
An individual line of text. |
|
ilog_time |
The time the message was issued, in hh.mm.ss format. |
|
ilog_type |
The record type set by ILOGR(). WTOs are recorded with type = 0. |
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 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 ILOG() function produces these 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 */
Use the ILOGC() function to return information from an ILOG subfile.
Syntax
The ILOG function has this syntax:
Form 1:
result = ILOGC(OPEN, lognum)
Form 2:
result = ILOGC(CLOSE, lognum)
Form 3:
status= ILOGC(STATUS, lognum)
Arguments
The ILOGC() function takes these arguments:
Opens the ILOG and prepares it for logging.
Closes the ILOG.
Request ILOG allocation status
ILOG file number, 0 through 99.
null, if successful. If not successful, an error text will be returned. See Return Codes for text
for STATUS request, the possible status that can be returned are:
ILOG specified by lognum is open.
ILOG specified by lognum is closed
ILOG specified by lognum is open. ILOG was defined in RUNPARMS as NOOPEN.
ILOG specified by lognum is closed. ILOG was defined in RUNPARMS as NOOPEN
ILOG specified by lognum is not defined to CA GSS.
Return Codes
The ILOGR() function produces these return codes:
ARG n MISSING OR INVALID
REQUESTED LOG NOT FOUND
REQUESTED LOG NOT ACCESSIBLE
REQUESTED LOG ALREADY OPEN/|CLOSED
REQUESTED LOG IN USE BY ANOTHER GSS
Usage Notes
By default ILOGs are opened by CA GSS during initialization and remain open until CA GSS is terminated. The initialization parameter NOOPEN in the ILOG statement can be used to delay the opening on the ILOG dataset. The dataset then can be opened by an ILOGC(OPEN,lognum) function call. The ILOGC(CLOSE,lognum) function call can be used on any open ILOG dataset, whether it was opened during initialization or by an ILOGC function call.
Example:
/* ILOG 55 was defined to GSS with the NOOPEN option */ result=ILOGC(‘OPEN’.55) /* open ilog 55 */ if result\='' then y=wto(result) /* if result is not null, WTO the error text */
| Copyright © 2011 CA. All rights reserved. | Tell Technical Publications how we can improve this information |