9 unsigned char buf[10000];
11 Z_APDU apdu, *papdu, *papdu2;
13 int a1, a2, a3, a4, a5, a6, a7, a8, a9, a10;
15 static char *names[] = {"Erik", "William", "George", "Bob"};
18 Odr_oid att[] = { 1, 2, 3, 4, 5, 6, -1};
19 Z_RPNStructure rpnstructure;
21 Z_AttributesPlusTerm apt;
25 apdu.which = Z_APDU_searchRequest;
26 apdu.u.searchRequest = &sreq;
27 a1 = 1000; sreq.smallSetUpperBound = &a1;
28 a2 = 2000; sreq.largeSetLowerBound = &a2;
29 a3 = 100; sreq.mediumSetPresentNumber = &a3;
30 rep = 1; sreq.replaceIndicator = &rep;
31 sreq.resultSetName = "FOOBAR";
32 sreq.num_databaseNames = 4;
33 sreq.databaseNames = names;
34 sreq.smallSetElementSetNames = 0;
35 sreq.mediumSetElementSetNames = 0;
36 sreq.preferredRecordSyntax = 0;
37 query.which = Z_Query_type_1;
38 query.u.type_1 = &rpnquery;
40 rpnquery.attributeSetId = att;
41 rpnquery.RPNStructure = &rpnstructure;
42 rpnstructure.which = Z_RPNStructure_simple;
43 rpnstructure.u.simple = &operand;
44 operand.which = Z_Operand_APT;
45 operand.u.attributesPlusTerm = &apt;
47 apt.attributeList = 0;
49 term.buf = (unsigned char*) "BARFOO";
50 term.len = term.size = strlen((char*)term.buf);
54 o.left = o.buflen = 10000;
55 o.direction = ODR_PRINT;
60 printf("status=%d\n", z_APDU(&o, &papdu, 0));
64 o.direction = ODR_DECODE;
67 z_APDU(&o, &papdu2, 0);