1Z39-50-APDU-1995 -- OID for this definition, assigned in OID.3.1, is {Z39-50 2 1}
2DEFINITIONS ::=
3BEGIN   -- Z39.50 Maintenance Agency Official Text for ANSI/NISO Z39.50-1995 - July 1995
4--
5EXPORTS OtherInformation, Term, AttributeSetId, AttributeList, AttributeElement, ElementSetName, SortElement, DatabaseName,
6CompSpec, Specification, Permissions, InternationalString, IntUnit, Unit, StringOrNumeric, Query, Records, ResultSetId,
7DefaultDiagFormat, DiagRec, Segment;
8--
9
10PDU ::= CHOICE{
11 initRequest        [20] IMPLICIT InitializeRequest,
12 initResponse      [21] IMPLICIT InitializeResponse,
13 searchRequest      [22] IMPLICIT SearchRequest,
14 searchResponse      [23] IMPLICIT SearchResponse,
15 presentRequest      [24] IMPLICIT PresentRequest,
16 presentResponse      [25] IMPLICIT PresentResponse,
17 deleteResultSetRequest    [26] IMPLICIT DeleteResultSetRequest,
18 deleteResultSetResponse    [27] IMPLICIT DeleteResultSetResponse,
19 accessControlRequest    [28] IMPLICIT AccessControlRequest,
20 accessControlResponse    [29] IMPLICIT AccessControlResponse,
21 resourceControlRequest         [30] IMPLICIT ResourceControlRequest,
22 resourceControlResponse    [31] IMPLICIT ResourceControlResponse,
23 triggerResourceControlRequest  [32] IMPLICIT TriggerResourceControlRequest,
24 resourceReportRequest          [33] IMPLICIT ResourceReportRequest,
25 resourceReportResponse    [34] IMPLICIT ResourceReportResponse,
26 scanRequest         [35] IMPLICIT ScanRequest,
27 scanResponse      [36] IMPLICIT ScanResponse,
28              -- [37] through [42] reserved
29 sortRequest        [43] IMPLICIT SortRequest,
30 sortResponse      [44] IMPLICIT SortResponse,
31 segmentRequest      [45] IMPLICIT Segment,
32 extendedServicesRequest    [46] IMPLICIT ExtendedServicesRequest,
33 extendedServicesResponse    [47] IMPLICIT ExtendedServicesResponse,
34 close          [48] IMPLICIT Close,
35 duplicateDetectionRequest      [49] IMPLICIT DuplicateDetectionRequest,
36 duplicateDetectionResponse     [50] IMPLICIT DuplicateDetectionResponse}
37
38
39-- Initialize APDUs
40--
41  InitializeRequest ::= SEQUENCE{
42  referenceId        ReferenceId OPTIONAL,
43  protocolVersion      ProtocolVersion,
44  options        Options,
45  preferredMessageSize  [5]  IMPLICIT INTEGER,
46   exceptionalRecordSize  [6]  IMPLICIT INTEGER,
47   idAuthentication    [7]    IdAuthentication OPTIONAL, -- see note below
48  implementationId    [110]  IMPLICIT InternationalString OPTIONAL,
49  implementationName  [111]  IMPLICIT InternationalString OPTIONAL,
50   implementationVersion  [112]  IMPLICIT InternationalString OPTIONAL,
51  userInformationField  [11]  EXTERNAL OPTIONAL,
52  otherInfo        OtherInformation OPTIONAL}
53--Note:
54-- For idAuthentication, the type ANY is retained for compatibility with earlier versions.
55-- For interoperability, the following is recommended:
56IdAuthentication ::=
57   CHOICE{
58      open   VisibleString,
59      idPass  SEQUENCE {
60      groupId  [0]  IMPLICIT InternationalString OPTIONAL,
61      userId   [1]  IMPLICIT InternationalString OPTIONAL,
62      password  [2]  IMPLICIT InternationalString OPTIONAL },
63      anonymous  NULL,
64      other    EXTERNAL
65   }
66-- May use access control formats for 'other'.  See Appendix 7 ACC.
67--
68  InitializeResponse ::= SEQUENCE{
69  referenceId        ReferenceId OPTIONAL,
70   protocolVersion                ProtocolVersion,
71  options              Options,
72  preferredMessageSize  [5]  IMPLICIT INTEGER,
73   exceptionalRecordSize  [6]  IMPLICIT INTEGER,
74  result        [12]  IMPLICIT BOOLEAN,    -- reject = FALSE; Accept = TRUE
75  implementationId    [110]  IMPLICIT InternationalString OPTIONAL,
76  implementationName  [111]  IMPLICIT InternationalString OPTIONAL,
77   implementationVersion  [112]  IMPLICIT InternationalString OPTIONAL,
78  userInformationField  [11]  EXTERNAL OPTIONAL,
79  otherInfo        OtherInformation OPTIONAL}
80-- Begin auxiliary definitions for Init PDUs
81  ProtocolVersion  ::=  [3]   IMPLICIT BIT STRING{
82    version-1      (0),       -- This bit should always be set, but does not
83              -- correspond to any Z39.50 version.
84    version-2      (1),              -- "Version 2 supported."
85              -- This bit should always be set.
86    version-3      (2)        -- "Version 3 supported."
87-- Values higher than 'version-3' should be ignored. Both the Initialize request and Initialize Response APDUs
88-- include a value string corresponding to the supported versions. The highest common version is selected
89-- for use. If there are no versions in common, "Result" in the Init Response should indicate "reject."
90-- Note: Versions 1 and 2 are identical. Systems supporting version 2 should indicate support for version
91-- 1 as well, for interoperability with systems that indicate support for version 1 only (e.g. ISO 10163-1991
92-- implementations).
93  }
94  Options  ::= [4] IMPLICIT BIT STRING{
95      search        (0),
96      present       (1),
97      delSet        (2),
98       resourceReport    (3),
99      triggerResourceCtrl    (4),
100      resourceCtrl       (5),
101      accessCtrl       (6),
102      scan         (7),
103      sort        (8),
104      -- (not used) (9),
105      extendedServices    (10),
106      level-1Segmentation    (11),
107      level-2Segmentation    (12),
108      concurrentOperations  (13),
109      namedResultSets    (14),
110      encapsulation    (15),
111      resultCount    (16),
112      negotiationModel (17),
113      duplicateDetection (18),
114      queryType104 (19),
115      pQESCorrection (20),
116      stringSchema (21)
117}
118-- end auxiliary definitions for Init PDUs
119
120
121--Search APDUs
122  SearchRequest ::= SEQUENCE{
123  referenceId          ReferenceId OPTIONAL,
124      smallSetUpperBound    [13]  IMPLICIT INTEGER,
125  largeSetLowerBound    [14]  IMPLICIT INTEGER,
126  mediumSetPresentNumber    [15]  IMPLICIT INTEGER,
127  replaceIndicator      [16]  IMPLICIT BOOLEAN,
128  resultSetName      [17]  IMPLICIT InternationalString,
129   databaseNames      [18]   IMPLICIT SEQUENCE OF DatabaseName,
130   smallSetElementSetNames    [100]  ElementSetNames OPTIONAL,
131    mediumSetElementSetNames  [101]  ElementSetNames OPTIONAL,
132  preferredRecordSyntax    [104]  IMPLICIT OBJECT IDENTIFIER OPTIONAL,
133  query          [21]  Query,
134    -- Following two parameters may be used only if version 3 is in force.
135   additionalSearchInfo    [203]  IMPLICIT OtherInformation OPTIONAL,
136  otherInfo          OtherInformation OPTIONAL}
137
138
139-- Query Definitions
140  Query  ::=  CHOICE{
141      type-0  [0]  ANY,
142        type-1    [1]  IMPLICIT RPNQuery,
143        type-2      [2]  OCTET STRING,
144        type-100  [100]  OCTET STRING,
145        type-101  [101]  IMPLICIT RPNQuery,
146       type-102  [102]  OCTET STRING,
147       type-104  [104]  IMPLICIT EXTERNAL
148}
149--
150-- Definitions for RPN query
151     RPNQuery ::= SEQUENCE{
152      attributeSet    AttributeSetId,
153      rpn      RPNStructure}
154--
155  RPNStructure ::= CHOICE{
156    op    [0] Operand,
157     rpnRpnOp  [1] IMPLICIT SEQUENCE{
158          rpn1    RPNStructure,
159                rpn2    RPNStructure,
160                op    Operator }}
161  Operand ::= CHOICE{
162    attrTerm  AttributesPlusTerm,
163    resultSet  ResultSetId,
164          -- If version 2 is in force:
165          --   - If query type is 1, one of the above two must be chosen;
166          --   - resultAttr (below) may be used only if query type is 101.
167    resultAttr  ResultSetPlusAttributes}
168
169  AttributesPlusTerm ::= [102] IMPLICIT SEQUENCE{
170         attributes  AttributeList,
171        term    Term}
172  ResultSetPlusAttributes ::= [214] IMPLICIT SEQUENCE{
173        resultSet  ResultSetId,
174        attributes  AttributeList}
175  AttributeList ::=    [44]  IMPLICIT SEQUENCE OF AttributeElement
176--
177  Term ::= CHOICE{
178    general      [45]  IMPLICIT OCTET STRING,
179              -- values below may be used only if version 3 is in force
180    numeric      [215]  IMPLICIT INTEGER,
181    characterString    [216]  IMPLICIT InternationalString,
182    oid        [217]  IMPLICIT OBJECT IDENTIFIER,
183    dateTime      [218]  IMPLICIT GeneralizedTime,
184    external      [219]  IMPLICIT EXTERNAL,
185    integerAndUnit    [220] IMPLICIT IntUnit,
186    null        [221] IMPLICIT NULL}
187
188  Operator ::= [46] CHOICE{
189         and    [0] IMPLICIT NULL,
190            or    [1] IMPLICIT NULL,
191                and-not  [2] IMPLICIT NULL,
192              -- If version 2 is in force:
193              --  - For query type 1, one of the above three must be chosen;
194              --  - prox (below) may be used only if query type is 101.
195        prox    [3] IMPLICIT ProximityOperator}
196  AttributeElement  ::=  SEQUENCE{
197    attributeSet    [1]    IMPLICIT AttributeSetId OPTIONAL,
198                -- Must be omitted if version 2 is in force.
199                -- If included, overrides value of attributeSet
200                -- in RPNQuery above, but only for this attribute.
201    attributeType  [120]  IMPLICIT INTEGER,
202    attributeValue    CHOICE{
203              numeric  [121]   IMPLICIT INTEGER,
204                  -- If version 2 is in force,
205                  -- Must select 'numeric' for attributeValue.
206
207      complex  [224] IMPLICIT SEQUENCE{
208               list      [1] IMPLICIT SEQUENCE OF StringOrNumeric,
209                    semanticAction  [2] IMPLICIT SEQUENCE OF INTEGER OPTIONAL}}}
210
211
212  ProximityOperator ::= SEQUENCE{
213    exclusion      [1] IMPLICIT BOOLEAN OPTIONAL,
214    distance      [2] IMPLICIT INTEGER,
215    ordered      [3] IMPLICIT BOOLEAN,
216    relationType      [4] IMPLICIT INTEGER{
217              lessThan      (1),
218              lessThanOrEqual    (2),
219              equal        (3),
220              greaterThanOrEqual    (4),
221              greaterThan      (5),
222              notEqual      (6)},
223    proximityUnitCode    [5] CHOICE{
224              known  [1] IMPLICIT KnownProximityUnit,
225              private  [2] IMPLICIT INTEGER}}
226--
227    KnownProximityUnit ::= INTEGER{
228          character  (1),
229          word     (2),
230          sentence   (3),
231          paragraph   (4),
232          section   (5),
233          chapter   (6),
234          document   (7),
235          element  (8),
236          subelement  (9),
237          elementType  (10),
238           byte    (11) -- Version 3 only
239          }
240-- End definitions for RPN Query
241
242
243SearchResponse ::= SEQUENCE{
244  referenceId        ReferenceId OPTIONAL,
245  resultCount       [23]  IMPLICIT INTEGER,
246  numberOfRecordsReturned  [24]  IMPLICIT INTEGER,
247  nextResultSetPosition  [25]  IMPLICIT INTEGER,
248  searchStatus      [22]  IMPLICIT BOOLEAN,
249  resultSetStatus    [26]  IMPLICIT INTEGER{
250              subset    (1),
251                 interim  (2),
252               none    (3),
253	       estimate(4)
254	       } OPTIONAL,
255  presentStatus        PresentStatus  OPTIONAL,
256    records        Records OPTIONAL,
257    -- Following two parameters may be used only if version 3 is in force.
258  additionalSearchInfo  [203]  IMPLICIT OtherInformation OPTIONAL,
259  otherInfo        OtherInformation OPTIONAL}
260--Retrieval APDUs
261  PresentRequest ::= SEQUENCE{
262  referenceId          ReferenceId OPTIONAL,
263      resultSetId          ResultSetId,
264  resultSetStartPoint      [30]  IMPLICIT INTEGER,
265  numberOfRecordsRequested  [29]  IMPLICIT INTEGER,
266  additionalRanges      [212]  IMPLICIT SEQUENCE OF Range OPTIONAL,
267      -- additionalRanges may be included only if version 3 is in force.
268  recordComposition      CHOICE{
269                simple  [19]         ElementSetNames,
270                -- must choose 'simple' if version 2 is in force
271                complex  [209]               IMPLICIT CompSpec} OPTIONAL,
272  preferredRecordSyntax    [104]  IMPLICIT OBJECT IDENTIFIER OPTIONAL,
273  maxSegmentCount      [204]  IMPLICIT INTEGER OPTIONAL, -- level 1 or 2
274  maxRecordSize      [206]  IMPLICIT INTEGER OPTIONAL, -- level 2 only
275  maxSegmentSize      [207]  IMPLICIT INTEGER OPTIONAL, -- level 2 only
276  otherInfo          OtherInformation OPTIONAL}
277--
278  Segment ::= SEQUENCE{
279      -- Segment PDU may only be used when version 3 is in force,
280      -- and only when segmentation is in effect.
281   referenceId          ReferenceId OPTIONAL,
282     numberOfRecordsReturned    [24]  IMPLICIT INTEGER,
283  segmentRecords      [0]  IMPLICIT SEQUENCE OF NamePlusRecord,
284  otherInfo          OtherInformation OPTIONAL}
285--
286  PresentResponse ::= SEQUENCE{
287  referenceId          ReferenceId OPTIONAL,
288  numberOfRecordsReturned    [24]  IMPLICIT INTEGER,
289   nextResultSetPosition    [25]  IMPLICIT INTEGER,
290    presentStatus          PresentStatus,
291  records          Records OPTIONAL,
292  otherInfo          OtherInformation OPTIONAL}
293-- begin auxiliary definitions for Search and Present APDUs
294
295-- begin definition of records
296  Records ::= CHOICE{
297  responseRecords      [28]  IMPLICIT SEQUENCE OF NamePlusRecord,
298  nonSurrogateDiagnostic     [130]  IMPLICIT DefaultDiagFormat,
299  multipleNonSurDiagnostics   [205]  IMPLICIT SEQUENCE OF DiagRec}
300--
301  NamePlusRecord  ::=  SEQUENCE{
302  name    [0] IMPLICIT DatabaseName OPTIONAL,
303  record  [1] CHOICE{
304        retrievalRecord        [1] EXTERNAL,
305        surrogateDiagnostic    [2] DiagRec,
306          -- Must select one of the above two, retrievalRecord or
307          -- surrogateDiagnostic, unless 'level 2 segmentation' is in effect.
308        startingFragment    [3] FragmentSyntax,
309        intermediateFragment  [4] FragmentSyntax,
310        finalFragment    [5] FragmentSyntax}}
311  FragmentSyntax ::= CHOICE{
312    externallyTagged    EXTERNAL,
313    notExternallyTagged  OCTET STRING}
314
315  DiagRec ::= CHOICE{
316      defaultFormat    DefaultDiagFormat,
317                -- Must choose defaultFormat if version 2 is in effect.
318      externallyDefined    EXTERNAL}
319
320  DefaultDiagFormat::= SEQUENCE{
321  diagnosticSetId  OBJECT IDENTIFIER,
322  condition    INTEGER,
323  addinfo      CHOICE{
324           v2Addinfo  VisibleString,  -- version 2
325           v3Addinfo  InternationalString  -- version 3
326            }}
327  -- end definition of records
328  Range  ::= SEQUENCE{
329    startingPosition    [1] IMPLICIT INTEGER,
330    numberOfRecords    [2] IMPLICIT INTEGER}
331--
332  ElementSetNames ::= CHOICE {
333    genericElementSetName  [0] IMPLICIT InternationalString,
334    databaseSpecific    [1] IMPLICIT SEQUENCE OF SEQUENCE{
335              dbName  DatabaseName,
336              esn    ElementSetName}}
337
338  PresentStatus   ::=    [27]  IMPLICIT INTEGER{
339                            success  (0),
340                             partial-1   (1),
341                              partial-2   (2),
342              partial-3   (3),
343                                      partial-4   (4),
344                               failure    (5)}
345
346-- begin definition of composition specification
347  CompSpec ::= SEQUENCE{
348  selectAlternativeSyntax  [1] IMPLICIT BOOLEAN,
349            -- See comment for recordSyntax, below.
350  generic             [2] IMPLICIT Specification OPTIONAL,
351  dbSpecific      [3] IMPLICIT SEQUENCE OF SEQUENCE{
352                db  [1] DatabaseName,
353                spec  [2] IMPLICIT Specification} OPTIONAL,
354    -- At least one of generic and dbSpecific must occur, and both may occur. If both, then for
355     -- any record not in the list of databases within dbSpecific, generic applies.
356   recordSyntax               [4] IMPLICIT SEQUENCE OF OBJECT IDENTIFIER OPTIONAL
357               -- For each record, the target selects the first record syntax
358               -- in this list that it can support.  If the list is exhausted, the
359               -- target may select an alternative syntax if
360               -- selectAlternativeSyntax is 'true'.
361        }
362  Specification ::= SEQUENCE{
363  schema CHOICE {
364              oid [1]   IMPLICIT OBJECT IDENTIFIER,
365              uri [300] IMPLICIT InternationalString
366  } OPTIONAL,
367  elementSpec    [2] CHOICE{
368              elementSetName   [1] IMPLICIT InternationalString,
369          externalEspec  [2] IMPLICIT EXTERNAL} OPTIONAL}
370-- end definition of composition specification
371-- end auxiliary definitions for search and response APDUs
372
373-- Delete APDUs
374  DeleteResultSetRequest ::= SEQUENCE{
375  referenceId          ReferenceId OPTIONAL,
376      deleteFunction      [32]  IMPLICIT INTEGER{
377                    list   (0),
378                    all   (1)},
379   resultSetList          SEQUENCE OF ResultSetId OPTIONAL,
380  otherInfo          OtherInformation OPTIONAL}
381--
382  DeleteResultSetResponse ::= SEQUENCE{
383  referenceId          ReferenceId OPTIONAL,
384    deleteOperationStatus    [0]  IMPLICIT DeleteSetStatus,
385  deleteListStatuses      [1]  IMPLICIT ListStatuses OPTIONAL,
386  numberNotDeleted       [34]  IMPLICIT INTEGER OPTIONAL,
387     bulkStatuses        [35]   IMPLICIT ListStatuses OPTIONAL,
388   deleteMessage      [36]  IMPLICIT InternationalString OPTIONAL,
389  otherInfo          OtherInformation OPTIONAL}
390  ListStatuses ::= SEQUENCE OF SEQUENCE{
391        id  ResultSetId,
392        status  DeleteSetStatus}
393
394  DeleteSetStatus ::= [33] IMPLICIT INTEGER{
395                  success          (0),
396                   resultSetDidNotExist      (1),
397                    previouslyDeletedByTarget      (2),
398                     systemProblemAtTarget      (3),
399                   accessNotAllowed        (4),
400      resourceControlAtOrigin      (5),
401                   resourceControlAtTarget      (6),
402                    bulkDeleteNotSupported      (7),
403                   notAllRsltSetsDeletedOnBulkDlte    (8),
404      notAllRequestedResultSetsDeleted    (9),
405      resultSetInUse        (10)}
406--
407
408--Access- and Resource-control APDUs
409--
410  AccessControlRequest ::= SEQUENCE{
411  referenceId        ReferenceId OPTIONAL,
412  securityChallenge      CHOICE{
413              simpleForm      [37] IMPLICIT OCTET STRING,
414               externallyDefined    [0]  EXTERNAL},
415  otherInfo        OtherInformation OPTIONAL}
416
417  AccessControlResponse ::= SEQUENCE{
418  referenceId        ReferenceId OPTIONAL,
419  securityChallengeResponse  CHOICE{
420              simpleForm      [38]   IMPLICIT OCTET STRING,
421               externallyDefined    [0]  EXTERNAL} OPTIONAL,
422              -- Optional only in version 3; mandatory in version 2. If
423              -- omitted (in version 3) then diagnostic must occur.
424  diagnostic    [223]    DiagRec OPTIONAL, -- Version 3 only.
425  otherInfo        OtherInformation OPTIONAL}
426
427
428
429  ResourceControlRequest ::= SEQUENCE{
430  referenceId          ReferenceId OPTIONAL,
431  suspendedFlag      [39]  IMPLICIT BOOLEAN OPTIONAL,
432  resourceReport      [40]  ResourceReport OPTIONAL,
433  partialResultsAvailable    [41]  IMPLICIT INTEGER{
434                subset    (1),
435                interim  (2),
436                none    (3)} OPTIONAL,
437  responseRequired      [42]   IMPLICIT BOOLEAN,
438  triggeredRequestFlag    [43]   IMPLICIT BOOLEAN OPTIONAL,
439  otherInfo          OtherInformation OPTIONAL}
440
441
442  ResourceControlResponse ::= SEQUENCE{
443     referenceId          ReferenceId OPTIONAL,
444    continueFlag       [44]   IMPLICIT BOOLEAN,
445  resultSetWanted      [45]  IMPLICIT BOOLEAN OPTIONAL,
446  otherInfo          OtherInformation OPTIONAL}
447
448
449
450  TriggerResourceControlRequest ::= SEQUENCE{
451     referenceId          ReferenceId OPTIONAL,
452  requestedAction      [46]  IMPLICIT INTEGER{
453                resourceReport  (1),
454                resourceControl  (2),
455                cancel      (3)},
456  prefResourceReportFormat    [47]   IMPLICIT ResourceReportId OPTIONAL,
457  resultSetWanted      [48]   IMPLICIT BOOLEAN OPTIONAL,
458  otherInfo          OtherInformation OPTIONAL}
459
460
461
462  ResourceReportRequest ::= SEQUENCE{
463     referenceId          ReferenceId OPTIONAL,
464  opId          [210]  IMPLICIT ReferenceId OPTIONAL,
465  prefResourceReportFormat    [49]   IMPLICIT ResourceReportId OPTIONAL,
466  otherInfo          OtherInformation OPTIONAL}
467--
468  ResourceReportResponse ::= SEQUENCE{
469     referenceId          ReferenceId OPTIONAL,
470  resourceReportStatus    [50]   IMPLICIT INTEGER{
471                success    (0),
472                partial    (1),
473                failure-1    (2),
474                failure-2    (3),
475                failure-3    (4),
476                failure-4    (5),
477                failure-5    (6),
478                failure-6    (7)},
479  resourceReport               [51]   ResourceReport OPTIONAL,
480  otherInfo          OtherInformation OPTIONAL}
481--
482   ResourceReport     ::=   EXTERNAL
483  ResourceReportId    ::=    OBJECT IDENTIFIER
484
485--Scan APDUs
486  ScanRequest ::= SEQUENCE{
487  referenceId              ReferenceId OPTIONAL,
488    databaseNames        [3]  IMPLICIT SEQUENCE OF DatabaseName,
489    attributeSet            AttributeSetId OPTIONAL,
490    termListAndStartPoint        AttributesPlusTerm,
491    stepSize           [5]   IMPLICIT INTEGER OPTIONAL,
492    numberOfTermsRequested         [6]   IMPLICIT INTEGER,
493    preferredPositionInResponse      [7]   IMPLICIT INTEGER OPTIONAL,
494    otherInfo            OtherInformation OPTIONAL}
495
496  ScanResponse ::= SEQUENCE{
497   referenceId              ReferenceId OPTIONAL,
498   stepSize           [3]  IMPLICIT INTEGER OPTIONAL,
499   scanStatus           [4]  IMPLICIT INTEGER {
500                                success   (0),
501                                partial-1   (1),
502                                partial-2   (2),
503                                partial-3   (3),
504                                partial-4   (4),
505                                partial-5   (5),
506                                failure  (6) },
507   numberOfEntriesReturned       [5]  IMPLICIT INTEGER,
508   positionOfTerm         [6]  IMPLICIT INTEGER OPTIONAL,
509   entries           [7]  IMPLICIT ListEntries  OPTIONAL,
510   attributeSet          [8]  IMPLICIT AttributeSetId OPTIONAL,
511   otherInfo            OtherInformation OPTIONAL}
512
513-- begin auxiliary definitions for Scan
514  ListEntries ::= SEQUENCE{
515  entries        [1]   IMPLICIT SEQUENCE OF Entry OPTIONAL,
516    nonsurrogateDiagnostics    [2]  IMPLICIT SEQUENCE OF DiagRec OPTIONAL
517    -- At least one of entries and nonsurrogateDiagnostics must occur
518          }
519
520  Entry  ::= CHOICE {
521     termInfo               [1]   IMPLICIT TermInfo,
522     surrogateDiagnostic    [2]   DiagRec}
523--
524  TermInfo ::= SEQUENCE {
525   term                    Term,
526     displayTerm      [0]   IMPLICIT InternationalString OPTIONAL,
527                                     -- Presence of displayTerm means that term is not considered by
528              -- the target to be suitable for display, and displayTerm should
529              -- instead be displayed. 'term' is the actual term in the term list;
530               -- 'displayTerm' is for display purposes only, and is not an actual
531              -- term in the term list.
532  suggestedAttributes            AttributeList OPTIONAL,
533     alternativeTerm    [4]  IMPLICIT SEQUENCE OF AttributesPlusTerm OPTIONAL,
534     globalOccurrences    [2]  IMPLICIT INTEGER OPTIONAL,
535     byAttributes      [3]  IMPLICIT OccurrenceByAttributes OPTIONAL,
536     otherTermInfo      OtherInformation OPTIONAL}
537
538  OccurrenceByAttributes ::= SEQUENCE OF SEQUENCE{
539     attributes    [1]  AttributeList,
540     occurrences       CHOICE{
541               global    [2] INTEGER,
542            byDatabase  [3] IMPLICIT SEQUENCE OF SEQUENCE{
543              db      DatabaseName,
544              num     [1]  IMPLICIT INTEGER OPTIONAL,
545              otherDbInfo    OtherInformation OPTIONAL}} OPTIONAL,
546     otherOccurInfo    OtherInformation OPTIONAL}
547-- end auxiliary definitions for Scan
548
549-- Sort APDUs
550SortRequest  ::= SEQUENCE{
551  referenceId              ReferenceId OPTIONAL,
552  inputResultSetNames  [3]  IMPLICIT SEQUENCE OF InternationalString,
553  sortedResultSetName  [4]    IMPLICIT InternationalString,
554  sortSequence     [5]  IMPLICIT SEQUENCE OF SortKeySpec,
555              -- order of occurrence is from major to minor
556  otherInfo        OtherInformation OPTIONAL}
557
558SortResponse  ::= SEQUENCE{
559  referenceId          ReferenceId OPTIONAL,
560  sortStatus         [3]  IMPLICIT INTEGER{
561                            success  (0),
562              partial-1  (1),
563              failure  (2)},
564  resultSetStatus    [4]  IMPLICIT INTEGER{
565              empty    (1),
566                  interim  (2),
567                  unchanged  (3),
568              none    (4)} OPTIONAL,
569  diagnostics        [5]             IMPLICIT SEQUENCE OF DiagRec OPTIONAL,
570  resultCount        [6]             IMPLICIT INTEGER OPTIONAL,
571  otherInfo        OtherInformation OPTIONAL}
572
573-- begin auxiliary definitions for Sort
574  SortKeySpec ::= SEQUENCE{
575    sortElement      SortElement,
576       sortRelation    [1]  IMPLICIT INTEGER{
577                                ascending      (0),
578              descending      (1),
579              ascendingByFrequency    (3),
580              descendingByfrequency  (4)},
581      caseSensitivity    [2]   IMPLICIT INTEGER{
582                                 caseSensitive      (0),
583              caseInsensitive    (1)},
584      missingValueAction    [3]   CHOICE{
585                                     abort    [1] IMPLICIT NULL,
586                                     null      [2] IMPLICIT NULL,
587                    --supply a null value for missing value
588          missingValueData  [3] IMPLICIT OCTET STRING} OPTIONAL}
589
590  SortElement ::=   CHOICE{
591    generic        [1] SortKey,
592       datbaseSpecific    [2] IMPLICIT SEQUENCE OF SEQUENCE{
593                       databaseName  DatabaseName,
594                       dbSort    SortKey}}
595
596  SortKey ::= CHOICE{
597    sortfield       [0]  IMPLICIT InternationalString,
598                  -- An element, element-group-tag, or alias supported by the target
599               -- and denoting a set of elements associated with each record.
600     elementSpec    [1]  IMPLICIT Specification,
601        sortAttributes    [2]  IMPLICIT SEQUENCE{
602              id  AttributeSetId,
603              list  AttributeList}}
604-- end auxiliary definitions for sort
605
606
607
608-- Extended Service APDUs
609  ExtendedServicesRequest  ::= SEQUENCE{
610  referenceId              ReferenceId OPTIONAL,
611  function      [3]  IMPLICIT INTEGER {
612              create    (1),
613              delete    (2),
614              modify  (3)},
615  packageType      [4]  IMPLICIT OBJECT IDENTIFIER,
616  packageName    [5]  IMPLICIT InternationalString OPTIONAL,
617              -- PackageName mandatory for 'modify' or 'delete'; optional for
618              -- 'create'. Following four parameters mandatory for 'create'; should
619              -- be included on 'modify' if being modified; not needed on 'delete'.
620  userId        [6]   IMPLICIT InternationalString OPTIONAL,
621  retentionTime    [7]   IMPLICIT IntUnit OPTIONAL,
622  permissions      [8]   IMPLICIT Permissions OPTIONAL,
623  description      [9]   IMPLICIT InternationalString OPTIONAL,
624
625-- (ExtendedServiceRequest APDU continued)
626  taskSpecificParameters  [10]  IMPLICIT EXTERNAL OPTIONAL,
627              -- Mandatory for 'create'; included on 'modify' if specific
628              -- parameters being modified; not necessary on 'delete'. For the
629              -- 'EXTERNAL,' use OID of specific ES definition and select
630              --  CHOICE [1]: 'esRequest'.
631  waitAction      [11]  IMPLICIT INTEGER{
632              wait      (1),
633              waitIfPossible  (2),
634              dontWait    (3),
635              dontReturnPackage  (4)},
636  elements          ElementSetName OPTIONAL,
637  otherInfo          OtherInformation OPTIONAL}
638--
639
640ExtendedServicesResponse ::= SEQUENCE{
641  referenceId                ReferenceId OPTIONAL,
642  operationStatus    [3]    IMPLICIT INTEGER{
643                done      (1),
644                accepted    (2),
645                failure    (3)},
646  diagnostics      [4]    IMPLICIT SEQUENCE OF DiagRec OPTIONAL,
647  taskPackage      [5]    IMPLICIT EXTERNAL OPTIONAL,
648                -- Use OID: {Z39-50-recordSyntax (106)} and corresponding
649                -- syntax. For the EXTERNAL, 'taskSpecific,' within that
650                -- definition, use OID of the specific es, and choose [2],
651                -- 'taskPackage'.
652  otherInfo          OtherInformation OPTIONAL}
653
654 Permissions ::= SEQUENCE OF SEQUENCE{
655  userId      [1] IMPLICIT InternationalString OPTIONAL,
656  allowableFunctions  [2] IMPLICIT SEQUENCE OF INTEGER{
657              delete      (1),
658              modifyContents  (2),
659              modifyPermissions  (3),
660              present    (4),
661                 invoke    (5)}}
662
663Close ::= SEQUENCE{
664  referenceId          ReferenceId OPTIONAL,  -- See 3.2.11.1.5.
665  closeReason          CloseReason,
666  diagnosticInformation    [3]  IMPLICIT InternationalString OPTIONAL,
667  resourceReportFormat    [4]  IMPLICIT ResourceReportId OPTIONAL,
668                -- For use by origin only, and only on Close request;
669                -- origin requests target to include report in response.
670   resourceReport      [5]  ResourceReport OPTIONAL,
671                -- For use by target only, unilaterally on Close request;
672                -- on Close response may be unilateral or in response
673                -- to origin request.
674  otherInfo          OtherInformation OPTIONAL}
675
676  CloseReason ::=  [211]  IMPLICIT INTEGER{
677            finished      (0),
678            shutdown      (1),
679            systemProblem    (2),
680            costLimit      (3),
681            resources      (4),
682            securityViolation    (5),
683            protocolError    (6),
684            lackOfActivity    (7),
685            peerAbort      (8),
686            unspecified      (9)}
687
688--Duplicate detection APDUs
689DuplicateDetectionRequest ::= SEQUENCE {
690  referenceId                      ReferenceId  OPTIONAL,
691  inputResultSetIds            [3] IMPLICIT SEQUENCE OF InternationalString,
692  outputResultSetName          [4] IMPLICIT InternationalString,
693  applicablePortionOfRecord    [5] IMPLICIT EXTERNAL OPTIONAL,
694  duplicateDetectionCriteria   [6] IMPLICIT SEQUENCE OF
695                                   DuplicateDetectionCriterion OPTIONAL,
696  clustering                   [7] IMPLICIT BOOLEAN OPTIONAL,
697                                        -- 'true' means "clustered".
698                                        -- This parameter may be omitted
699                                        -- only if retentionCriteria CHOICE is
700                                        -- 'numberOfEntries' and its value is 1.
701  retentionCriteria            [8] IMPLICIT SEQUENCE OF
702                                            RetentionCriterion,
703  sortCriteria                 [9] IMPLICIT SEQUENCE OF
704                                            SortCriterion OPTIONAL,
705  otherInfo                        OtherInformation OPTIONAL}
706
707DuplicateDetectionCriterion ::= CHOICE{
708                           levelOfMatch         [1] IMPLICIT INTEGER,
709                                -- a percentage; 1-100.
710                           caseSensitive        [2] IMPLICIT NULL,
711                           punctuationSensitive [3] IMPLICIT NULL,
712                           regularExpression    [4] IMPLICIT EXTERNAL,
713                           rsDuplicates         [5] IMPLICIT NULL
714                 -- values 6-100 reserved for future assignment.
715                                                       }
716
717RetentionCriterion ::= CHOICE{
718                          numberOfEntries       [1] IMPLICIT INTEGER,
719                                                        --  greater than 0
720                          percentOfEntries      [2] IMPLICIT INTEGER,
721                                                        -- 1-100,
722                          duplicatesOnly        [3] IMPLICIT NULL,
723                                                 -- should not be chosen
724                                                 -- if clustering is 'true'
725                          discardRsDuplicates   [4] IMPLICIT NULL
726                 -- values 5-100 reserved for future assignment.
727                                                       }
728
729SortCriterion ::= CHOICE{
730                         mostComprehensive      [1] IMPLICIT NULL,
731                         leastConmprehensive    [2] IMPLICIT NULL,
732                         mostRecent             [3] IMPLICIT NULL,
733                         oldest                 [4] IMPLICIT NULL,
734                         leastCost              [5] IMPLICIT NULL,
735                         preferredDatabases     [6] IMPLICIT
736                                     SEQUENCE OF InternationalString
737                 -- values 7-100 reserved for future assignment.
738}
739
740DuplicateDetectionResponse ::= SEQUENCE {
741  referenceId                          ReferenceId  OPTIONAL,
742  status                       [3]     IMPLICIT INTEGER{
743                                         success               (0),
744                                         failure               (1)},
745  resultSetCount               [4]     IMPLICIT INTEGER OPTIONAL,
746  diagnostics                  [5]     IMPLICIT SEQUENCE OF DiagRec OPTIONAL,
747  otherInfo                           OtherInformation OPTIONAL}
748
749-- Global auxiliary definitions
750  ReferenceId       ::=      [2]  IMPLICIT OCTET STRING
751  ResultSetId        ::=      [31]    IMPLICIT InternationalString
752  ElementSetName     ::=     [103]   IMPLICIT InternationalString
753  DatabaseName     ::=    [105]   IMPLICIT InternationalString
754  AttributeSetId     ::=       OBJECT IDENTIFIER
755
756
757-- OtherInformation
758  OtherInformation   ::= [201] IMPLICIT SEQUENCE OF SEQUENCE{
759    category            [1]   IMPLICIT InfoCategory OPTIONAL,
760    information        CHOICE{
761      characterInfo        [2]  IMPLICIT InternationalString,
762      binaryInfo        [3]  IMPLICIT OCTET STRING,
763      externallyDefinedInfo    [4]  IMPLICIT EXTERNAL,
764      oid          [5]  IMPLICIT OBJECT IDENTIFIER}}
765--
766  InfoCategory ::= SEQUENCE{
767      categoryTypeId  [1]   IMPLICIT OBJECT IDENTIFIER OPTIONAL,
768      categoryValue  [2]   IMPLICIT INTEGER}
769
770
771-- Units
772  -- IntUnit is used when value and unit are supplied together. Unit, alone, is used when just
773  -- specifying a unit (without a value).  For example, IntUnit is used in Term, in an RPNQuery, or
774  -- it can be the datatype of an element within a retrieval record. Unit (alone) would be used in an
775  -- element request, when requesting data be returned according to a particular unit.
776
777  IntUnit ::= SEQUENCE{
778    value    [1] IMPLICIT INTEGER,
779    unitUsed  [2] IMPLICIT Unit}
780--
781  Unit ::= SEQUENCE{
782    unitSystem    [1] InternationalString OPTIONAL,    -- e.g. 'SI'
783    unitType    [2] StringOrNumeric OPTIONAL,    -- e.g. 'mass'
784    unit      [3] StringOrNumeric OPTIONAL,    -- e.g. 'kilograms'
785    scaleFactor    [4] IMPLICIT INTEGER OPTIONAL    -- e.g. 9 means 10**9
786        }
787
788--CharacterString
789  InternationalString ::= GeneralString
790    -- When version 2 is in force, this collapses to VisibleString. That is, only characters in the
791    -- visibleString repertoire may be used. (Datatype compatibility with version 2 is not affected,
792     -- because references are IMPLICIT.)  When version 3 is in force, the semantics of the
793    -- GeneralString content may be altered by negotiation during initialization. If no such
794    -- negotiation is in effect, then GeneralString semantics are in force.
795
796StringOrNumeric ::= CHOICE{
797  string    [1] IMPLICIT InternationalString,
798  numeric  [2] IMPLICIT INTEGER}
799
800END -- IR DEFINITIONS
801
802
803
804DiagnosticFormatDiag1
805{Z39-50-diagnosticFormat diag-1 (2)} DEFINITIONS ::=
806BEGIN
807IMPORTS Term, Specification, AttributeList, SortElement, DatabaseName,
808DefaultDiagFormat, InternationalString FROM Z39-50-APDU-1995;
809
810
811DiagnosticFormat ::=  SEQUENCE OF SEQUENCE{
812  diagnostic  [1] CHOICE{
813              defaultDiagRec    [1]  IMPLICIT DefaultDiagFormat,
814              explicitDiagnostic    [2]  DiagFormat} OPTIONAL,
815  message  [2] IMPLICIT InternationalString OPTIONAL}
816
817
818DiagFormat ::= CHOICE{
819
820tooMany  [1000]   IMPLICIT SEQUENCE{
821                tooManyWhat   [1]  IMPLICIT INTEGER{
822                                  argumentWords        (1),
823                                  truncatedWords        (2),
824                                  booleanOperators      (3),
825                                  incompleteSubfields    (4),
826                                  characters          (5),
827                                  recordsRetrieved      (6),
828                                  dataBasesSpecified      (7),
829                                  resultSetsCreated      (8),
830                                  indexTermsProcessed    (9)},
831                max        [2]  IMPLICIT INTEGER OPTIONAL},
832
833
834
835
836
837
838
839badSpec    [1001]  IMPLICIT SEQUENCE{  -- element set name or specification
840                spec        [1] IMPLICIT Specification, -- esn or element spec not supported
841                db        [2] IMPLICIT DatabaseName OPTIONAL,
842                            -- if db specified, above spec not supported for db; otherwise,
843                            -- spec not supported period.
844                goodOnes    [3] IMPLICIT SEQUENCE OF Specification OPTIONAL
845                            -- target supplies ones that are supported
846                            },
847
848
849dbUnavail  [1002]  IMPLICIT SEQUENCE{ -- database unavailable
850                db  [1] IMPLICIT DatabaseName,
851                why  [2] IMPLICIT SEQUENCE{
852                        reasonCode  [1] IMPLICIT INTEGER{
853                                      doesNotExist    (0),
854                                      existsButUnavail  (1),
855                                      locked      (2),
856                                      accessDenied    (3)} OPTIONAL,
857                        message    [2] IMPLICIT InternationalString OPTIONAL}},
858
859
860unSupOp  [1003]  IMPLICIT INTEGER{  -- unsupported operator
861                and     (0),
862                or      (1),
863                and-not  (2),
864                prox    (3)},
865
866
867attribute    [1004]  IMPLICIT SEQUENCE{
868                    -- Applies for unsupported attribute set, attribute type,
869                    -- attribute value, or term (for a given attribute type or value).
870
871                id      [1]  IMPLICIT OBJECT IDENTIFIER,
872                   -- if only "id" occurs, then attribute set is not supported
873                type    [2]  IMPLICIT INTEGER OPTIONAL,
874                   -- must occur if value occurs.
875                value    [3]   IMPLICIT INTEGER OPTIONAL,
876                    -- if omitted, and Type occurs, then Type is what is unsupported
877                term    [4]  Term OPTIONAL
878                    -- If occurs, term is illegal or not supported, for attribute value,
879                    -- if value occurs; otherwise, for type.
880                                },
881
882
883attCombo  [1005]  IMPLICIT SEQUENCE{ -- attribute combination not supported
884              unsupportedCombination  [1] IMPLICIT AttributeList,
885              recommendedAlternatives  [2] IMPLICIT SEQUENCE OF AttributeList OPTIONAL},
886
887
888
889
890term      [1006]  IMPLICIT SEQUENCE{
891                problem    [1] IMPLICIT INTEGER{
892                            codedValue  (1),
893                            unparsable  (2),
894                            tooShort    (3),
895                            type      (4)} OPTIONAL,
896                term      [2] Term},
897
898
899proximity  [1007] CHOICE{        -- proximity diagnostics:
900               resultSets  [1]    IMPLICIT NULL,         -- proximity between sets not supported
901              badSet    [2]    IMPLICIT InternationalString,  -- bad result set specified
902                 relation    [3]   IMPLICIT INTEGER,      -- 1 to 6 ; relation not supported
903              unit      [4]  IMPLICIT INTEGER,      -- unsupported unit code
904              distance    [5]  IMPLICIT INTEGER,      -- unsupported distance
905              attributes  [6]  AttributeList,             --  proximity not supported with specified
906                                                   -- attribute combination
907              ordered    [7]  IMPLICIT NULL,        -- ordered flag not supported
908              exclusion  [8]  IMPLICIT NULL          -- exclusion flag not supported
909                    },
910
911
912
913
914
915scan     [1008] CHOICE{      -- scan diagnostics:
916              nonZeroStepSize  [0] IMPLICIT NULL,  -- only zero step size supported
917              specifiedStepSize  [1] IMPLICIT NULL,  -- specified step size not supported
918              termList1      [3] IMPLICIT NULL,  -- term list not supported (no alternative supplied)
919              termList2      [4] IMPLICIT SEQUENCE OF AttributeList,
920                                          -- term list not supported (alternatives supplied)
921              posInResponse    [5] IMPLICIT INTEGER{  --value of positionInResponse not supported
922                              mustBeOne        (1),
923                              mustBePositive    (2),
924                              mustBeNonNegative  (3),
925                              other            (4)},
926              resources      [6] IMPLICIT NULL,   -- resources exhausted looking for satisfying terms
927              endOfList      [7] IMPLICIT NULL  -- beginning or end of term list
928                },
929
930
931sort       [1009] CHOICE{
932              sequence    [0]  IMPLICIT NULL,        -- cannot sort according to sequence
933              noRsName    [1]  IMPLICIT NULL,        -- no result set name supplied
934              tooMany    [2]  IMPLICIT INTEGER,      --  Too many input result sets,
935                                                --  maximum supplied.
936              incompatible  [3]  IMPLICIT NULL,        -- records with different formats
937                                                 -- not compatible for sorting
938              generic      [4]  IMPLICIT NULL,        -- generic sort not supported
939                                                -- (db specific only)
940              dbSpecific    [5]  IMPLICIT NULL,        -- db specific sort not supported
941              sortElement    [6]  SortElement,
942              key        [7]  IMPLICIT INTEGER{
943                              tooMany  (1),    -- too many sort keys
944                              duplicate  (2)},    -- duplicate sort keys
945              action      [8]  IMPLICIT NULL,  -- unsupported missing data action
946              illegal      [9]  IMPLICIT INTEGER{
947                              relation  (1),  -- illegal sort relation
948                              case    (2),  -- illegal case value
949                              action  (3),   -- illegal missing data action
950                              sort    (4)},  -- illegal sort
951            inputTooLarge    [10]  IMPLICIT SEQUENCE OF InternationalString,
952                                      --   one or more of the input result sets too large to sort
953          aggregateTooLarge  [11]  IMPLICIT NULL  --  aggregate result set too large
954                          },
955
956segmentation  [1010]  CHOICE{
957                segmentCount  [0]    IMPLICIT NULL,
958                                  -- Cannot guarantee record will fit within max segments. Target
959                                  -- suggests that origin try again to retrieve record, without
960                                  -- including max-segment-count.
961                segmentSize  [1]    IMPLICIT INTEGER
962                                -- record cannot be segmented into fragments such that the largest
963                                -- will fit within max segment size specified. Target supplies (in
964                                -- bytes) the smallest acceptable value of Max-segment-size to
965                                -- retrieve the record.
966                          },
967
968
969extServices  [1011] CHOICE{
970                req        [1] IMPLICIT INTEGER{   -- bad request
971                            nameInUse    (1),  -- package name already in use
972                            noSuchName  (2),  -- no such package, on modify/delete
973                            quota        (3),  -- quota exceeded
974                            type        (4)},  -- extended service type not supported
975                permission  [2] IMPLICIT INTEGER{ -- permission denied on ES, because:
976                            id         (1),    --   id not authorized, or
977                            modifyDelete  (2)},    -- cannot modify or delete
978                immediate  [3] IMPLICIT INTEGER{ -- immediate execution:
979                            failed      (1),    -- failed,
980                            service      (2),    -- not supported for this service, or
981                            parameters    (3)    -- for these parameters.
982                                }},
983
984
985accessCtrl    [1012] CHOICE{
986                noUser    [1] IMPLICIT NULL,    -- no user to display challenge to
987                refused    [2] IMPLICIT NULL,    -- access control information refused by user
988                simple    [3] IMPLICIT NULL,    -- only simple form supported (target used
989                                          -- externally defined)
990                oid      [4] IMPLICIT SEQUENCE OF OBJECT IDENTIFIER,
991                                          -- oid not supported (origin supplies alternative
992                                          -- suggested oids)
993                alternative  [5] IMPLICIT SEQUENCE OF OBJECT IDENTIFIER,
994                                          -- origin insists that target use an alternative
995                                          -- challenge for this data (e.g. stronger
996
997                                          -- authentication or stronger Access control). The
998              -- origin supplies suggested alternative oids.
999                pwdInv    [6] IMPLICIT NULL,    -- password invalid
1000                pwdExp    [7] IMPLICIT NULL      -- password expired
1001                    },
1002
1003
1004recordSyntax  [1013] IMPLICIT SEQUENCE{ -- record cannot be transferred in requested syntax
1005              unsupportedSyntax    [1] IMPLICIT OBJECT IDENTIFIER,
1006              suggestedAlternatives  [2] IMPLICIT SEQUENCE OF OBJECT IDENTIFIER OPTIONAL}
1007}
1008
1009END
1010
1011
1012
1013
1014
1015RecordSyntax-explain
1016{Z39-50-recordSyntax explain (100)} DEFINITIONS ::=
1017
1018BEGIN
1019IMPORTS AttributeSetId, Term, OtherInformation, DatabaseName, ElementSetName, IntUnit, Unit,
1020 StringOrNumeric, Specification, InternationalString, AttributeList, AttributeElement FROM Z39-50-APDU-1995;
1021EXPORTS LanguageCode;
1022
1023Explain-Record ::= CHOICE{
1024  -- Each of these may be used as search term  when Use attribute is 'explain-category'.
1025  targetInfo         [0]    IMPLICIT TargetInfo,
1026  databaseInfo      [1]    IMPLICIT DatabaseInfo,
1027  schemaInfo        [2]    IMPLICIT SchemaInfo,
1028  tagSetInfo         [3]    IMPLICIT TagSetInfo,
1029  recordSyntaxInfo    [4]    IMPLICIT RecordSyntaxInfo,
1030  attributeSetInfo    [5]    IMPLICIT AttributeSetInfo,
1031  termListInfo      [6]    IMPLICIT TermListInfo,
1032  extendedServicesInfo  [7]    IMPLICIT ExtendedServicesInfo,
1033  attributeDetails      [8]    IMPLICIT AttributeDetails,
1034  termListDetails    [9]    IMPLICIT TermListDetails,
1035  elementSetDetails    [10]  IMPLICIT ElementSetDetails,
1036  retrievalRecordDetails  [11]   IMPLICIT RetrievalRecordDetails,
1037  sortDetails             [12]   IMPLICIT SortDetails,
1038  processing           [13]  IMPLICIT ProcessingInformation,
1039  variants          [14]  IMPLICIT VariantSetInfo,
1040  units          [15]    IMPLICIT UnitInfo,
1041  categoryList            [100]  IMPLICIT CategoryList}
1042
1043-- Element set name 'B' (brief)  retrieves:
1044--  -  'commonInfo' (except for otherInfo within commonInfo)
1045--  -  key elements
1046--  -  other elements designated as 'non-key brief elements'
1047-- Esn 'description' retrieves brief elements as well as 'description', and specific additional descriptive
1048-- elements if designated.
1049-- Element set name 'F' (full) retrieves all of the above, as well as those designated as "non-brief elements". Some
1050-- elements designated as OPTIONAL may be mandatory in full records, and are so identified. (Note that all elements
1051-- that are not part of the brief element set must be designated as OPTIONAL in the ASN.1, otherwise it would be
1052-- illegal to omit them.)
1053-- Other esns are defined (below) as needed.
1054
1055-- - - - - - - - - - - - -   Info Records
1056  -- Info records are mainly for software consumption
1057  -- They describe individual entities within the target system:
1058  --   The target itself
1059  --   Individual databases
1060  --   Schemas
1061  --   Tag sets
1062  --   Record syntaxes
1063  --   Attribute sets
1064  --   Term lists
1065  --   Extended services
1066 --     The information about each Schema, Tag Set, Record Syntax and Attribute Set should
1067  -- match the universal definitions of these items. The only exception is that a target may omit any
1068  -- items it doesn't support, for example the description of the bib-1 attribute set may omit attributes
1069  -- that the target does not support under any circumstances.
1070  --      Databases that may be searched together can be listed in the dbCominations element of the TargetInfo record.
1071TargetInfo ::= SEQUENCE {
1072  commonInfo      [0]    IMPLICIT CommonInfo OPTIONAL,
1073    -- Key elements follow:
1074  name          [1]    IMPLICIT InternationalString,
1075    -- Non-key brief elements follow:
1076  recent-news      [2]    IMPLICIT HumanString OPTIONAL,
1077  icon          [3]    IMPLICIT IconObject OPTIONAL,
1078  namedResultSets    [4]    IMPLICIT BOOLEAN,
1079  multipleDBsearch    [5]    IMPLICIT BOOLEAN,
1080  maxResultSets      [6]    IMPLICIT INTEGER OPTIONAL,
1081  maxResultSize      [7]    IMPLICIT INTEGER OPTIONAL,
1082  maxTerms        [8]    IMPLICIT INTEGER OPTIONAL,
1083  timeoutInterval      [9]    IMPLICIT IntUnit OPTIONAL,
1084  welcomeMessage    [10]  IMPLICIT HumanString OPTIONAL,
1085    -- non-brief elements follow:
1086  -- 'description' esn retrieves the following two (as well as brief):
1087  contactInfo      [11]  IMPLICIT ContactInfo OPTIONAL,
1088  description      [12]  IMPLICIT HumanString OPTIONAL,
1089  nicknames        [13]  IMPLICIT SEQUENCE OF InternationalString OPTIONAL,
1090  usage-restrictions    [14]  IMPLICIT HumanString OPTIONAL,
1091  paymentAddr      [15]  IMPLICIT HumanString OPTIONAL,
1092  hours          [16]  IMPLICIT HumanString OPTIONAL,
1093  dbCombinations    [17]  IMPLICIT SEQUENCE OF DatabaseList OPTIONAL,
1094  addresses        [18]  IMPLICIT SEQUENCE OF NetworkAddress OPTIONAL,
1095  languages        [101]  IMPLICIT SEQUENCE OF InternationalString OPTIONAL,
1096                  -- Languages supported for message strings.  Each is a three-character
1097                  -- language code from Z39.53-1994.
1098-- characterSets      [102]  this tag reserved for "character sets supported for name and message strings".
1099  -- commonAccessInfo elements list objects the target supports. All objects listed in
1100  -- AccessInfo for any individual database should also be listed here.
1101  commonAccessInfo  [19]  IMPLICIT AccessInfo OPTIONAL}
1102
1103
1104DatabaseInfo ::= SEQUENCE {
1105      -- A target may provide "virtual databases" that are combinations of individual database. These
1106      -- databases are indicated by the presence of subDbs in the combination database's DatabaseDescription.
1107  commonInfo        [0]    IMPLICIT CommonInfo OPTIONAL,
1108    -- Key elements follow:
1109  name            [1]    IMPLICIT DatabaseName,
1110    -- Non-key brief elements follow:
1111  explainDatabase      [2]             IMPLICIT NULL OPTIONAL,
1112                       -- If present, this database is the Explain database, or an Explain database
1113                    -- for a different server, possibly on a different host. The means by which
1114                    -- that server may be accessed is not addressed by this standard. One
1115                    -- suggested possibility is an implementor agreement whereby the
1116                    -- database name is a url which may be used to connect to the server.
1117  nicknames          [3]    IMPLICIT SEQUENCE OF DatabaseName OPTIONAL,
1118  icon            [4]    IMPLICIT IconObject OPTIONAL,
1119  user-fee          [5]    IMPLICIT BOOLEAN,
1120  available          [6]    IMPLICIT BOOLEAN,
1121  titleString          [7]    IMPLICIT HumanString OPTIONAL,
1122    -- Non-brief elements follow:
1123  keywords          [8]    IMPLICIT SEQUENCE OF HumanString OPTIONAL,
1124  description        [9]    IMPLICIT HumanString OPTIONAL,
1125  associatedDbs        [10]  IMPLICIT DatabaseList OPTIONAL,
1126                    -- databases that may be searched in combination with this one
1127
1128  subDbs          [11]  IMPLICIT DatabaseList OPTIONAL,
1129                        -- When present, this database is a composite representing the combined
1130                     -- databases 'subDbs'. The individual subDbs are also available.
1131  disclaimers        [12]  IMPLICIT HumanString OPTIONAL,
1132  news            [13]  IMPLICIT HumanString OPTIONAL,
1133  recordCount           [14]    CHOICE {
1134                                   actualNumber  [0] IMPLICIT INTEGER,
1135                                    approxNumber  [1] IMPLICIT INTEGER} OPTIONAL,
1136  defaultOrder        [15]  IMPLICIT HumanString OPTIONAL,
1137  avRecordSize        [16]  IMPLICIT INTEGER OPTIONAL,
1138  maxRecordSize      [17]  IMPLICIT INTEGER OPTIONAL,
1139  hours            [18]  IMPLICIT HumanString OPTIONAL,
1140  bestTime          [19]  IMPLICIT HumanString OPTIONAL,
1141  lastUpdate          [20]  IMPLICIT GeneralizedTime OPTIONAL,
1142  updateInterval        [21]  IMPLICIT IntUnit OPTIONAL,
1143  coverage          [22]  IMPLICIT HumanString OPTIONAL,
1144  proprietary        [23]  IMPLICIT BOOLEAN OPTIONAL, -- mandatory in full record
1145  copyrightText        [24]  IMPLICIT HumanString OPTIONAL,
1146  copyrightNotice      [25]  IMPLICIT HumanString OPTIONAL,
1147  producerContactInfo    [26]  IMPLICIT ContactInfo OPTIONAL,
1148  supplierContactInfo      [27]  IMPLICIT ContactInfo OPTIONAL,
1149  submissionContactInfo    [28]  IMPLICIT ContactInfo OPTIONAL,
1150    -- accessInfo lists items connected with the database. All listed items should be in the target's AccessInfo.
1151  accessInfo                [29]  IMPLICIT AccessInfo OPTIONAL}
1152
1153
1154SchemaInfo ::= SEQUENCE {
1155  commonInfo    [0]  IMPLICIT CommonInfo OPTIONAL,
1156    -- Key elements follow:
1157  schema      [1]  IMPLICIT OBJECT IDENTIFIER,
1158    -- Non-key brief elements follow:
1159  name        [2]  IMPLICIT InternationalString,
1160    -- Non-brief elements follow:
1161  description    [3]  IMPLICIT HumanString OPTIONAL,
1162  tagTypeMapping  [4]  IMPLICIT SEQUENCE OF SEQUENCE {
1163              tagType    [0] IMPLICIT INTEGER,
1164              tagSet       [1] IMPLICIT OBJECT IDENTIFIER OPTIONAL,
1165                -- If tagSet is omitted, then this tagType is for a tagSet locally defined
1166                -- within the schema that cannot be referenced by another schema.
1167              defaultTagType  [2] IMPLICIT NULL OPTIONAL
1168                        } OPTIONAL,
1169  recordStructure  [5]  IMPLICIT SEQUENCE OF ElementInfo OPTIONAL}
1170
1171
1172  --  ElementInfo referenced in SchemaInfo and RecordSyntaxInfo
1173    ElementInfo ::= SEQUENCE {
1174      elementName  [1] IMPLICIT InternationalString,
1175      elementTagPath  [2] IMPLICIT Path,
1176      dataType      [3] ElementDataType OPTIONAL, -- If omitted, not specified.
1177       required         [4] IMPLICIT BOOLEAN,
1178      repeatable     [5] IMPLICIT BOOLEAN,
1179       description    [6] IMPLICIT HumanString OPTIONAL}
1180
1181
1182  -- Path is referenced by ElementInfo as well as PerElementDetails
1183             Path ::= SEQUENCE OF SEQUENCE{
1184              tagType  [1] IMPLICIT INTEGER,
1185              tagValue     [2] StringOrNumeric}
1186      ElementDataType ::= CHOICE{
1187            primitive  [0] IMPLICIT PrimitiveDataType,
1188           structured  [1] IMPLICIT SEQUENCE OF ElementInfo}
1189      PrimitiveDataType ::= INTEGER{
1190            octetString        (0),
1191            numeric           (1),
1192            date            (2),
1193            external        (3),
1194            string          (4),
1195            trueOrFalse       (5),
1196            oid         (6),
1197            intUnit        (7),
1198        empty        (8),
1199            noneOfTheAbove  (100) -- see 'description'
1200            }
1201
1202
1203TagSetInfo ::= SEQUENCE {
1204  commonInfo  [0]  IMPLICIT CommonInfo OPTIONAL,
1205    -- Key elements follow:
1206  tagSet      [1]  IMPLICIT OBJECT IDENTIFIER,
1207    -- non-key brief elements follow:
1208  name      [2]  IMPLICIT InternationalString,
1209    -- non-brief elements follow:
1210  description  [3]  IMPLICIT HumanString OPTIONAL,
1211  elements    [4]  IMPLICIT SEQUENCE OF SEQUENCE {
1212              elementname  [1]  IMPLICIT InternationalString,
1213               nicknames    [2]  IMPLICIT SEQUENCE OF InternationalString OPTIONAL,
1214              elementTag     [3]  StringOrNumeric,
1215              description    [4]  IMPLICIT HumanString OPTIONAL,
1216            dataType       [5]  PrimitiveDataType OPTIONAL,
1217              -- If the data type is expected to be structured, that is described in the schema info,
1218              -- and datatype is omitted here.
1219             otherTagInfo       OtherInformation OPTIONAL} OPTIONAL}
1220
1221RecordSyntaxInfo ::= SEQUENCE {
1222  commonInfo    [0]  IMPLICIT CommonInfo OPTIONAL,
1223    -- Key elements follow:
1224  recordSyntax    [1]  IMPLICIT OBJECT IDENTIFIER,
1225    -- Non-key brief elements follow:
1226  name        [2]  IMPLICIT InternationalString,
1227    -- non-brief elements follow:
1228  transferSyntaxes  [3]  IMPLICIT SEQUENCE OF OBJECT IDENTIFIER OPTIONAL,
1229  description    [4]  IMPLICIT HumanString OPTIONAL,
1230  asn1Module    [5]  IMPLICIT InternationalString OPTIONAL,
1231  abstractStructure  [6]  IMPLICIT SEQUENCE OF ElementInfo OPTIONAL
1232               -- Omitting abstractStructure only means target isn't using
1233                 -- Explain to describe the structure, not that there is no structure.
1234              }
1235
1236AttributeSetInfo ::= SEQUENCE {
1237  commonInfo  [0]  IMPLICIT CommonInfo OPTIONAL,
1238    -- Key elements follow:
1239  attributeSet  [1]  IMPLICIT AttributeSetId,
1240    -- non-key brief elements follow:
1241  name      [2]  IMPLICIT InternationalString,
1242    -- non-brief elements follow:
1243  attributes    [3]  IMPLICIT SEQUENCE OF AttributeType OPTIONAL,
1244            -- mandatory in full record
1245  description   [4] IMPLICIT HumanString OPTIONAL}
1246-- AttributeType referenced in AttributeSetInfo
1247  AttributeType ::= SEQUENCE {
1248      name             [0] IMPLICIT InternationalString OPTIONAL,
1249      description      [1] IMPLICIT HumanString OPTIONAL,
1250       attributeType    [2] IMPLICIT INTEGER,
1251      attributeValues  [3] IMPLICIT SEQUENCE OF AttributeDescription}
1252    AttributeDescription ::= SEQUENCE {
1253        name                 [0] IMPLICIT InternationalString OPTIONAL,
1254        description          [1] IMPLICIT HumanString OPTIONAL,
1255        attributeValue       [2] StringOrNumeric,
1256        equivalentAttributes  [3]  IMPLICIT SEQUENCE OF StringOrNumeric OPTIONAL
1257                  -- each is an occurrence of 'attributeValue' from AttributeDescription for a
1258                  -- different attribute. Equivalences listed here should be derived from the
1259                  -- attribute set definition, not from a particular server's behavior.
1260                    }
1261
1262
1263TermListInfo ::= SEQUENCE{
1264  commonInfo    [0]  IMPLICIT CommonInfo OPTIONAL,
1265    -- Key elements follow:
1266  databaseName  [1]  IMPLICIT DatabaseName,
1267    -- Non-key brief elements follow:
1268  termLists      [2] IMPLICIT SEQUENCE OF SEQUENCE{
1269            name    [1] IMPLICIT InternationalString,
1270            title    [2] IMPLICIT HumanString OPTIONAL,
1271                                            -- Title is for users to see and can differ by language. Name, on the
1272                      -- other hand is typically a short string not necessarily meant to be
1273                       -- human-readable, and not variable by language.
1274            searchCost   [3]   IMPLICIT INTEGER {
1275                  optimized  (0),    -- The attribute (or combination) associated
1276                            -- with this   list will do fast searches.
1277                      normal      (1),    -- The attribute (combination) will work as
1278                            -- expected. So there's probably an index for the
1279                            -- attribute (combination) or some similar
1280                             -- mechanism.
1281                      expensive   (2),    -- Can use the attribute (combination), but it
1282                            -- might not provide satisfactory results.
1283                            -- Probably there is no index, or post-
1284                            -- processing of records is required.
1285                      filter      (3)    -- can't search with this attribute (combination) alone.
1286                         } OPTIONAL,
1287              scanable  [4]  IMPLICIT BOOLEAN, -- 'true' means this list can be scanned.
1288               broader    [5] IMPLICIT SEQUENCE OF InternationalString OPTIONAL,
1289               narrower  [6] IMPLICIT SEQUENCE OF InternationalString OPTIONAL
1290                       -- broader and narrower list alternative term lists related to this one.
1291                       -- The term lists so listed should also be in this termLists structure.
1292                          }
1293  -- no non-brief elements
1294            }
1295
1296
1297ExtendedServicesInfo ::= SEQUENCE {
1298  commonInfo          [0]  IMPLICIT CommonInfo OPTIONAL,
1299    -- Key elements follow:
1300  type          [1]  IMPLICIT OBJECT IDENTIFIER,
1301    -- Non-key brief elements follow:
1302  name                [2]  IMPLICIT InternationalString OPTIONAL,
1303                -- should be supplied if privateType is 'true'
1304  privateType      [3]  IMPLICIT BOOLEAN,
1305  restrictionsApply    [5]  IMPLICIT BOOLEAN,  -- if 'true' see 'description'
1306  feeApply              [6]  IMPLICIT BOOLEAN,  -- if 'true' see 'description'
1307  available             [7]  IMPLICIT BOOLEAN,
1308  retentionSupported    [8]  IMPLICIT BOOLEAN,
1309  waitAction      [9]  IMPLICIT INTEGER{
1310                waitSupported    (1),
1311                waitAlways      (2),
1312                waitNotSupported  (3),
1313                depends      (4),
1314                notSaying      (5)},
1315  -- non-brief elements follow:
1316    -- To get brief plus 'description' use esn 'description'
1317  description           [10]  IMPLICIT HumanString OPTIONAL,
1318      -- to get above elements and 'specificExplain' use esn 'specificExplain'
1319  specificExplain    [11]  IMPLICIT EXTERNAL OPTIONAL,
1320                  -- Use oid of specific ES, and select choice [3] 'explain'. Format
1321                  -- to be developed in conjunction with the specific ES definition.
1322    -- to get all elements except 'specificExplain', use esn 'asn'
1323  esASN          [12]  IMPLICIT InternationalString OPTIONAL -- the ASN.1 for this ES
1324                }
1325
1326-- - - - - - - - - - - - - Detail records
1327 -- The detail records describe relationships among entities supported by the target. RetrievalRecordDetails describes
1328 -- the way that schema elements are mapped into record elements. This mapping may be different for each
1329 -- combination of database, schema, record syntax. The per-element details describe the default mapping.
1330 -- Origin-request re-tagging can change that mapping. When multiple databases are listed in a databaseNames
1331 -- element, the record applies equally to all of the listed databases.  This is unrelated to searching the databases
1332 -- together. AttributeDetails describes how databases can be searched. Each supported attribute is listed, and the
1333 -- allowable combinations can be described.
1334
1335
1336AttributeDetails ::= SEQUENCE {
1337  commonInfo        [0]  IMPLICIT CommonInfo OPTIONAL,
1338    -- Key elements follow:
1339  databaseName        [1]  IMPLICIT DatabaseName,
1340    -- Non-brief elements follow:
1341  attributesBySet        [2]  IMPLICIT SEQUENCE OF AttributeSetDetails OPTIONAL,
1342                  -- mandatory in full record
1343  attributeCombinations    [3]  IMPLICIT AttributeCombinations OPTIONAL}
1344
1345
1346
1347
1348-- AttributeSetDetails referenced by AttributeDetails
1349  AttributeSetDetails ::= SEQUENCE {
1350        attributeSet      [0] IMPLICIT AttributeSetId,
1351          attributesByType  [1] IMPLICIT SEQUENCE OF AttributeTypeDetails }
1352    AttributeTypeDetails ::= SEQUENCE {
1353         attributeType     [0] IMPLICIT INTEGER,
1354          defaultIfOmitted    [1] IMPLICIT OmittedAttributeInterpretation OPTIONAL,
1355          attributeValues    [2] IMPLICIT SEQUENCE OF AttributeValue OPTIONAL }
1356                          -- If no attributeValues are supplied, all values of this type are fully
1357                    -- supported, and the descriptions in AttributeSetInfo are adequate.
1358
1359    OmittedAttributeInterpretation ::= SEQUENCE {
1360        defaultValue           [0] StringOrNumeric OPTIONAL,
1361                                -- A default value is listed if that's how the server works
1362        defaultDescription  [1] IMPLICIT HumanString OPTIONAL }
1363                          -- The human-readable description should generally be provided.
1364                    -- It is legal for both default elements to be missing, which
1365                    -- means that the target will allow the attribute type to be
1366                    -- omitted, but isn't saying what it will do.
1367
1368    AttributeValue ::= SEQUENCE {
1369        value              [0]  StringOrNumeric,
1370        description        [1]  IMPLICIT HumanString OPTIONAL,
1371        subAttributes     [2]  IMPLICIT SEQUENCE OF StringOrNumeric OPTIONAL,
1372        superAttributes    [3]  IMPLICIT SEQUENCE OF StringOrNumeric OPTIONAL,
1373        partialSupport    [4]  IMPLICIT NULL OPTIONAL }
1374        -- partialSupport indicates that an attributeValue is accepted, but may not be processed in the
1375        -- "expected" way. One important reason for this is composite databases: in this case partialSupport
1376        -- may indicate that only some of the subDbs support the attribute, and others ignore it.
1377
1378
1379
1380TermListDetails ::= SEQUENCE{  -- one for each termList in TermListInfo
1381  commonInfo    [0]  IMPLICIT CommonInfo OPTIONAL,
1382    -- Key elements follow:
1383  termListName    [1]  IMPLICIT InternationalString,
1384    -- Non-key elements (all non-brief) follow:
1385  description    [2]  IMPLICIT HumanString OPTIONAL,
1386  attributes      [3]  IMPLICIT AttributeCombinations OPTIONAL,
1387                          -- Pattern for attributes that hit this list. Mandatory in full record
1388  scanInfo      [4]  IMPLICIT SEQUENCE {
1389                maxStepSize         [0] IMPLICIT INTEGER OPTIONAL,
1390                collatingSequence  [1] IMPLICIT HumanString OPTIONAL,
1391                increasing            [2] IMPLICIT BOOLEAN OPTIONAL} OPTIONAL,
1392            -- Occurs only if list is scanable. If list is scanable and if scanInfo is omitted,
1393            -- target doesn't consider these important.
1394  estNumberTerms  [5]  IMPLICIT INTEGER OPTIONAL,
1395  sampleTerms    [6]  IMPLICIT SEQUENCE OF Term OPTIONAL}
1396
1397
1398
1399ElementSetDetails ::= SEQUENCE {
1400  -- ElementSetDetails describes the way that database records are mapped to record elements. This
1401  -- mapping may be different for each combination of database name and element set. The database record
1402   -- description is a schema, which may be private to the target. The schema's abstract record structure
1403  -- and tag sets provide the vocabulary for discussing record content; their presence in the Explain
1404  -- database does not imply support for complex retrieval specification.
1405  commonInfo      [0]  IMPLICIT CommonInfo OPTIONAL,
1406    -- Key elements follow:
1407  databaseName      [1]  IMPLICIT DatabaseName,
1408  elementSetName    [2]  IMPLICIT ElementSetName,
1409  recordSyntax      [3]  IMPLICIT OBJECT IDENTIFIER,
1410    -- Non-key Brief elements follow:
1411  schema        [4]  IMPLICIT OBJECT IDENTIFIER,
1412    -- Non-brief elements follow:
1413  description      [5]  IMPLICIT HumanString OPTIONAL,
1414  detailsPerElement    [6]  IMPLICIT SEQUENCE OF PerElementDetails OPTIONAL -- mandatory in full record
1415              }
1416
1417
1418RetrievalRecordDetails ::= SEQUENCE {
1419  commonInfo      [0]  IMPLICIT CommonInfo OPTIONAL,
1420    -- Key elements follow:
1421  databaseName      [1]  IMPLICIT DatabaseName,
1422  schema        [2]  IMPLICIT OBJECT IDENTIFIER,
1423  recordSyntax      [3]  IMPLICIT OBJECT IDENTIFIER,
1424    -- Non-brief elements follow:
1425  description      [4]  IMPLICIT HumanString OPTIONAL,
1426  detailsPerElement    [5]  IMPLICIT SEQUENCE OF PerElementDetails OPTIONAL
1427                -- mandatory in full record
1428            }
1429
1430-- PerElementDetails is referenced in RetrievalRecordDetails and ElementSetDetails.
1431  PerElementDetails ::= SEQUENCE {
1432      name      [0]    IMPLICIT InternationalString OPTIONAL,
1433                   -- If the name is omitted, the record syntax's name for this element
1434                  -- is appropriate.
1435      recordTag    [1]    IMPLICIT RecordTag OPTIONAL,
1436                   -- The record tag may be omitted if tags are inappropriate for the record
1437                  -- syntax, or if the origin can be expected to know it for some other reason.
1438      schemaTags    [2]    IMPLICIT SEQUENCE OF Path OPTIONAL,
1439                      -- The information from the listed schema elements is combined
1440                  -- in some way to produce the data sent in the listed record tag. The
1441                  -- 'contents' element below may describe the logic used.
1442      maxSize    [3]    IMPLICIT INTEGER OPTIONAL,
1443      minSize    [4]    IMPLICIT INTEGER OPTIONAL,
1444      avgSize      [5]    IMPLICIT INTEGER OPTIONAL,
1445      fixedSize    [6]    IMPLICIT INTEGER OPTIONAL,
1446      repeatable    [8]    IMPLICIT BOOLEAN,
1447      required    [9]    IMPLICIT BOOLEAN,
1448                  -- 'required' really means that target will always supply the element.
1449      description    [12]  IMPLICIT HumanString OPTIONAL,
1450      contents    [13]  IMPLICIT HumanString OPTIONAL,
1451      billingInfo    [14]  IMPLICIT HumanString OPTIONAL,
1452      restrictions    [15]  IMPLICIT HumanString OPTIONAL,
1453      alternateNames  [16]  IMPLICIT SEQUENCE OF InternationalString OPTIONAL,
1454      genericNames  [17]  IMPLICIT SEQUENCE OF InternationalString OPTIONAL,
1455      searchAccess  [18]  IMPLICIT AttributeCombinations OPTIONAL }
1456      -- RecordTag referenced in PerElementDetails above
1457        RecordTag ::= SEQUENCE {
1458              qualifier  [0] StringOrNumeric OPTIONAL,
1459                    -- E.g. tag set for GRS-1
1460              tagValue  [1] StringOrNumeric}
1461
1462SortDetails ::= SEQUENCE {
1463  commonInfo    [0]  IMPLICIT CommonInfo OPTIONAL,
1464  -- Key elements follow:
1465  databaseName    [1]  IMPLICIT DatabaseName,
1466    -- No non-key brief elements
1467    -- Non-brief elements follow:
1468  sortKeys      [2]  IMPLICIT SEQUENCE OF SortKeyDetails OPTIONAL
1469              -- mandatory in full record
1470          }
1471  SortKeyDetails ::= SEQUENCE {
1472      description        [0]  IMPLICIT HumanString OPTIONAL,
1473      elementSpecifications  [1]  IMPLICIT SEQUENCE OF Specification OPTIONAL,
1474                      -- each specification is a way of specifying this same sort key
1475      attributeSpecifications  [2]  IMPLICIT AttributeCombinations OPTIONAL,
1476                      -- each combination is a way of specifying this same sort key
1477      sortType                   [3]  CHOICE {
1478                    character    [0]  IMPLICIT NULL,
1479                    numeric    [1]  IMPLICIT NULL,
1480                    structured    [2]  IMPLICIT HumanString} OPTIONAL,
1481      caseSensitivity      [4]  IMPLICIT INTEGER {
1482                      always    (0),  -- always case-sensitive
1483                    never    (1),            -- never case-sensitive
1484                    default-yes  (2),               -- case-sensitivity is as specified on request, and if not
1485                            -- specified, case-sensitive.
1486                    default-no  (3)} -- case-sensitivity is as specified on request, and if not
1487                            -- specified, not case-sensitive.
1488                          OPTIONAL}
1489
1490ProcessingInformation ::= SEQUENCE{
1491  commonInfo      [0]  IMPLICIT CommonInfo OPTIONAL,
1492    -- Key elements follow:
1493  databaseName      [1]  IMPLICIT DatabaseName,
1494  processingContext    [2]  IMPLICIT INTEGER {
1495                  access        (0),   -- e.g. choosing databases
1496                  search        (1),   -- e.g. "search strategies" or search forms
1497                  retrieval      (2),   -- e.g. recommended element combinations
1498                  record-presentation  (3),    -- display of retrieved records
1499                  record-handling    (4)    -- handling (e.g. saving) of retrieved records
1500        },
1501  name          [3]  IMPLICIT InternationalString,
1502  oid          [4]  IMPLICIT OBJECT IDENTIFIER,
1503    -- No non-key brief elements
1504    -- Non-brief elements follow:
1505  description      [5]  IMPLICIT HumanString OPTIONAL,
1506                -- use element set name 'description' to retrieve all except instructions.
1507  instructions      [6]  IMPLICIT EXTERNAL OPTIONAL -- mandatory in full record
1508              }
1509
1510
1511VariantSetInfo ::= SEQUENCE {
1512    -- A record in this category describes a variant set definition, i.e., classes, types, and values, for a specific
1513    -- variant set definition supported by the target. Support by the target of a particular variant set definition
1514    -- does not imply that the definition is supported for any specific database or element.
1515  commonInfo    [0] IMPLICIT CommonInfo OPTIONAL,
1516  -- Key elements follow:
1517  variantSet    [1] IMPLICIT OBJECT IDENTIFIER,
1518  -- Non-key brief elements follow:
1519  name      [2] IMPLICIT InternationalString,
1520  -- Non-brief elements follow:
1521  variants    [3] IMPLICIT SEQUENCE OF VariantClass OPTIONAL
1522                   -- mandatory in full record
1523           }
1524
1525  -- Subsidiary structures for VariantSetInfo
1526    VariantClass ::= SEQUENCE {
1527          name        [0] IMPLICIT InternationalString OPTIONAL,
1528          description    [1] IMPLICIT HumanString OPTIONAL,
1529          variantClass    [2] IMPLICIT INTEGER,
1530          variantTypes  [3] IMPLICIT SEQUENCE OF VariantType}
1531    VariantType ::= SEQUENCE {
1532          name            [0] IMPLICIT InternationalString OPTIONAL,
1533          description     [1] IMPLICIT HumanString OPTIONAL,
1534          variantType    [2] IMPLICIT INTEGER,
1535          variantValue  [3] IMPLICIT VariantValue OPTIONAL}
1536    VariantValue ::= SEQUENCE {
1537          dataType     [0] PrimitiveDataType,
1538          values        [1] ValueSet OPTIONAL }
1539    ValueSet ::= CHOICE {
1540          range       [0] IMPLICIT ValueRange,
1541          enumerated  [1] IMPLICIT SEQUENCE OF ValueDescription }
1542    ValueRange ::= SEQUENCE {
1543            -- At last one the following must be supplied, both may be supplied.
1544          lower      [0] ValueDescription OPTIONAL,
1545          upper     [1] ValueDescription OPTIONAL }
1546    ValueDescription ::= CHOICE{
1547      integer             INTEGER,
1548          string              InternationalString,
1549          octets              OCTET STRING,
1550          oid                 OBJECT IDENTIFIER,
1551          unit               [1]  IMPLICIT Unit,
1552          valueAndUnit   [2]  IMPLICIT IntUnit
1553            -- oid and unit can't be used in a ValueRange
1554            }
1555
1556
1557
1558UnitInfo ::= SEQUENCE {
1559  commonInfo  [0] IMPLICIT CommonInfo OPTIONAL,
1560  -- Key elements follow:
1561  unitSystem   [1] IMPLICIT InternationalString,
1562   -- No non-key brief elements
1563   -- Non-brief elements follow:
1564  description   [2] IMPLICIT HumanString OPTIONAL,
1565  units      [3] IMPLICIT SEQUENCE OF UnitType OPTIONAL
1566                         -- mandatory in full record
1567           }
1568
1569  -- Subsidiary structures for UnitInfo
1570    UnitType ::= SEQUENCE {
1571      name    [0] IMPLICIT InternationalString OPTIONAL,
1572      description  [1] IMPLICIT HumanString OPTIONAL,
1573      unitType  [2] StringOrNumeric,
1574      units     [3] IMPLICIT SEQUENCE OF Units}
1575
1576    Units ::= SEQUENCE {
1577      name     [0] IMPLICIT InternationalString OPTIONAL,
1578      description  [1] IMPLICIT HumanString OPTIONAL,
1579      unit      [2] StringOrNumeric}
1580
1581CategoryList ::= SEQUENCE {
1582  commonInfo      [0] IMPLICIT CommonInfo OPTIONAL,
1583    -- Only one record expected per Explain database. All elements appear in brief presentation.
1584  categories      [1] IMPLICIT SEQUENCE OF CategoryInfo }
1585    CategoryInfo ::= SEQUENCE {
1586           category          [1] IMPLICIT InternationalString,
1587            originalCategory    [2] IMPLICIT InternationalString OPTIONAL,
1588          description         [3] IMPLICIT HumanString OPTIONAL,
1589         asn1Module      [4] IMPLICIT InternationalString OPTIONAL}
1590
1591
1592-- - - - - - - - - - - - - - Subsidiary definitions
1593
1594CommonInfo ::= SEQUENCE {
1595  dateAdded         [0] IMPLICIT GeneralizedTime OPTIONAL,
1596  dateChanged       [1] IMPLICIT GeneralizedTime OPTIONAL,
1597  expiry                [2] IMPLICIT GeneralizedTime OPTIONAL,
1598  humanString-Language  [3] IMPLICIT LanguageCode OPTIONAL,
1599  -- following not to occur for brief:
1600  otherInfo          OtherInformation OPTIONAL}
1601
1602
1603HumanString ::= SEQUENCE OF SEQUENCE {
1604          language  [0] IMPLICIT LanguageCode OPTIONAL,
1605        text        [1] IMPLICIT InternationalString}
1606
1607IconObject ::= SEQUENCE OF SEQUENCE{
1608      -- Note that the "SEQUENCE OF" is to allow alternative representations of the same Icon; it is not
1609      -- intended to allow multiple icons.
1610  bodyType [1] CHOICE{
1611           ianaType  [1] IMPLICIT InternationalString,
1612          z3950type  [2] IMPLICIT InternationalString,
1613           otherType  [3] IMPLICIT InternationalString},
1614  content  [2] IMPLICIT OCTET STRING}
1615
1616
1617LanguageCode ::= InternationalString  -- from ANSI/NISO Z39.53-1994
1618
1619ContactInfo ::= SEQUENCE {
1620  name           [0] IMPLICIT InternationalString OPTIONAL,
1621  description  [1] IMPLICIT HumanString OPTIONAL,
1622  address        [2] IMPLICIT HumanString OPTIONAL,
1623  email         [3] IMPLICIT InternationalString OPTIONAL,
1624  phone         [4] IMPLICIT InternationalString OPTIONAL}
1625
1626NetworkAddress ::= CHOICE {
1627  internetAddress      [0] IMPLICIT SEQUENCE {
1628                  hostAddress    [0]  IMPLICIT InternationalString,
1629                  port       [1]  IMPLICIT INTEGER},
1630  osiPresentationAddress    [1] IMPLICIT SEQUENCE {
1631                    pSel         [0] IMPLICIT InternationalString,
1632                    sSel         [1] IMPLICIT InternationalString OPTIONAL,
1633                    tSel        [2] IMPLICIT InternationalString OPTIONAL,
1634                    nSap      [3] IMPLICIT InternationalString},
1635  other            [2] IMPLICIT SEQUENCE {
1636                      type        [0] IMPLICIT InternationalString,
1637                address    [1] IMPLICIT InternationalString}}
1638
1639AccessInfo ::= SEQUENCE {
1640    -- AccessInfo contains the fundamental information about what facilities are required to use this target
1641    -- or server. For example, if an origin can handle none of the record syntaxes a database can provide,
1642    -- it might choose not to access the database.
1643  queryTypesSupported  [0]    IMPLICIT SEQUENCE OF QueryTypeDetails OPTIONAL,
1644  diagnosticsSets        [1]    IMPLICIT SEQUENCE OF OBJECT IDENTIFIER OPTIONAL,
1645  attributeSetIds          [2]    IMPLICIT SEQUENCE OF AttributeSetId OPTIONAL,
1646  schemas                [3]    IMPLICIT SEQUENCE OF OBJECT IDENTIFIER OPTIONAL,
1647  recordSyntaxes         [4]    IMPLICIT SEQUENCE OF OBJECT IDENTIFIER OPTIONAL,
1648  resourceChallenges    [5]    IMPLICIT SEQUENCE OF OBJECT IDENTIFIER OPTIONAL,
1649  restrictedAccess       [6]    IMPLICIT AccessRestrictions OPTIONAL,
1650  costInfo                 [8]    IMPLICIT Costs OPTIONAL,
1651  variantSets       [9]    IMPLICIT SEQUENCE OF OBJECT IDENTIFIER OPTIONAL,
1652  elementSetNames    [10]  IMPLICIT SEQUENCE OF ElementSetName OPTIONAL,
1653  unitSystems      [11]  IMPLICIT SEQUENCE OF InternationalString}
1654
1655-- begin auxiliary definitions for AccessInfo
1656-- Begin Query Details
1657QueryTypeDetails ::= CHOICE {
1658  private       [0]    IMPLICIT PrivateCapabilities,
1659  rpn            [1]    IMPLICIT RpnCapabilities,
1660  iso8777          [2]    IMPLICIT Iso8777Capabilities,
1661  z39-58      [100]  IMPLICIT HumanString,
1662  erpn        [101]  IMPLICIT RpnCapabilities,
1663  rankedList      [102]  IMPLICIT HumanString}
1664
1665PrivateCapabilities ::= SEQUENCE {
1666  operators       [0]  IMPLICIT SEQUENCE OF SEQUENCE {
1667              operator  [0] IMPLICIT InternationalString,
1668              description  [1] IMPLICIT HumanString OPTIONAL } OPTIONAL,
1669  searchKeys    [1]  IMPLICIT SEQUENCE OF SearchKey OPTIONAL,  -- field names that can be searched
1670  description    [2]  IMPLICIT SEQUENCE OF HumanString OPTIONAL }
1671
1672RpnCapabilities ::= SEQUENCE {
1673  operators                    [0] IMPLICIT SEQUENCE OF INTEGER OPTIONAL,
1674                                        -- Omitted means all operators are supported.
1675  resultSetAsOperandSupported  [1] IMPLICIT BOOLEAN,
1676  restrictionOperandSupported    [2] IMPLICIT BOOLEAN,
1677  proximity                    [3] IMPLICIT ProximitySupport OPTIONAL}
1678
1679Iso8777Capabilities ::= SEQUENCE {
1680  searchKeys  [0]  IMPLICIT SEQUENCE OF SearchKey,  -- field names that may be searched
1681  restrictions   [1]  IMPLICIT HumanString OPTIONAL
1682            -- Omitted means supported, not specifying units.
1683              }
1684
1685ProximitySupport ::= SEQUENCE {
1686  anySupport      [0]   IMPLICIT BOOLEAN,
1687          -- 'false' means no proximity support, in which case unitsSupported not supplied.
1688  unitsSupported  [1]   IMPLICIT SEQUENCE OF CHOICE{
1689             known  [1] IMPLICIT INTEGER, -- values from KnownProximityUnit
1690          private  [2] IMPLICIT SEQUENCE{
1691                      unit    [0] IMPLICIT INTEGER,
1692                description  [1] HumanString OPTIONAL}} OPTIONAL}
1693
1694SearchKey ::= SEQUENCE {
1695  searchKey     [0]  IMPLICIT InternationalString,
1696  description     [1]  IMPLICIT HumanString OPTIONAL }
1697-- End Query details
1698AccessRestrictions ::= SEQUENCE OF SEQUENCE {
1699  accessType      [0] INTEGER {
1700                  any         (0),
1701                  search         (1),
1702                  present         (2),
1703                  specific-elements  (3),
1704                  extended-services  (4),
1705            by-database      (5)},
1706  accessText         [1]  IMPLICIT HumanString OPTIONAL,
1707  accessChallenges  [2]  IMPLICIT SEQUENCE OF OBJECT IDENTIFIER OPTIONAL}
1708
1709Costs ::= SEQUENCE {
1710  connectCharge    [0] IMPLICIT Charge OPTIONAL,    -- Per-connection charge
1711  connectTime    [1] IMPLICIT Charge OPTIONAL,    -- Time-based charge
1712  displayCharge     [2] IMPLICIT Charge OPTIONAL,    -- Per-record charge
1713  searchCharge     [3] IMPLICIT Charge OPTIONAL,    -- Per-search charge
1714  subscriptCharge  [4]  IMPLICIT Charge OPTIONAL,  -- Subscription charges
1715  otherCharges    [5] IMPLICIT SEQUENCE OF SEQUENCE{   -- Other charges
1716            forWhat  [1]  IMPLICIT HumanString,
1717            charge    [2]  IMPLICIT Charge} OPTIONAL}
1718    Charge ::= SEQUENCE{
1719        cost          [1] IMPLICIT IntUnit,
1720        perWhat  [2] IMPLICIT Unit OPTIONAL,
1721                      -- e.g. "second," "minute," "line," "record"...
1722        text          [3] IMPLICIT HumanString OPTIONAL}
1723-- End Auxiliary definitions for AccessInfo
1724
1725DatabaseList ::= SEQUENCE OF DatabaseName
1726
1727AttributeCombinations ::= SEQUENCE {
1728  defaultAttributeSet  [0] IMPLICIT AttributeSetId,
1729                 -- Default for the combinations. Also probably a good choice for the default
1730              -- in searches, but that isn't required.
1731  legalCombinations  [1] IMPLICIT SEQUENCE OF AttributeCombination }
1732
1733
1734AttributeCombination ::= SEQUENCE OF AttributeOccurrence
1735            -- An AttributeCombination is a pattern for legal combination of attributes
1736
1737
1738AttributeOccurrence ::= SEQUENCE {
1739      -- An AttributeOccurrence lists the legal values for a specific attribute type in a combination.
1740       attributeSet       [0]  IMPLICIT AttributeSetId OPTIONAL,
1741       attributeType      [1]  IMPLICIT INTEGER,
1742       mustBeSupplied  [2]  IMPLICIT NULL OPTIONAL,
1743       attributeValues    CHOICE {
1744                      any-or-none  [3] IMPLICIT NULL, -- All supported values are OK
1745                      specific    [4] IMPLICIT SEQUENCE OF StringOrNumeric}}
1746                                                  -- Only these values allowed
1747END
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757RecordSyntax-SUTRS
1758{Z39-50-recordSyntax SUTRS (101)} DEFINITIONS ::=
1759BEGIN
1760IMPORTS InternationalString  FROM Z39-50-APDU-1995;
1761        SutrsRecord ::=  InternationalString
1762-- Line terminator is ASCII LF (X'0A').
1763-- Recommended maximum line length is 72 characters.
1764END
1765
1766
1767
1768
1769
1770RecordSyntax-opac
1771{Z39-50-recordSyntax opac (102)} DEFINITIONS ::=
1772BEGIN
1773IMPORTS InternationalString  FROM Z39-50-APDU-1995;
1774OPACRecord ::= SEQUENCE {
1775  bibliographicRecord   [1]   IMPLICIT EXTERNAL OPTIONAL,
1776  holdingsData     [2]   IMPLICIT SEQUENCE OF HoldingsRecord OPTIONAL}
1777HoldingsRecord ::=  CHOICE {
1778  marcHoldingsRecord  [1]   IMPLICIT EXTERNAL,
1779  holdingsAndCirc  [2]  IMPLICIT HoldingsAndCircData}
1780HoldingsAndCircData ::=  SEQUENCE {
1781-- the following elements are required to display holdings in conformance with NISO standards.
1782  typeOfRecord    [1]   IMPLICIT InternationalString OPTIONAL, -- LDR 06
1783  encodingLevel    [2]   IMPLICIT InternationalString OPTIONAL, -- LDR 017
1784  format      [3]   IMPLICIT InternationalString OPTIONAL, -- 007 00-01
1785  receiptAcqStatus    [4]   IMPLICIT InternationalString OPTIONAL, -- 008 06
1786  generalRetention    [5]   IMPLICIT InternationalString OPTIONAL, -- 008 12
1787  completeness    [6]   IMPLICIT InternationalString OPTIONAL, -- 008 16
1788       dateOfReport     [7]   IMPLICIT InternationalString OPTIONAL, -- 008 26-31
1789  nucCode    [8]   IMPLICIT InternationalString OPTIONAL, -- 852 $a
1790  localLocation    [9]   IMPLICIT InternationalString OPTIONAL, -- 852 $b
1791  shelvingLocation  [10]   IMPLICIT InternationalString OPTIONAL, -- 852 $c
1792  callNumber    [11]   IMPLICIT InternationalString OPTIONAL, -- 852 $h and $i
1793  shelvingData     [12]   IMPLICIT InternationalString OPTIONAL, -- 852 $j thru $m
1794  copyNumber    [13]   IMPLICIT InternationalString OPTIONAL, -- 852 $t
1795  publicNote    [14]   IMPLICIT InternationalString OPTIONAL, -- 852 $z
1796  reproductionNote  [15]   IMPLICIT InternationalString OPTIONAL, -- 843
1797  termsUseRepro     [16]   IMPLICIT InternationalString OPTIONAL, -- 845
1798  enumAndChron    [17]   IMPLICIT InternationalString OPTIONAL, -- all 85x, 86x
1799  volumes     [18]   IMPLICIT SEQUENCE OF Volume OPTIONAL,
1800            -- repeats for each volume held
1801  circulationData    [19]   IMPLICIT SEQUENCE OF CircRecord OPTIONAL
1802            -- repeats for each circulating item.
1803            }
1804Volume ::=  SEQUENCE {
1805  enumeration    [1]   IMPLICIT InternationalString OPTIONAL,
1806  chronology     [2]   IMPLICIT InternationalString OPTIONAL,
1807  enumAndChron    [3]   IMPLICIT InternationalString OPTIONAL }
1808CircRecord ::=  SEQUENCE {
1809  availableNow    [1]   IMPLICIT BOOLEAN,
1810  availablityDate    [2]   IMPLICIT InternationalString OPTIONAL,
1811  availableThru      [3]   IMPLICIT InternationalString OPTIONAL,
1812  restrictions     [4]   IMPLICIT InternationalString OPTIONAL,
1813  itemId        [5]   IMPLICIT InternationalString OPTIONAL,
1814  renewable        [6]   IMPLICIT BOOLEAN,
1815  onHold        [7]   IMPLICIT BOOLEAN,
1816  enumAndChron     [8]   IMPLICIT InternationalString OPTIONAL,
1817  midspine    [9]   IMPLICIT InternationalString OPTIONAL,
1818  temporaryLocation  [10]   IMPLICIT InternationalString OPTIONAL}
1819END
1820
1821
1822
1823RecordSyntax-summary
1824
1825{Z39-50-recordSyntax summary (103)} DEFINITIONS ::=
1826BEGIN
1827IMPORTS OtherInformation, InternationalString  FROM Z39-50-APDU-1995;
1828BriefBib ::= SEQUENCE {
1829  title           [1]   IMPLICIT InternationalString,
1830  author            [2]   IMPLICIT InternationalString OPTIONAL,
1831  callNumber         [3]   IMPLICIT InternationalString OPTIONAL,
1832  recordType      [4]   IMPLICIT InternationalString OPTIONAL,
1833  bibliographicLevel  [5]   IMPLICIT InternationalString OPTIONAL,
1834  format        [6]   IMPLICIT SEQUENCE OF FormatSpec OPTIONAL,
1835  publicationPlace    [7]   IMPLICIT InternationalString OPTIONAL,
1836  publicationDate     [8]   IMPLICIT InternationalString OPTIONAL,
1837  targetSystemKey   [9]   IMPLICIT InternationalString OPTIONAL,
1838  satisfyingElement  [10]   IMPLICIT InternationalString OPTIONAL,
1839  rank         [11]   IMPLICIT INTEGER OPTIONAL,
1840  documentId     [12]   IMPLICIT InternationalString OPTIONAL,
1841  abstract       [13]   IMPLICIT InternationalString OPTIONAL,
1842  otherInfo        OtherInformation OPTIONAL}
1843
1844FormatSpec     ::=  SEQUENCE {
1845  type         [1]   IMPLICIT InternationalString,
1846  size      [2]   IMPLICIT INTEGER OPTIONAL,
1847  bestPosn     [3]   IMPLICIT INTEGER OPTIONAL}
1848END
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859RecordSyntax-generic  -- For detailed semantics, see Appendix RET.
1860{Z39-50-recordSyntax GRS-1 (105)} DEFINITIONS ::=
1861BEGIN
1862EXPORTS Variant;
1863IMPORTS IntUnit, Unit, InternationalString, StringOrNumeric, Term FROM Z39-50-APDU-1995;
1864
1865GenericRecord ::= SEQUENCE OF TaggedElement
1866TaggedElement ::= SEQUENCE {
1867  tagType    [1] IMPLICIT INTEGER OPTIONAL,
1868              -- If omitted, default should be supplied dynamically by tagSet-M;
1869              -- otherwise it should be statically specified by the schema.
1870  tagValue    [2] StringOrNumeric,
1871  tagOccurrence  [3] IMPLICIT INTEGER OPTIONAL,
1872                             -- Occurrence within the database record, and relative to the parent. No
1873              -- default; if omitted, target not telling or it is irrelevant.
1874  content      [4] ElementData,
1875  metaData    [5] IMPLICIT ElementMetaData OPTIONAL,
1876  appliedVariant  [6] IMPLICIT Variant OPTIONAL}
1877
1878ElementData ::= CHOICE{
1879  octets      OCTET STRING,
1880  numeric    INTEGER,
1881  date      GeneralizedTime,
1882  ext        EXTERNAL,
1883  string      InternationalString,
1884  trueOrFalse    BOOLEAN,
1885  oid        OBJECT IDENTIFIER,
1886  intUnit          [1]  IMPLICIT IntUnit,
1887   elementNotThere    [2] IMPLICIT NULL,  -- element requested but not there
1888  elementEmpty      [3] IMPLICIT NULL,  -- element there, but empty
1889  noDataRequested    [4] IMPLICIT NULL,  -- variant request said 'no data'
1890  diagnostic        [5] IMPLICIT EXTERNAL,
1891  subtree          [6] SEQUENCE OF TaggedElement -- recursive, for nested tags
1892              }
1893
1894
1895ElementMetaData ::= SEQUENCE{
1896  seriesOrder        [1]   IMPLICIT Order OPTIONAL, -- only for a non-leaf node
1897  usageRight        [2]   IMPLICIT Usage OPTIONAL,
1898  hits            [3]    IMPLICIT SEQUENCE OF HitVector OPTIONAL,
1899  displayName      [4]    IMPLICIT InternationalString OPTIONAL,
1900                    -- name for element that origin can use for display
1901  supportedVariants    [5]   IMPLICIT SEQUENCE OF Variant OPTIONAL,
1902  message        [6]    IMPLICIT InternationalString OPTIONAL,
1903  elementDescriptor    [7]   IMPLICIT OCTET STRING OPTIONAL,
1904  surrogateFor      [8]   IMPLICIT TagPath OPTIONAL,
1905                    -- the retrieved element is a surrogate for the element given by this path
1906  surrogateElement    [9]   IMPLICIT TagPath OPTIONAL,
1907                    -- the element given by this path is a surrogate for the retrieved element
1908    other          [99]  IMPLICIT EXTERNAL OPTIONAL}
1909
1910        TagPath ::= SEQUENCE  OF SEQUENCE{
1911          tagType      [1]  IMPLICIT INTEGER OPTIONAL,
1912            tagValue      [2]  StringOrNumeric,
1913            tagOccurrence    [3]  IMPLICIT INTEGER OPTIONAL}
1914
1915
1916
1917Order ::= SEQUENCE{
1918  ascending    [1] IMPLICIT BOOLEAN,
1919              -- "true" means monotonically increasing (i.e. non-decreasing);
1920              -- "false" means monotonically decreasing (i.e. non-increasing).
1921  order      [2] IMPLICIT INTEGER
1922              -- Same as defined by 'elementOrdering' in tagSet-M, though this may be
1923              -- overridden by schema.
1924          }
1925
1926
1927
1928Usage ::= SEQUENCE  {
1929  type        [1] IMPLICIT INTEGER{
1930              redistributable    (1),   -- Element is freely redistributable.
1931              restricted      (2),   -- Restriction contains statement.
1932              licensePointer    (3)   -- Restriction contains license pointer.
1933              },
1934  restriction    [2] IMPLICIT InternationalString OPTIONAL}
1935
1936
1937
1938HitVector ::= SEQUENCE{
1939    -- Each hit vector points to a fragment within the element, via location and/or token.
1940  satisfier            Term OPTIONAL, -- sourceword, etc.
1941  offsetIntoElement    [1] IMPLICIT IntUnit OPTIONAL,
1942  length          [2] IMPLICIT IntUnit OPTIONAL,
1943  hitRank          [3] IMPLICIT INTEGER OPTIONAL,
1944  targetToken        [4] IMPLICIT OCTET STRING OPTIONAL
1945                  -- Origin may use token subsequently within a variantRequest (in
1946                  --  an elementRequest) to retrieve (or to refer to) the fragment.
1947              }
1948
1949
1950
1951
1952Variant ::= SEQUENCE{
1953    globalVariantSetId    [1] IMPLICIT OBJECT IDENTIFIER OPTIONAL,
1954                  -- Applies to the triples below, when variantSetId omitted. If
1955                  -- globalVariantSetId omitted, default applies. Default may be provided by
1956                  -- the tagSet-M element defaultVariantSetId.
1957
1958
1959
1960
1961  triples          [2]  IMPLICIT SEQUENCE OF SEQUENCE{
1962                  variantSetId  [0]  IMPLICIT OBJECT IDENTIFIER OPTIONAL,
1963                              -- If omitted, globalVariantSetId (above)
1964                              -- applies, unless that too is omitted, in
1965                               -- which case, default used.
1966                  class      [1]  IMPLICIT INTEGER,
1967                  type      [2]  IMPLICIT INTEGER,
1968                  value      [3]  CHOICE{
1969                               integer INTEGER,
1970                               internationalString InternationalString,
1971                               octetString OCTET STRING,
1972                               objectIdentifier OBJECT IDENTIFIER,
1973                               boolean BOOLEAN,
1974                              null NULL,
1975                          -- Following need context tags:
1976                            unit      [1] IMPLICIT Unit,
1977                            valueAndUnit  [2] IMPLICIT IntUnit}}}
1978END
1979
1980
1981
1982RecordSyntax-ESTaskPackage
1983{Z39-50-recordSyntax ESTaskPackage (106)} DEFINITIONS ::=
1984BEGIN
1985IMPORTS Permissions, InternationalString, IntUnit, DiagRec FROM Z39-50-APDU-1995;
1986
1987TaskPackage ::= SEQUENCE{
1988  packageType      [1]   IMPLICIT OBJECT IDENTIFIER,
1989                    -- oid of specific ES definition
1990  packageName      [2]   IMPLICIT InternationalString OPTIONAL,
1991  userId          [3]   IMPLICIT InternationalString OPTIONAL,
1992  retentionTime      [4]   IMPLICIT IntUnit OPTIONAL,
1993  permissions        [5]   IMPLICIT Permissions OPTIONAL,
1994  description        [6]   IMPLICIT InternationalString OPTIONAL,
1995  targetReference      [7]   IMPLICIT OCTET STRING OPTIONAL,
1996  creationDateTime    [8]   IMPLICIT GeneralizedTime OPTIONAL,
1997  taskStatus        [9]   IMPLICIT INTEGER{
1998                      pending    (0),
1999                      active    (1),
2000                      complete  (2),
2001                      aborted    (3)},
2002  packageDiagnostics    [10]  IMPLICIT SEQUENCE OF DiagRec OPTIONAL,
2003  taskSpecificParameters  [11]  IMPLICIT EXTERNAL
2004                    -- Use oid for specific ES definition
2005                    -- (same oid as packageType above)
2006                    -- and select [2] "taskPackage."
2007    }
2008END
2009
2010
2011
2012
2013ResourceReport-Format-Resource-1
2014{Z39-50-resourceReport resource-1 (1)} DEFINITIONS ::=
2015BEGIN
2016IMPORTS InternationalString FROM Z39-50-APDU-1995;
2017--
2018ResourceReport ::= SEQUENCE{
2019estimates    [1]   IMPLICIT SEQUENCE OF Estimate,
2020message      [2]   IMPLICIT InternationalString}
2021--
2022Estimate ::= SEQUENCE{
2023type        [1]   IMPLICIT EstimateType,
2024value        [2]   IMPLICIT INTEGER,  -- the actual estimate
2025currency-code  [3]   IMPLICIT INTEGER OPTIONAL
2026                -- code for representation of currencies defined in ISO 4217-1990.
2027                -- Applicable only to monetary estimates.
2028                              }
2029EstimateType ::= INTEGER{
2030currentSearchRecords    (1),         -- estimated no. records in current (incomplete) result set for search
2031finalSearchRecords       (2),        -- estimated no. records that will be in result set if search completes
2032currentPresentRecords    (3),        -- estimated number of records in current (incomplete) set of
2033                      -- records to be returned on Present
2034finalPresentRecords      (4),  -- estimated number of records that will be in the set of records
2035                      -- to be returned by Present if Present completes
2036currentOpTimeProcessing  (5),  -- processing time (in .001 CPU seconds) used by operation so far
2037finalOpTimeProcessing    (6),                -- estimated total processing time (in .001 CPU seconds) that will
2038                              -- be used by this operation if it completes
2039currentAssocTime      (7),  -- estimated processing time used by association (in .001 CPU sec.)
2040currentOperationCost      (8),  -- estimated cost for this operation so far
2041finalOperationCost      (9),  -- estimated cost for this operation if it completes
2042currentAssocCost        (10),  -- estimated cost for this association so far
2043finalOpTimeElapsed            (11),  -- estimated elapsed time for operation if it completes (in .001 sec.)
2044percentComplete         (12), -- estimated percent complete
2045currentSearchAssocCost    (13),  -- estimated search cost for association so far
2046currentPresentAssocCost  (14),  -- estimated present cost for this association so far
2047currentConnectAssocCost    (15),  -- estimated connect time cost for association so far
2048currentOtherAssocCost    (16)  -- estimated other cost (not included in 13-15) for association so far
2049                  }
2050END
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064ResourceReport-Format-Resource-2
2065{Z39-50-resourceReport resource-2 (2)} DEFINITIONS ::=
2066BEGIN
2067IMPORTS InternationalString, StringOrNumeric, IntUnit FROM Z39-50-APDU-1995;
2068--
2069ResourceReport ::= SEQUENCE{
2070estimates    [1]   IMPLICIT SEQUENCE OF Estimate OPTIONAL,
2071message      [2]   IMPLICIT InternationalString OPTIONAL}
2072--
2073Estimate ::= SEQUENCE{
2074type      [1]   StringOrNumeric,
2075              -- Numeric values of 1-16 are the same as used in Resource-1.
2076value      [2]   IMPLICIT IntUnit
2077              -- When expressing currency:
2078              --    unitSystem (of Unit) is 'z3950'  (case insensitive)
2079              --    unitType is 'iso4217-1990'       (case insensitive)
2080              --    unit is currency code from ISO 4217-1990.
2081}
2082END
2083
2084
2085
2086
2087
2088AccessControlFormat-prompt-1
2089{Z39-50-accessControl prompt-1 (1)} DEFINITIONS ::=
2090BEGIN
2091IMPORTS InternationalString, DiagRec FROM Z39-50-APDU-1995;
2092--
2093PromptObject ::= CHOICE{
2094  challenge      [1] IMPLICIT Challenge,
2095   response        [2] IMPLICIT Response}
2096
2097  Challenge ::= SEQUENCE OF SEQUENCE {
2098    promptId      [1] PromptId,
2099                    -- Target supplies a number (for an enumerated prompt) or string (for a non
2100                    -- -enumerated prompt), for each prompt, and the origin returns it in response, for
2101                    -- this prompt, so target may correlate the prompt response with the prompt.
2102    defaultResponse  [2] IMPLICIT InternationalString OPTIONAL,
2103     promptInfo      [3] CHOICE{
2104                    character  [1] IMPLICIT InternationalString,
2105                    encrypted  [2] IMPLICIT Encryption} OPTIONAL,
2106                    -- Information corresponding to an enumerated prompt. For example if 'type', within
2107                    -- PromptId, is 'copyright', then promptInfo may contain a copyright statement.
2108    regExpr        [4] IMPLICIT InternationalString OPTIONAL,
2109                              -- A regular expression that promptResponse should match. See IEEE 1003.2
2110                    -- Volume 1, Section 2.8 "Regular Expression Notation." For example if promptId
2111                    -- is "Year of publication," regExpr might be "19[89][0-9]|20[0-9][0-9]".
2112    responseRequired  [5] IMPLICIT NULL OPTIONAL,
2113     allowedValues    [6] IMPLICIT SEQUENCE OF InternationalString OPTIONAL,
2114                        -- e.g. promptId="Desired color"; allowed = 'red', 'blue','Green'.
2115    shouldSave      [7] IMPLICIT NULL OPTIONAL,
2116                        -- Target recommends that origin save the data that it prompts from the
2117                     -- user corresponding to this prompt, because it is likely to be requested again (so
2118                    -- origin might not have to prompt the user next time).
2119        dataType        [8] IMPLICIT INTEGER{
2120                             integer        (1),
2121                          date            (2),
2122                        float           (3),
2123                        alphaNumeric  (4),
2124                        url-urn       (5),
2125                        boolean       (6)} OPTIONAL,
2126                        -- Target telling origin type of data it wants. E.g., if "date" is specified,
2127                        -- presumably the origin will try to prompt something "date-like" from the user.
2128        diagnostic       [9] IMPLICIT EXTERNAL OPTIONAL
2129                          -- Intended for repeat requests when there is an error the origin
2130                        -- should report to the user from previous attempt.
2131                }
2132
2133
2134  Response ::= SEQUENCE OF SEQUENCE {
2135      promptId    [1] PromptId,
2136                  -- Corresponds to a prompt in the challenge, or may be unprompted, for
2137                  -- example "newPassword." If unprompted, should be "enumerated."
2138                  -- If this responds to a non-enumerated prompt, then nonEnumeratedPrompt
2139                   -- should contain the prompt string from the challenge.
2140    promptResponse  [2] CHOICE{
2141                    string      [1] IMPLICIT InternationalString,
2142                    accept      [2] IMPLICIT BOOLEAN,
2143                    acknowledge  [3] IMPLICIT NULL,
2144                    diagnostic    [4] DiagRec,
2145                     encrypted    [5] IMPLICIT Encryption}}
2146
2147
2148 PromptId ::= CHOICE{
2149  enummeratedPrompt    [1] IMPLICIT SEQUENCE{
2150                      type            [1] IMPLICIT INTEGER{
2151                                      groupId    (0),
2152                                      userId     (1),
2153                                      password   (2),
2154                                      newPassword  (3),
2155                                      copyright    (4),
2156                            -- When type on Challenge is 'copyright', promptInfo has text of
2157                            -- copyright message to be displayed verbatim to the user. If
2158                            -- promptResponse indicates 'acceptance', this indicates the user has been
2159                            -- shown, and accepted, the terms of the copyright. This is not intended
2160                            -- to be legally binding, but provides a good-faith attempt on
2161                            -- the part of the target to inform the user of the copyright.
2162                                      sessionId      (5)},
2163                      suggestedString    [2] IMPLICIT InternationalString OPTIONAL},
2164   nonEnumeratedPrompt  [2] IMPLICIT InternationalString}
2165
2166
2167 Encryption ::= SEQUENCE{
2168  cryptType    [1] IMPLICIT OCTET STRING OPTIONAL,
2169  credential    [2] IMPLICIT OCTET STRING OPTIONAL,
2170                    --random number, SALT, or other factor
2171  data        [3] IMPLICIT OCTET STRING}
2172
2173END
2174
2175
2176
2177
2178AccessControlFormat-des-1
2179{Z39-50-accessControlFormat  des-1 (2)} DEFINITIONS ::=
2180BEGIN
2181    DES-RN-Object ::= CHOICE {
2182      challenge    [1]    IMPLICIT DRNType,
2183      response      [2]    IMPLICIT DRNType}
2184    DRNType ::= SEQUENCE{
2185          userId        [1]    IMPLICIT OCTET STRING OPTIONAL,
2186          salt          [2]    IMPLICIT OCTET STRING OPTIONAL,
2187          randomNumber  [3]    IMPLICIT OCTET STRING}
2188END
2189
2190
2191AccessControlFormat-krb-1
2192{Z39-50-accessControlFormat  krb-1 (3)} DEFINITIONS ::=
2193BEGIN
2194IMPORTS InternationalString FROM Z39-50-APDU-1995;
2195
2196     KRBObject ::= CHOICE {
2197       challenge   [1]    IMPLICIT KRBRequest,
2198       response    [2]    IMPLICIT KRBResponse}
2199     KRBRequest ::= SEQUENCE{
2200           service         [1]   IMPLICIT InternationalString,
2201           instance        [2]   IMPLICIT InternationalString OPTIONAL,
2202           realm          [3]   IMPLICIT InternationalString OPTIONAL}
2203        -- target requests a ticket for the given service, instance, and realm
2204     KRBResponse ::= SEQUENCE{
2205           userid            [1]   IMPLICIT InternationalString OPTIONAL,
2206           ticket           [2]  IMPLICIT OCTET STRING}
2207        -- origin responds with a ticket for the requested service
2208END
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218ESFormat-PersistentResultSet
2219{Z39-50-extendedService PersistentResultSet (1)} DEFINITIONS ::=
2220BEGIN
2221IMPORTS InternationalString FROM Z39-50-APDU-1995;
2222PersistentResultSet ::= CHOICE{
2223    esRequest    [1] IMPLICIT SEQUENCE{
2224        toKeep    [1] IMPLICIT NULL,
2225        notToKeep  [2] OriginPartNotToKeep OPTIONAL},
2226    taskPackage  [2] IMPLICIT SEQUENCE{
2227        originPart  [1] IMPLICIT NULL,
2228        targetPart  [2] TargetPart OPTIONAL}}
2229OriginPartNotToKeep ::= SEQUENCE{
2230  originSuppliedResultSet  [1] IMPLICIT InternationalString OPTIONAL,
2231          -- name of transient result set, supplied on request, mandatory unless function is 'delete'
2232  replaceOrAppend    [2] IMPLICIT INTEGER{  -- only if function is "modify"
2233          replace    (1),
2234          append    (2)} OPTIONAL}
2235TargetPart ::= SEQUENCE{
2236  targetSuppliedResultSet  [1] IMPLICIT InternationalString OPTIONAL,
2237          -- Name of transient result set, supplied by target, representing the persistent result set to which
2238          -- package pertains. Meaningful only when package  is presented. (i.e. not on ES response).
2239  numberOfRecords  [2] IMPLICIT INTEGER OPTIONAL}
2240END
2241
2242
2243ESFormat-PersistentQuery
2244{Z39-50-extendedService PersistentQuery (2)} DEFINITIONS ::=
2245BEGIN
2246IMPORTS Query, InternationalString, OtherInformation FROM Z39-50-APDU-1995;
2247PersistentQuery ::= CHOICE{
2248    esRequest      [1] IMPLICIT SEQUENCE{
2249        toKeep    [1] OriginPartToKeep OPTIONAL,
2250        notToKeep  [2] OriginPartNotToKeep},
2251    taskPackage    [2] IMPLICIT SEQUENCE{
2252        originPart  [1] OriginPartToKeep OPTIONAL,
2253        targetPart  [2] TargetPart}}
2254OriginPartToKeep ::= SEQUENCE{
2255  dbNames        [2] IMPLICIT SEQUENCE OF InternationalString OPTIONAL,
2256  additionalSearchInfo  [3] OtherInformation OPTIONAL}
2257OriginPartNotToKeep ::= CHOICE{
2258  package    [1] IMPLICIT InternationalString,
2259  query    [2] Query}
2260TargetPart ::= Query
2261END
2262
2263ESFormat-PeriodicQuerySchedule
2264{Z39-50-extendedService PeriodicQuerySchedule (3)} DEFINITIONS ::=
2265BEGIN
2266IMPORTS Query, InternationalString, IntUnit FROM Z39-50-APDU-1995
2267ExportSpecification, Destination FROM ESFormat-ExportSpecification;
2268
2269PeriodicQuerySchedule ::= CHOICE{
2270    esRequest    [1] IMPLICIT SEQUENCE{
2271              toKeep    [1] OriginPartToKeep,
2272              notToKeep  [2] OriginPartNotToKeep},
2273    taskPackage    [2] IMPLICIT SEQUENCE{
2274              originPart  [1] OriginPartToKeep,
2275              targetPart  [2] TargetPart}}
2276
2277OriginPartToKeep ::=SEQUENCE{
2278  activeFlag          [1] IMPLICIT BOOLEAN,
2279  databaseNames        [2] IMPLICIT SEQUENCE OF InternationalString OPTIONAL,
2280  resultSetDisposition      [3] IMPLICIT INTEGER{
2281                    replace    (1),
2282                    append    (2),
2283                    createNew  (3)  -- Only if origin and target have agreement about
2284                            -- naming convention for the resulting package,
2285                             -- and only if no result set is specified.
2286                } OPTIONAL,   -- Mandatory on 'create' if result set is specified, in
2287                        -- which case it must be 'replace' or 'append.
2288  alertDestination        [4] Destination OPTIONAL,
2289  exportParameters      [5] CHOICE{
2290                    packageName  [1]   IMPLICIT InternationalString,
2291                    exportPackage  [2] ExportSpecification} OPTIONAL}
2292
2293OriginPartNotToKeep ::= SEQUENCE{
2294  querySpec           [1] CHOICE{
2295                    actualQuery    [1] Query,
2296                    packageName  [2] IMPLICIT InternationalString} OPTIONAL,
2297                  -- mandatory for 'create'
2298  originSuggestedPeriod    [2] Period OPTIONAL,  -- mandatory for 'create'
2299  expiration          [3] IMPLICIT GeneralizedTime OPTIONAL,
2300  resultSetPackage        [4] IMPLICIT InternationalString OPTIONAL}
2301
2302TargetPart ::= SEQUENCE{
2303  actualQuery        [1] Query,
2304  targetStatedPeriod    [2] Period,
2305                  -- Target supplies the period, which may be same as origin proposed.
2306  expiration        [3] IMPLICIT GeneralizedTime OPTIONAL,
2307                  -- Target supplies value for task package. It may be the same as origin
2308                  -- proposed or different from (and overrides) origin proposal, but if
2309                  -- omitted, there is no expiration.
2310  resultSetPackage      [4] IMPLICIT InternationalString OPTIONAL,
2311                  -- May be omitted only if exportParameters was supplied. Target
2312                  -- supplies same name as origin supplied, if origin did supply a name.
2313  lastQueryTime      [5] IMPLICIT GeneralizedTime,
2314  lastResultNumber    [6] IMPLICIT INTEGER,
2315  numberSinceModify    [7] IMPLICIT INTEGER OPTIONAL}
2316
2317
2318
2319
2320  Period ::= CHOICE{
2321                unit             [1] IMPLICIT IntUnit,
2322                 businessDaily     [2] IMPLICIT NULL,
2323              continuous       [3] IMPLICIT NULL,
2324              other         [4] IMPLICIT InternationalString}
2325END
2326
2327
2328ESFormat-ItemOrder
2329{Z39-50-extendedService ItemOrder (4)} DEFINITIONS ::=
2330BEGIN
2331IMPORTS InternationalString FROM Z39-50-APDU-1995;
2332ItemOrder ::= CHOICE{
2333    esRequest  [1] IMPLICIT SEQUENCE{
2334              toKeep    [1] OriginPartToKeep OPTIONAL,
2335              notToKeep  [2] OriginPartNotToKeep},
2336    taskPackage  [2] IMPLICIT SEQUENCE{
2337              originPart  [1] OriginPartToKeep OPTIONAL,
2338              targetPart  [2] TargetPart}}
2339OriginPartToKeep ::= SEQUENCE{
2340  supplDescription    [1] IMPLICIT EXTERNAL OPTIONAL,
2341  contact        [2] IMPLICIT SEQUENCE{
2342                       name  [1]   IMPLICIT InternationalString OPTIONAL,
2343                         phone  [2]   IMPLICIT InternationalString OPTIONAL,
2344                       email  [3]   IMPLICIT InternationalString OPTIONAL} OPTIONAL,
2345  addlBilling      [3] IMPLICIT SEQUENCE{
2346                paymentMethod    [1]   CHOICE{
2347                                  billInvoice              [0] IMPLICIT NULL,
2348                                    prepay                [1] IMPLICIT NULL,
2349                                    depositAccount        [2] IMPLICIT NULL,
2350                                    creditCard          [3] IMPLICIT CreditCardInfo,
2351                    cardInfoPreviouslySupplied  [4] IMPLICIT NULL,
2352                    privateKnown        [5] IMPLICIT NULL,
2353                    privateNotKnown      [6] IMPLICIT EXTERNAL},
2354                customerReference  [2] IMPLICIT InternationalString OPTIONAL,
2355                     customerPONumber  [3] IMPLICIT InternationalString OPTIONAL}
2356                                 OPTIONAL}
2357CreditCardInfo   ::= SEQUENCE{
2358       nameOnCard    [1] IMPLICIT InternationalString,
2359      expirationDate    [2] IMPLICIT InternationalString,
2360    cardNumber      [3] IMPLICIT InternationalString}
2361
2362OriginPartNotToKeep ::= SEQUENCE{ -- Corresponds to 'requestedItem' in service definition.
2363      --  Must supply at least one, and may supply both.
2364  resultSetItem    [1]   IMPLICIT SEQUENCE{
2365                resultSetId    [1]   IMPLICIT InternationalString,
2366                    item      [2]   IMPLICIT INTEGER} OPTIONAL,
2367  itemRequest      [2] IMPLICIT EXTERNAL OPTIONAL
2368                -- When itemRequest is an ILL-Request APDU,
2369                -- use OID {iso standard 10161 abstract-syntax (2) ill-apdus (1)}
2370              }
2371
2372TargetPart ::= SEQUENCE{
2373  itemRequest      [1]  IMPLICIT EXTERNAL OPTIONAL,
2374    -- When itemRequest is an ILL-Request APDU, use OID 1.0.10161.2.1 (as above)
2375  statusOrErrorReport  [2] IMPLICIT EXTERNAL OPTIONAL,
2376    -- When statusOrErrorReport is an ILL Status-Or-Error-Report APDU, use OID  1.0.10161.2.1 (as above)
2377  auxiliaryStatus    [3]  IMPLICIT INTEGER{
2378                notReceived      (1),
2379                loanQueue      (2),
2380                forwarded      (3),
2381                unfilledCopyright  (4),
2382                filledCopyright    (5)} OPTIONAL}
2383END
2384
2385
2386
2387
2388ESFormat-Update0
2389{Z39-50-extendedService Update (5)} DEFINITIONS ::=
2390BEGIN
2391IMPORTS DiagRec, InternationalString FROM Z39-50-APDU-1995;
2392Update ::= CHOICE{
2393    esRequest  [1] IMPLICIT SEQUENCE{
2394              toKeep    [1] OriginPartToKeep,
2395              notToKeep  [2] OriginPartNotToKeep},
2396    taskPackage  [2] IMPLICIT SEQUENCE{
2397              originPart  [1] OriginPartToKeep,
2398              targetPart  [2] TargetPart}}
2399
2400
2401OriginPartToKeep ::= SEQUENCE{
2402  action          [1] IMPLICIT INTEGER{
2403                   recordInsert    (1),
2404                   recordReplace  (2),
2405                  recordDelete  (3),
2406                  elementUpdate  (4)},
2407  databaseName      [2] IMPLICIT InternationalString,
2408  schema          [3] IMPLICIT OBJECT IDENTIFIER OPTIONAL,
2409  elementSetName      [4] IMPLICIT InternationalString OPTIONAL}
2410
2411
2412OriginPartNotToKeep ::= SuppliedRecords
2413
2414
2415TargetPart ::= SEQUENCE{
2416  updateStatus    [1] IMPLICIT INTEGER{
2417                  success  (1),
2418                  partial  (2),
2419                  failure  (3)},
2420  globalDiagnostics  [2] IMPLICIT SEQUENCE OF DiagRec OPTIONAL,
2421                -- These are non-surrogate diagnostics relating to the task,
2422                -- not to individual records.
2423  taskPackageRecords  [3] IMPLICIT SEQUENCE OF TaskPackageRecordStructure OPTIONAL
2424                -- There should be a TaskPackageRecordStructure for every record
2425                -- supplied. The target should create such a structure for every
2426                      -- record immediately upon creating the task package to include
2427                -- correlation information and status. The record itself would not
2428                -- be included until processing for that record is complete.
2429            }
2430
2431-- Auxiliary definitions for Update
2432SuppliedRecords ::= SEQUENCE OF SEQUENCE{
2433  recordId    [1] CHOICE{
2434              number  [1] IMPLICIT INTEGER,
2435              string  [2] IMPLICIT InternationalString,
2436              opaque  [3]  IMPLICIT OCTET STRING} OPTIONAL,
2437  supplementalId  [2] CHOICE{
2438              timeStamp    [1] IMPLICIT GeneralizedTime,
2439              versionNumber  [2] IMPLICIT InternationalString,
2440              previousVersion  [3] IMPLICIT EXTERNAL} OPTIONAL,
2441  correlationInfo  [3] IMPLICIT CorrelationInfo OPTIONAL,
2442  record      [4] IMPLICIT EXTERNAL}
2443
2444CorrelationInfo ::= SEQUENCE{
2445          -- origin may supply one or both for any record:
2446  note  [1] IMPLICIT InternationalString OPTIONAL,
2447  id    [2] IMPLICIT INTEGER OPTIONAL}
2448
2449TaskPackageRecordStructure ::= SEQUENCE{
2450    recordOrSurDiag  [1] CHOICE {
2451                record    [1] IMPLICIT EXTERNAL,
2452                        -- Choose 'record' if recordStatus is 'success', and
2453                        -- elementSetName was supplied.
2454                diagnostic  [2] DiagRec
2455                        -- Choose 'diagnostic', if RecordStatus is failure.
2456                                } OPTIONAL,
2457                -- The parameter recordOrSurDiag will thus be omitted only if
2458                -- 'elementSetName' was omitted and recordStatus is
2459                -- 'success'; or if record status is 'queued' or in 'process'.
2460    correlationInfo    [2] IMPLICIT CorrelationInfo OPTIONAL,
2461                -- This should be included if it was supplied by the origin.
2462    recordStatus      [3] IMPLICIT INTEGER{
2463                  success    (1),
2464                  queued    (2),
2465                  inProcess  (3),
2466                  failure    (4)}}
2467END
2468
2469
2470ESFormat-ExportSpecification
2471{Z39-50-extendedService ExportSpecification (6)} DEFINITIONS ::=
2472BEGIN
2473EXPORTS ExportSpecification, Destination; IMPORTS CompSpec, InternationalString FROM Z39-50-APDU-1995;
2474ExportSpecification ::= CHOICE{
2475    esRequest    [1] IMPLICIT SEQUENCE{
2476        toKeep    [1] OriginPartToKeep,
2477        notToKeep  [2] IMPLICIT NULL},
2478    taskPackage    [2] IMPLICIT SEQUENCE{
2479        originPart  [1] OriginPartToKeep,
2480        targetPart  [2] IMPLICIT NULL}}
2481OriginPartToKeep ::= SEQUENCE{
2482  composition        [1] IMPLICIT CompSpec,
2483  exportDestination    [2] Destination}
2484
2485  Destination ::= CHOICE{
2486  phoneNumber    [1]    IMPLICIT InternationalString,
2487  faxNumber      [2]   IMPLICIT InternationalString,
2488  x400address      [3]   IMPLICIT InternationalString,
2489  emailAddress    [4]   IMPLICIT InternationalString,
2490  pagerNumber    [5]   IMPLICIT InternationalString,
2491  ftpAddress      [6]   IMPLICIT InternationalString,
2492  ftamAddress    [7]   IMPLICIT InternationalString,
2493  printerAddress    [8]   IMPLICIT InternationalString,
2494  other        [100]  IMPLICIT SEQUENCE{
2495                  vehicle      [1]  IMPLICIT InternationalString  OPTIONAL,
2496                  destination    [2] IMPLICIT InternationalString}}
2497END
2498
2499
2500
2501
2502ESFormat-ExportInvocation
2503{Z39-50-extendedService ExportInvocation (7)} DEFINITIONS ::=
2504BEGIN
2505IMPORTS InternationalString, IntUnit FROM Z39-50-APDU-1995
2506ExportSpecification FROM ESFormat-ExportSpecification;
2507ExportInvocation ::= CHOICE{
2508    esRequest    [1] IMPLICIT SEQUENCE{
2509        toKeep    [1] OriginPartToKeep,
2510        notToKeep  [2] OriginPartNotToKeep},
2511    taskPackage    [2] IMPLICIT SEQUENCE{
2512        originPart  [1] OriginPartToKeep,
2513        targetPart  [2] TargetPart OPTIONAL}}
2514
2515OriginPartToKeep ::= SEQUENCE{
2516  exportSpec    [1] CHOICE{
2517              packageName    [1] IMPLICIT InternationalString,
2518              packageSpec    [2] ExportSpecification},
2519  numberOfCopies  [2] IMPLICIT INTEGER}
2520
2521
2522
2523
2524
2525OriginPartNotToKeep  ::= SEQUENCE{
2526  resultSetId      [1] IMPLICIT InternationalString,
2527  records        [2] CHOICE{
2528                all    [1] IMPLICIT NULL,
2529                ranges  [2]   IMPLICIT SEQUENCE OF SEQUENCE{
2530                        start  [1] IMPLICIT INTEGER,
2531                        count  [2] IMPLICIT INTEGER OPTIONAL
2532                          -- Count may be omitted only on last range, to indicate
2533                          -- "all remaining records beginning with 'start'."
2534                    }}}
2535
2536TargetPart   ::= SEQUENCE{
2537    estimatedQuantity    [1] IMPLICIT IntUnit OPTIONAL,
2538    quantitySoFar      [2] IMPLICIT IntUnit OPTIONAL,
2539    estimatedCost      [3] IMPLICIT IntUnit OPTIONAL,
2540    costSoFar        [4] IMPLICIT IntUnit OPTIONAL}
2541END
2542
2543
2544
2545UserInfoFormat-searchResult-1
2546{Z39-50-userInfoFormat searchResult-1 (1)} DEFINITIONS ::=
2547BEGIN
2548IMPORTS DatabaseName, Term, Query, IntUnit, InternationalString FROM Z39-50-APDU-1995;
2549SearchInfoReport ::= SEQUENCE OF SEQUENCE{
2550  subqueryId      [1] IMPLICIT InternationalString OPTIONAL,
2551                           -- shorthand identifier of subquery
2552  fullQuery        [2] IMPLICIT BOOLEAN,     -- 'true' means this is the full query; 'false',
2553                          -- a sub-query
2554  subqueryExpression    [3] QueryExpression OPTIONAL,  -- A subquery of the query as
2555                          -- submitted. May be whole query;
2556                          -- if so, "fullQuery" should be 'true'.
2557  subqueryInterpretation  [4] QueryExpression OPTIONAL,  -- how target interpreted subquery
2558  subqueryRecommendation  [5] QueryExpression OPTIONAL,  -- target-recommended alternative
2559  subqueryCount      [6] IMPLICIT INTEGER OPTIONAL,  -- Number of records for this
2560                          -- subQuery, across all of the specified
2561                          -- databases. (If during search, via resource
2562                           -- control, number of records so far).
2563  subqueryWeight     [7] IMPLICIT IntUnit OPTIONAL,  -- relative weight of this subquery
2564  resultsByDB          [8] IMPLICIT ResultsByDB OPTIONAL}
2565
2566ResultsByDB ::= SEQUENCE OF SEQUENCE{
2567  databases      [1] CHOICE{
2568            all     [1] IMPLICIT NULL,
2569                  -- applies across all of the databases in Search PDU
2570            list    [2]  IMPLICIT SEQUENCE OF DatabaseName
2571                  -- applies across all databases in this list
2572              },
2573  count        [2] IMPLICIT INTEGER OPTIONAL,
2574            -- Number of records for query component (and, as above, if during search,
2575             -- via resource control, number of records so far).
2576  resultSetName    [3] IMPLICIT InternationalString OPTIONAL
2577                        -- Target-assigned result set by which subQuery is available. Should not
2578             -- be provided unless processing for this query component is concluded (i.e.,
2579            -- when this report comes during search, via resource control, as opposed
2580            -- to after search, via additionalSearchInfo).
2581              }
2582
2583QueryExpression ::=  CHOICE {
2584                term   [1] IMPLICIT SEQUENCE{
2585              queryTerm  [1]  Term,
2586              termComment            [2] IMPLICIT InternationalString OPTIONAL},
2587           query  [2] Query}
2588END
2589
2590
2591
2592ElementSpecificationFormat-eSpec-1
2593{Z39-50-elementSpec eSpec-1 (1)} DEFINITIONS ::=
2594BEGIN
2595IMPORTS Variant FROM RecordSyntax-generic
2596StringOrNumeric, InternationalString FROM Z39-50-APDU-1995;
2597--
2598Espec-1 ::= SEQUENCE{
2599  elementSetNames    [1] IMPLICIT SEQUENCE OF InternationalString OPTIONAL,
2600                  -- Origin may include one or more element set names, each
2601                  -- specifying a set of elements. Each of the elements is to be
2602                  -- treated as an elementRequest in the form of simpleElement,
2603                  -- where occurrence is 1.
2604  defaultVariantSetId    [2] IMPLICIT OBJECT IDENTIFIER OPTIONAL,
2605                  -- If supplied, applies whenever variantRequest
2606                  -- does not include variantSetId.
2607  defaultVariantRequest  [3] IMPLICIT Variant OPTIONAL,
2608                  -- If supplied, then for each simple elementRequest that does not
2609                   -- include a variantRequest, the defaultVariantRequest applies.
2610                  -- (defaultVariantRequest does not apply to a compositeRequest.)
2611  defaultTagType      [4] IMPLICIT INTEGER OPTIONAL,
2612                  -- If supplied, applies whenever 'tagType' (within 'tag' within TagPath)
2613                  -- is omitted.
2614  elements        [5] IMPLICIT SEQUENCE OF ElementRequest OPTIONAL}
2615--
2616
2617ElementRequest::= CHOICE{
2618  simpleElement    [1]   IMPLICIT SimpleElement,
2619  compositeElement  [2] IMPLICIT SEQUENCE{
2620            elementList    [1] CHOICE{
2621                  primitives    [1]   IMPLICIT SEQUENCE OF InternationalString,
2622                              -- Origin may specify one or more element
2623                              -- set names, each identifying a set of elements,
2624                              -- and the composite element is the union.
2625                  specs      [2] IMPLICIT SEQUENCE OF SimpleElement},
2626
2627            deliveryTag    [2] IMPLICIT TagPath,
2628                          -- DeliveryTag tagPath for compositeElement may not
2629                          -- include wildThing or wildPath.
2630            variantRequest  [3] IMPLICIT Variant OPTIONAL}}
2631
2632SimpleElement ::= SEQUENCE{
2633      path        [1] IMPLICIT TagPath,
2634      variantRequest  [2] IMPLICIT Variant OPTIONAL}
2635
2636
2637TagPath ::= SEQUENCE OF CHOICE{
2638  specificTag  [1] IMPLICIT SEQUENCE{
2639            tagType  [1] IMPLICIT INTEGER OPTIONAL,
2640                      -- If omitted, then 'defaultTagType' (above) applies, if supplied, and
2641                      -- if not supplied, then default listed in schema applies.
2642            tagValue  [2] StringOrNumeric,
2643             occurrence  [3] Occurrences OPTIONAL
2644                      -- default is "first occurrence"
2645                  },
2646  wildThing  [2] Occurrences,
2647              -- Get Nth "thing" at this level, regardless of tag, for each N specified by
2648            -- "Occurrences" (which may be 'all' meaning match every element at this level).
2649            -- E.g., if "Occurrences" is 3, get third element regardless of its tag or the tag of
2650            -- the first two elements.
2651  wildPath  [3] IMPLICIT NULL
2652              -- Match any tag, at this level or below, that is on a path for which next tag in this
2653              -- TagPath sequence occurs. WildPath may not be last member of the TagPath
2654            -- sequence.
2655                      }
2656--
2657
2658Occurrences ::= CHOICE{
2659  all    [1] IMPLICIT NULL,
2660  last    [2] IMPLICIT NULL,
2661  values  [3] IMPLICIT SEQUENCE{
2662          start    [1] IMPLICIT INTEGER,
2663                  -- if 'start' alone is included, then single occurrence is requested
2664          howMany  [2] IMPLICIT INTEGER OPTIONAL
2665                  -- For example, if 'start' is 5 and 'howMany' is 6, then request is for
2666                  -- "occurrences 5 through 10."
2667                  }}
2668END
2669
2670