/* This file is part of the YAZ toolkit. * Copyright (C) Index Data * See the file LICENSE for details. */ #include #include #include #include #include #include int main(int argc, char **argv) { int i; int same_target = 0; int no = argc-2; ZOOM_connection z[500]; /* allow at most 500 connections */ ZOOM_resultset r[500]; /* and result sets .. */ ZOOM_options o = ZOOM_options_create (); if (argc < 3) { fprintf (stderr, "usage:\n%s target1 target2 ... targetN query\n" "%s number target query\n", *argv, *argv); exit (1); } if (argc == 4 && yaz_isdigit(argv[1][0]) && !strchr(argv[1],'.')) { no = atoi(argv[1]); same_target = 1; } if (no > 500) no = 500; /* async mode */ ZOOM_options_set (o, "async", "1"); /* get first 10 records of result set (using piggyback) */ ZOOM_options_set (o, "count", "10"); ZOOM_options_set (o, "step", "5"); /* preferred record syntax */ ZOOM_options_set (o, "preferredRecordSyntax", "usmarc"); ZOOM_options_set (o, "elementSetName", "F"); /* connect to all */ for (i = 0; i