Product Documentation

FairCom ISAM for C

Previous Topic

Next Topic

GetDODA

Retrieve information from a record schema stored as a resource.

Short Name

GETDODA()

Type

Low-Level data file resource function

Declaration

VRLEN GetDODA(FILNO datno, LONG bufsiz, pVOID bufptr, COUNT mode)

Description

In V12 the file number typedef was formally changed from COUNT, a two-byte value to FILNO, a four-byte value. Refer to this link for compatibility details. Four Byte File Numbering

GetDODA() returns various forms of the records schema, if any are included in the data file as a resource, into the buffer pointed to by bufptr.

bufsiz specifies the length of the buffer. The value returned by GetDODA() is the actual length of the information requested. If bufsiz is too small, GetDODA() still returns the actual size, but no data is transferred into the buffer. Another call to GetDODA() with a proper size buffer is required.

mode indicates the form of the return information. mode may take on one of the following values.

Value

Symbolic Constant

Explanation

1

SCHEMA_MAP

Return the record schema map.

2

SCHEMA_NAMES

Return the record schema symbolic names.

3

SCHEMA_MAPandNAMES

Return the map and symbolic names.

4

SCHEMA_DODA

Return the info in the form of an array of DATOBJ’s (a DODA).

If SCHEMA_MAP is requested, a map, as described in Record Schemas, is returned in the buffer.

If SCHEMA_NAMES is requested only the names, in the form described in Record Schemas, are returned in the buffer.

If SCHEMA_MAPandNAMES is requested the buffer contains the schema map followed immediately by the schema name. The maplen member of the schema map is the offset from the beginning of the buffer to the names. See Record Schemas.

If SCHEMA_DODA is requested, the map and names are converted to the form of a DODA where the fadr member of the DATOBJ structure is filled with the offset of the field from the beginning of the record.

Return

In the event of an error, GetDODA() returns a zero value and uerr_cod is typically set to one of the following values:

Value

Symbolic Constant

Explanation

22

FNUM_ERR

datno out of range.

26

FACS_ERR

datno is not active.

116

IMOD_ERR

Invalid mode value.

401

RNON_ERR

Resources not enabled.

404

RBUF_ERR

bufsiz is too small, only bufsiz bytes have been read.

408

RNOT_ERR

No schema information exists.

438

DZRO_ERR

No schema information exists.

See FairCom DB Error Codes for a complete listing of valid FairCom DB error values.

See also

PutDODA()

TOCIndex