%ISINFO

Return numeric ISAM file status and key information

WTSupported in traditional Synergy on Windows
WNSupported in Synergy .NET on Windows
USupported on UNIX
VSupported on OpenVMS
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)

"SIZE"

The record size. (n)

"NUMRECS"

The number of records in the file. (n)

"NUMKEYS"

The number of keys for the file. (n)

"KPOSITION"

The position of the start of the key or segment. (n)

"KEYLENGTH"

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)

"KEYSEGMENTS"

The number of key segments. (n)

"KTYPE"

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)

"KEYDENSITY"

The value of the index density for a key. (n)

"DUPS"

One of the following values: (n)

1 = Duplicates

0 = No duplicates

"MODIFY"

One of the following values: (n)

1 = Modifiable

0 = Not modifiable

"ASCEND"

One of the following values: (n)

1 = Ascending

0 = Descending

If a key is segmented, ASCEND returns the value of the specified segment. (n)

"ATEND"

One of the following values: (n)

1 = Duplicates at end

0 = Duplicates at front

The length of the key segment. (n)

"NULL"

One of the following values: (a)

"SHORT"

"REPLICATE" (the only value allowed on OpenVMS)

"NOREPLICATE"

"NONE"

"NULLVALUE"

A string containing the null value as defined in the VALUE_NULL ISAMC option. If there is no null value for the key, an error is generated. (a)

"REVISION"

The ISAM revision number of the file. (n)

"PAGESIZE"

The page size for the file. (n)

"KEYDEPTH"

The depth of the specified key’s index. (n)

"NETCRYPT"

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.

Values Returned on OpenVMS for %ISINFO

Keyword

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:

See also

%ISINFOA.

Examples

.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