prpdb — Inquire attributes of dataset
subroutine prpdb(handle,name,idiv,iset,type,size,woffset) integer*4 handle character*(*) name integer*4 idiv integer*4 iset character*4 type integer*4 size integer*4 woffset subroutine prpdb64(handle,name,idiv,iset,type,size,woffset64) integer*4 handle character*(*) name integer*4 idiv integer*4 iset character*4 type integer*4 size integer*8 woffset64
prpdb
returns the type and size
attributes of a dataset name
. If the dataset does
not exist the word offset and the size are set to -1. To get the
sub-division index, make use of lgtdb
. To check
if a dataset exists on the database, make use of inqsdb
.
prpdb64
is equivalent to function as
prpdb
, except that the file offset is returned
in an integer*8 variable. prdpdb64
also works
in a 32bit environment.
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.
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.
iset
Dataset number on database (output). Dummy variable
for compatibility with earlier versions.
iset
is always set to 0 by
prpdb
.
type
Dataset type (output). type
must be
dimensioned to 4 characters. If the set or the sub-set does
not exist 4 'blank' characters are returned.
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.
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.