aboutsummaryrefslogtreecommitdiff
path: root/pkg/xtools/catquery/doc/cqgnrecord.hlp
blob: 6fd9ab53284c02f283e6186b3742d37d537c2b22 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
.help cqgnrecord Mar00 "Catquery Package"
.ih
NAME
cqgnrecord -- get the next record from the catalog results
.ih
SYNOPSIS

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

.nf
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 
.fi
.ih
ARGUMENTS
.ls res    
The results descriptor.
.le
.ls buf
The buffer containing the returned record.
.le
.ls maxch
The maximum size of the output buffer.
.le
.ls recptr
The next available record number. Recptr is updated after each call.
.le
.ih
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.

.ih
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.

.ih
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)
.ih
SEE ALSO
cqgrecord
.endhelp