MemCom Reference Manual > MemCom (Old) Fortran77 API > Database Manager Functions > dss

Name

crssdb, dssdb, dssndb, dssrdb, dsskdb, dsstdb — Create set with sub-divisions

Synopsis

subroutine dssdb(handle,name,ndiv,ldiv,type,initval,status)
integer*4 handle
character*(*) name
integer*4 ndiv
integer*4 ldiv
character*4 type
integer*4|integer*8|real*4|real*8 initval
integer*4 status

subroutine dssndb(handle,name,ndiv,ldiv,type,initval,status)
integer*4 handle
character*(*) name
integer*4 ndiv
integer*4 ldiv
character*4 type
integer*4|integer*8|real*4|real*8 initval
integer*4 status

subroutine dssrdb(handle,name,ndiv,ldiv,type,initval,status)
integer*4 handle
character*(*) name
integer*4 ndiv
integer*4 ldiv
character*4 type
integer*4|integer*8|real*4|real*8 initval
integer*4 status

subroutine dsskdb(handle,name,ndiv,ldiv,status)
integer*4 handle
character*(*) name
integer*4 ndiv
integer*4 ldiv
integer*4 status


subroutine dsstdb(handle,name,ndiv,ldiv,status)
integer*4 handle
character*(*) name
integer*4 ndiv
integer*4 ldiv
integer*4 status

Description

dssdb reserves space on the database for a numerical set with sub-divisions, i.e a set of type I, J, E, C, F, or Z, and it initializes the elements of the dataset with a constant value initval. The sub-divisions (sub-sets) are of constant size. Thus, the dataset is ndiv*ldiv data elements long. Datasets with sub-divisions can be accessed by specifying the sub-division index idiv (see putdb, getdb). If the sub-division index is activated (i.e idiv > 0), at most ldiv data elements of the sub-set can be accessed. If idiv is inactivated (i.e idiv = 0) the set will be accessed as a set without sub-divisions.

dssndb performs the same function as dssdb, but it does not abort if the set already exists and the existing ndiv is smaller or equal to the required ndiv and the existing ldiv is equal to the required ldiv. dssndb does not re-initialize the dataset with the preset value.

dssrdb performs the same function as dssndb, but it re-initializes the set with the preset value.

dsskdb reserves space on the database for a dataset of type K. The set is ndiv*ldiv characters long. The set may then be accessed by specifying the sub-division index idiv. If idiv > 0 is set, ldiv characters of the sub-division idiv are returned. If idiv = 0, an error is returned. Note that a data of type character cannot be preset. However, the strings are initialized to blank.

dsstdb defines a relational dataset with ndiv sub-divisions. The size of each table is nw integer*4 words (not bytes!). To define a relational dataset without sub-divisions, call the function restdb.

Parameters

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.

ndiv

Number of sub-sets (sub-records) to be created (input).

ldiv

Size of one sub-set of the set to be created (input). Note that the size of relational tables, i.e datasets of type $, is specified in integer*4 words (i.e 4 times less than the number of bytes) in order to maintain compatibility with version 6 of MemCom.

type

Dataset type of the set to be created (input).

initval

Preset value of a single element of the dataset (input). All elements of the dataset will be initialized to that preset value. Note that the preset value must correspond to the data type!

status

Status code returned (output). Upon successful completion of the operation, the status value 0 is returned. A negative value is returned, if an error has been detected. A positive value is returned, if a warning has been issued. See MemCom error codes.