MemCom Reference Manual > MemCom ftn Fortran API > Database Manager (DB) > mcf_db_get_set

Name

mcf_db_get_set — Read data from database file (Fortran API)

Synopsis

subroutine mcf_db_get_set(handle,name,size,
                          buffer,lbuffer,status)

subroutine mcf_db_get_set_char(handle,name,
                               buffer,lbuffer,status)


subroutine mcf_db_get_subset(handle,name,idiv,size,
                             buffer,lbuffer,status)

subroutine mcf_db_get_subset_char(handle,name,idiv,
                                  buffer,lbuffer,status)

integer*4 handle
character*(*) name
integer*8 idiv
integer*8 size
xxx buffer(lbuffer)
integer*8 lbuffer
integer*4 status

Description

mcf_db_get_set reads at most size data elements of type I, J, E, F, C, Z from the dataset name residing on the database file handle to the user buffer buffer. mcf_db_get_subset reads at most size data elements of type I, J, E, F, C, Z from a subset of the dataset name residing on the database file handle to the user buffer buffer. It is the calling function's responsibilty to declare the correct data type for buffer.

mcf_db_get_set_char reads the complete string from the dataset name residing on the database file handle to the user character string buffer. mcf_db_get_subset_char reads the complete string from a subset of the dataset name residing on the database file handle to the user character string buffer.

If the dataset type of the dataset name is not equal to the requested data type an error is flagged, .e. these functions do not convert data.

[Note]Note

In contrast to the old Fortran f77 API the mcf_db_get_set functions do not pass the dataset type! Data are copied to data buffer according to the data type on the database.

Parameters

handle

Handle of database file on which the set resides (input).

name

Name of dataset to be read from the database file (input). The string may not exceed the maximum dataset name length.

size

Number of data elements to be read (input).

buffer

Data buffer to which data are transferred (input). The data type of the data buffer must correspond to the expected data type.

lbuffer

Logical size of data buffer (input).

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.