lgtdb — Inquire attributes of dataset
subroutine lgtdb(handle,name,idiv,woffset,ndiv,ldiv,size) integer*4 handle integer*4 idiv integer*4 woffset integer*4 ndiv integer*4 ldiv integer*4 size subroutine lgtdb64(handle,name,idiv,woffset64,ndiv,ldiv,size) integer*4 handle integer*4 idiv integer*8 woffset64 integer*4 ndiv integer*4 ldiv integer*4 size
lgtdb
returns the size attributes of a
dataset described by name and sub-division index. It returns the
file offset, the dataset size, the number of sub-divisions, and the
length of a sub-division of the dataset described by its name. If
the set has no sub-divisions, number of sub-divisions is returned as
0, and the length of a sub-division is set to the set size. The
argument idiv
is ignored and remains for
compatibility with version 6. To get the dataset type, use
prpdb
.
lgtdb64
is equivalent to
lgtdb
, except that the file offset is returned
in an integer*8 variable. prdpdb64
also works
in a 32bit environment.
To check if a dataset exists on the database, make use of
inqsdb
.
Warning | |
---|---|
(1) For compatibility reasons with
MemCom 6, |
handle
Database handle (input). The file handle
handle
may not exceed the maximum number of
simultaneously open databases.
name
Name of dataset (input). The string may not exceed the maximum dataset name length.
idiv
Sub-division number (input). idiv
must be greater than or equal to 0.
woffset
File offset of dataset (output), expressed in number of integer*4 word units, the file offset count starting at 1. A value of -1 is returned if the set or the sub-set does not exist.
woffset64
File offset of dataset (output), expressed in number of integer*4 word units, the file offset count starting at 1. A value of -1 is returned if the set or the sub-set does not exist.
ndiv
Number of sub-divisions of the set (output). If the
dataset is sub-divided, ndiv
> 0 is
returned. Otherwise ndiv
= 0 is returned.
A value of 0 is returned if the dataset or the sub-set does
not exist.
ldiv
Size of a sub-division of the set (output). The size
is expressed in data elements, except for relational tables
(datasets of type $), where ldiv
is
expressed in integer*4 words. ldiv
is set
to size
if the set is not sub-divided. A
value of 0 is returned if the set or the sub-set does not
exist.
size
Total size of the set in data elements (output). The
size is expressed in data elements, except for relational
tables (datasets of type $), where size
is expressed in integer*4 words. A value of -1 is returned
if the dataset or the sub-set does not exist.