Dbscatter()
From Recital Documentation Wiki
PURPOSE
split the record buffer into individual field buffers
SYNOPSIS
#include "dbl.h" int dbscatter(dbf, record, fldbuf) <input parameters> char *dbf; /* Database file descriptor */ char record[1000]; /* Record buffer */ char fldbuf[128][256]; /* Field buffers to fill */ <output parameters> none
RETURN VALUE
The dbscatter() function returns 0 for success. Refer to the section on return codes for a detailed list of return code definitions.
DESCRIPTION
The dbscatter() function "scatters" the specified record, retrieved with dbgetr() / dbgetrk(), into individual field buffers. The command is similar to the dbrecout() function with the exception that it requires fewer input parameters.
EXAMPLE
The following example "scatters" the record stored in 'char record[1000]' into the specified field buffers (fldbuf[128][256]).
#include "dbl.h" char *dbf; /* Database file descriptor */ char record[1000]; /* Record buffer */ char fldbuf[128][256]; /* Field buffers to fill */ rc = dbscatter(dbf, record, fldbuf); if ( rc != 0 ) { printf("Error scattering record; %d\n", rc); exit(1); } else { printf("Record scattered!\n"); }