%ISINFO
Return numeric ISAM file status and key information
WSupported on Windows
|
USupported on Unix
|
VSupported on OpenVMS
|
NSupported in Synergy .NET
|
info = %ISINFO(channel, request[, key][, segment])
or
xcall ISINFO(info, channel, request[, key][, segment])
Return value
info
The information that is specified by the request keyword. (n)
Arguments
channel
The channel number. (n)
request
One of the following keywords that specifies what information is to be returned. (See the Values Returned on OpenVMS for %ISINFO table for OpenVMS-specific information.) (a)
The record size. (n)
The number of records in the file. (n)
The number of keys for the file. (n)
The position of the start of the key or segment. (n)
The length of the key, including all segments. If the segment argument is specified, this value automatically becomes a SEGLENGTH value rather than a KEYLENGTH value. (n)
The number of key segments. (n)
One of the following key types:
“A” = Alpha
“N” = Nocase
“D” = Decimal
“I” = Integer
“U” = Unsigned
“S” = Sequence
“T” = Timestamp
“C” = CTimestamp
If no segment is specified, KTYPE returns the type of the first segment (which is the type of the key if the key is not segmented). (a)
The value of the index density for a key. (n)
One of the following values: (n)
1 = Duplicates
0 = No duplicates
One of the following values: (n)
1 = Modifiable
0 = Not modifiable
One of the following values: (n)
1 = Ascending
0 = Descending
If a key is segmented, ASCEND returns the value of the specified segment. (n)
One of the following values: (n)
1 = Duplicates at end
0 = Duplicates at front
The length of the key segment. (n)
The ISAM revision number of the file. (n)
The page size for the file. (n)
The depth of the specified key’s index. (n)
One of the following values: (n)
1 = File enabled for network encryption
0 = File not enabled for network encryption
key
(optional) The key the information is about: (n)
0 = Primary key (default)
1 = First alternate key
2 = Second alternate key
n = Any subsequent alternate keys
segment
(optional) The segment the information is about, where 1 is the first and default segment, 2 is the second segment, etc. (n)
Discussion
If request is SIZE, NUMRECS, NUMKEYS, REVISION, or PAGESIZE, both the key and segment arguments are ignored.
If request is KEYSEGMENTS, KEYDENSITY, DUPS, MODIFY, ATEND, or KEYDEPTH, the segment argument is ignored.
On OpenVMS, only the supported ISAM features are returned. The table below shows the values returned for %ISINFO.
Returned value |
|
---|---|
NUMRECS |
“09999999” |
KEYDENSITY |
The percentage that corresponds to the FDL attribute KEY INDEX_FILL |
ATEND |
1 |
REVISION |
The PROLOG version of the file |
PAGESIZE |
0 |
KEYDEPTH |
0 |
The following error conditions are possible:
- If a key or segment is invalid, an “Illegal key specified” error ($ERR_BADKEY) is generated.
- If the request option is invalid, an “Invalid option” error (INVOPT) is generated.
See also
%ISINFOA routine
.define RPTCHN ,1 .define ISMCHN ,2 record nkeys ,i4 nsegs ,i1 wopt ,a15 keynum ,i4 segnum ,i1 len ,i4 type ,a1 i ,i4 j ,i1 proc open(RPTCHN, o:s, "ismrpt.txt") open(ISMCHN, i:i, "myfile.ism") wopt = "NUMKEYS" xcall isinfo(nkeys, ISMCHN, wopt) for i from 0 thru (nkeys - 1) begin nsegs = %isinfo(ISMCHN, "KEYSEGMENTS", i) for j from 1 thru (nsegs) begin xcall isinfo(len, ISMCHN, "SEGLENGTH", i, j) xcall isinfoa(type, ISMCHN, "KTYPE", i, j) writes(RPTCHN, "Key:" + %string(i) + " Seg:" + %string(j) + & " Length=" + %string(len) + ", Type=" + type) end end close(RPTCHN) close(ISMCHN) end