Pathmaker Programming Guide

Coding Custom Services
Creating Services and Servers
067868 Tandem Computers Incorporated 4–43
cc = ( lfread ( &control->file.employee_file,
&reply->employee_rec, sizeof reply->employee_rec));
if (cc != LFE_OK)
{
%INVOKE "evaluate-read-error"
return;
}
}
Example 7: lfseekkey statement for a Read Generic.
...
if ( lfseekkey ( &file,
(short) 'LN', <−− 'LN', the keytag is
case sensitive.
LFSK_GENERIC,
"Maxwell",
7,
NULL,
0,
20 ))
...
Example 8: lfseekkey statement for a Read Exact.
...
if ( lfseekkey ( &file,
(short) 0,
LFSK_EXACT,
"0010", <−− Record number.
4,
NULL,
0,
20 ))
...
Example 9: lfseekkey statement for a Read Approximate, beginning after a specific
record within a set of records.
...
if ( lfseekkey ( &file,
(short) 'LN', <−− 'LN', the keytag is
case sensitive.
LFSK_NEXTAPPROX,
"Maxwell ", <−− Full 20 characters.
20,
"0030",
4,
20 ))
...