STScI logoSTSDAS Help Pages
cqgnrecord "Catquery cqgnrecord

NAME · SYNOPSIS · ARGUMENTS · DESCRIPTION · NOTES · EXAMPLES
SEE_ALSO

NAME

cqgnrecord -- get the next record from the catalog results

SYNOPSIS

stat = cq_gnrecord (res, buf, maxch, nextrec)

pointer	res		# the results descriptor
char	buf		# the output record buffer
int	maxch		# the maximum size of the output record buffer
int	recno		# the next available record number 

ARGUMENTS

res
The results descriptor.
buf
The buffer containing the returned record.
maxch
The maximum size of the output buffer.
recptr
The next available record number. Recptr is updated after each call.

DESCRIPTION

Cq_gnrecord returns the requested record. Cq_grecord is an integer function which returns BOF, the number of characters in the record, or EOF as its function value.

NOTES

In most cases allocating a buffer size that is SZ_LINE chars long will be adequate to hold the output record. If the integer results parameter CQRECSIZE is defined, i.e. non-zero, then an output buffer CQRECSIZE chars long can be allocated.

EXAMPLES

pointer cq_query() int cq_gnrecord()

res = cq_query (cq) recno = 0 while (cq_gnrecord (res, record, SZ_LINE, recno) != EOF) { call printf ("%s") call pargstr (record) } call cq_rclose (res)

SEE ALSO

cqgrecord


Search Form · STSDAS

Maintained by the Science Software Group at STScI
This file last updated on 21 Mar 2000