Updated information about YAZ.
[yaz-moved-to-github.git] / zutil / diagbib1.c
1 /*
2  * Copyright (c) 1995-1997, Index Data
3  * See the file LICENSE for details.
4  * Sebastian Hammer, Adam Dickmeiss
5  *
6  * $Log: diagbib1.c,v $
7  * Revision 1.2  1999-11-30 13:47:12  adam
8  * Improved installation. Moved header files to include/yaz.
9  *
10  * Revision 1.1  1999/06/08 10:10:16  adam
11  * New sub directory zutil. Moved YAZ Compiler to be part of YAZ tree.
12  *
13  * Revision 1.7  1997/09/29 07:22:26  adam
14  * Added static modifier to msg_tab.
15  *
16  * Revision 1.6  1997/07/01 14:15:10  adam
17  * Added new BIB-1 diagnostic messages.
18  *
19  * Revision 1.5  1996/01/02 13:57:30  adam
20  * Added error messages.
21  *
22  * Revision 1.4  1995/09/29  17:11:52  quinn
23  * Smallish
24  *
25  * Revision 1.3  1995/09/27  15:02:39  quinn
26  * Modified function heads & prototypes.
27  *
28  * Revision 1.2  1995/05/16  08:50:21  quinn
29  * License, documentation, and memory fixes
30  *
31  * Revision 1.1  1995/03/15  13:46:09  adam
32  * New function diagbib1_str.
33  *
34  */
35
36 #include <stdio.h>
37
38 #include <yaz/diagbib1.h>
39
40 static struct {
41     int code;
42     char *msg;
43 } msg_tab[] = {
44 { 1, "Permanent system error" },
45 { 2, "Temporary system error" },
46 { 3, "Unsupported search" },
47 { 4, "Terms only exclusion (stop) words" },
48 { 5, "Too many argument words" },
49 { 6, "Too many boolean operators" },
50 { 7, "Too many truncated words" },
51 { 8, "Too many incomplete subfields" },
52 { 9, "Truncated words too short" },
53 { 10, "Invalid format for record number (search term)" },
54 { 11, "Too many characters in search statement" },
55 { 12, "Too many records retrieved" },
56 { 13, "Present request out of range" },
57 { 14, "System error in presenting records" },
58 { 15, "Record no authorized to be sent intersystem" },
59 { 16, "Record exceeds Preferred-message-size" },
60 { 17, "Record exceeds Maximum-record-size" },
61 { 18, "Result set not supported as a search term" },
62 { 19, "Only single result set as search term supported" },
63 { 20, "Only ANDing of a single result set as search term supported" },
64 { 21, "Result set exists and replace indicator off" },
65 { 22, "Result set naming not supported" },
66 { 23, "Combination of specified databases not supported" },
67 { 24, "Element set names not supported" },
68 { 25, "Specified element set name not valid for specified database" },
69 { 26, "Only a single element set name supported" },
70 { 27, "Result set no longer exists - unilaterally deleted by target" },
71 { 28, "Result set is in use" },
72 { 29, "One of the specified databases is locked" },
73 { 30, "Specified result set does not exist" },
74 { 31, "Resources exhausted - no results available" },
75 { 32, "Resources exhausted - unpredictable partial results available" },
76 { 33, "Resources exhausted - valid subset of results available" },
77 { 100, "Unspecified error" },
78 { 101, "Access-control failure" },
79 { 102, "Security challenge required but could not be issued -"
80 " request terminated" },
81 { 103, "Security challenge required but could not be issued -"
82 " record not included" },
83 { 104, "Security challenge failed - record not included" },
84 { 105, "Terminated by negative continue response" },
85 { 106, "No abstract syntaxes agreed to for this record" },
86 { 107, "Query type not supported" },
87 { 108, "Malformed query" },
88 { 109, "Database unavailable" },
89 { 110, "Operator unsupported" },
90 { 111, "Too many databases specified" },
91 { 112, "Too many result sets created" },
92 { 113, "Unsupported attribute type" },
93 { 114, "Unsupported Use attribute" },
94 { 115, "Unsupported value for Use attribute" },
95 { 116, "Use attribute required but not supplied" },
96 { 117, "Unsupported Relation attribute" },
97 { 118, "Unsupported Structure attribute" },
98 { 119, "Unsupported Position attribute" },
99 { 120, "Unsupported Truncation attribute" },
100 { 121, "Unsupported Attribute Set" },
101 { 122, "Unsupported Completeness attribute" },
102 { 123, "Unsupported attribute combination" },
103 { 124, "Unsupported coded value for term" },
104 { 125, "Malformed search term" },
105 { 126, "Illegal term value for attribute" },
106 { 127, "Unparsable format for un-normalized value" },
107 { 128, "Illegal result set name" },
108 { 129, "Proximity search of sets not supported" },
109 { 130, "Illegal result set in proximity search" },
110 { 131, "Unsupported proximity relation" },
111 { 132, "Unsupported proximity unit code" },
112 { 201, "Proximity not supported with this attribute combination" },
113 { 202, "Unsupported distance for proximity" },
114 { 203, "Ordered flag not supported for proximity" },
115 { 205, "Only zero step size supported for Scan" },
116 { 206, "Specified step size not supported for Scan" },
117 { 207, "Cannot sort according to sequence" },
118 { 208, "No result set name supplied on Sort" },
119 { 209, "Generic sort not supported (database-specific sort only supported)" },
120 { 210, "Database specific sort not supported" },
121 { 211, "Too many sort keys" },
122 { 212, "Duplicate sort keys" },
123 { 213, "Unsupported missing data action" },
124 { 214, "Illegal sort relation" },
125 { 215, "Illegal case value" },
126 { 216, "Illegal missing data action" },
127 { 217, "Segmentation: Cannot guarantee records will fit in specified segments"
128 },
129 { 218, "ES: Package name already in use" },
130 { 219, "ES: no such package, on modify/delete" },
131 { 220, "ES: quota exceeded" },
132 { 221, "ES: extended service type not supported" },
133 { 222, "ES: permission denied on ES - id not authorized" },
134 { 223, "ES: permission denied on ES - cannot modify or delete" },
135 { 224, "ES: immediate execution failed" },
136 { 225, "ES: immediate execution not supported for this service" },
137 { 226, "ES: immediate execution not supported for these parameters" },
138 { 227, "No data available in requested record syntax" },
139 { 228, "Scan: malformed scan" },
140 { 229, "Term type not supported" },
141 { 230, "Sort: too many input results" },
142 { 231, "Sort: incompatible record formats" },
143 { 232, "Scan: term list not supported" },
144 { 233, "Scan: unsupported value of position-in-response" },
145 { 234, "Too many index terms processed" },
146 { 235, "Database does not exist" },
147 { 236, "Access to specified database denied" },
148 { 237, "Sort: illegal sort" },
149 { 238, "Record not available in requested syntax" },
150 { 239, "Record syntax not supported" },
151 { 240, "Scan: Resources exhausted looking for satisfying terms" },
152 { 241, "Scan: Beginning or end of term list" },
153 { 242, "Segmentation: max-segment-size too small to segment record" },
154 { 243, "Present:  additional-ranges parameter not supported" },
155 { 244, "Present:  comp-spec parameter not supported" },
156 { 245, "Type-1 query: restriction ('resultAttr') operand not supported" },
157 { 246, "Type-1 query: 'complex' attributeValue not supported" },
158 { 247, "Type-1 query: 'attributeSet' as part of AttributeElement not supported" },
159 { 1001, "Malformed APDU"}, 
160 { 1002, "ES: EXTERNAL form of Item Order request not supported" },
161 { 1003, "ES: Result set item form of Item Order request not supported" },
162 { 1004, "ES: Extended services not supported unless access control is in effect" },
163 { 1005, "Response records in Search response not supported" },
164 { 1006, "Response records in Search response not possible for specified database (or database combination)" },
165 { 1007, "No Explain server. Addinfo: pointers to servers that have a surrogate Explain database for this server" },
166 { 1008, "ES: missing mandatory parameter for specified function. Addinfo: parameter" },
167 { 1009, "ES: Item Order, unsupported OID in itemRequest. Addinfo: OID" },
168 { 1010, "Init/AC: Bad Userid" },
169 { 1011, "Init/AC: Bad Userid and/or Password" },
170 { 1012, "Init/AC: No searches remaining (pre-purchased searches exhausted)" },
171 { 1013, "Init/AC: Incorrect interface type (specified id valid only when used with a particular access method or client)" },
172 { 1014, "Init/AC: Authentication System error" },
173 { 1015, "Init/AC: Maximum number of simultaneous sessions for Userid" },
174 { 1016, "Init/AC: Blocked network address"},
175 { 1017, "Init/AC: No databases available for specified userId"},
176 { 1018, "Init/AC: System temporarily out of resources"},
177 { 1019, "Init/AC: System not available due to maintenance (Addinfo: when it's expected back up)" },
178 { 1020, "Init/AC: System temporarily unavailable (Addinfo: when it's expected back up)"},
179 { 1021, "Init/AC: Account has expired"},
180 { 1022, "Init/AC: Password has expired so a new one must be supplied"},
181 { 1023, "Init/AC: Password has been changed by an administrator so a new one must be supplied"},
182 { 0, NULL} 
183 };
184
185 const char *diagbib1_str (int code)
186 {
187     int i;
188     for (i=0; msg_tab[i].msg; i++)
189         if (msg_tab[i].code == code)
190             return msg_tab[i].msg;
191     return "Unknown error";
192 }