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