MemCom Reference Manual > MemCom ftn Fortran API > Relational Table Manager (TB) > mcf_tb_extract_u

Name

mcf_tb_extract_u — Extract data from relational table (Fortran API)

Synopsis

subroutine mcf_tb_extract_u(rt,key,type,size,buffer,status)
mcf_rtable rt
character*(*) key
character*(*) type
integer*4 size
void buffer(*)
integer*4 status

subroutine mcf_tb_extract_char_u(rt,key,cbuffer,status)
mcf_rtable rt
character*(*) key
character cbuffer*(*)
integer*4 status

Description

mcf_tb_extract_u extracts data of type I, J, E, F, C, Z from a table residing in the table buffer. mcf_tb_extract_char_u extracts character strings (data of type K). These functions perform the same operation as mcf_extract but issuing a warning rather than raising an error if key is not found.

Parameters

rt

Relational table identifier (input).

key

Data access keyword (input). The string may not exceed the maximum key name length.

type

Data type to be read (input). Must be one of I, J, E, F, C, Z.

size

Number of data elements of key to be extracted from the table (input, output). The first size data elements will be extracted from key. If size is set to 0, all elements of key are extracted. mcf_tb_extract returns the effective number of data elements read in size.

buffer

Buffer for storing the data elements to be extracted from the table (input). The buffer must correspond to the expected data type, i.e for I data mcf_i4, for J data mcf_i8, for E data mcf_r4, for F data mcf_r8, for C data mcf_c4, and for Z data mcf_c8. The character string buffer cbuffer will contain data of type K.

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 key has not been found.

Additional Information

The mcf_tb_extract_u subroutines do not check if the buffer cbuffer is large enough to store the information. It is up to the application to verify this: mcf_tb_get_key_att returns the size of key.