publish_avail

General Purpose

This service supplies the current availability status of a document.

The X-Server does not change any data.

Interface Type

X-Service

Product Version Compatibility

Version 18 and later

Input Parameters

1. Up to 10 DOC_NUM 9(9) separated by “,” (a comma).
2. LIBRARY X (5).

Doc_Num: The document number.
Library: BIB library to which the document belongs.

Output XML Format

The output XML either includes document metadata or a descriptive error code, depending on whether or not the document exists in the database.

Example:
To retrieve metadata and the availability status for document numbers 000010000 and 000010001 in the USM01 BIB library, enter the following URL:

http://server.name:8134/X?op=publish_avail&doc_num=000010000,000010001&library=usm01

If successful, the output XML contains the documents requested (000010000 and 000010001 are shown):

<?xml version = "1.0" encoding = "UTF-8"?>
<publish-avail>
  <OAI-PMH xmlns="http://www.openarchives.org/OAI/2.0/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/ http://www.openarchives.org/OAI/2.0/OAI-PMH.xsd">
    <ListRecords>
      <record>
        <header>
          <identifier>aleph-publish:000010000</identifier>
        </header>
        <metadata>
          <record xmlns="http://www.loc.gov/MARC21/slim"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.loc.gov/MARC21/slim
http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd">
            <leader>00586ncm  22002175a 4500</leader>
            <controlfield tag="FMT">MU</controlfield>
            <controlfield tag="LDR">00586ncm  22002175a 4500</controlfield>
            <controlfield tag="001">000010000-5</controlfield>
            <controlfield tag="005">20030820092356.0</controlfield>
            <controlfield tag="008">870923s1920    nyuzzz         nn|  yid|d</controlfield>
            <datafield tag="028" ind1="3" ind2="2">
              <subfield code="a">502</subfield>
              <subfield code="b">Teres</subfield>
            </datafield>
            <datafield tag="100" ind1="1" ind2=" ">
              <subfield code="a">Behr, Fr.</subfield>
            </datafield>
            <datafield tag="245" ind1="1" ind2="0">
              <subfield code="a">Camp of the gipsies =</subfield>
              <subfield code="b">Im zigeunerlager / Fr. Behr.</subfield>
            </datafield>
            <datafield tag="246" ind1="3" ind2="1">
              <subfield code="a">Im zigeunerlager</subfield>
            </datafield>
            <datafield tag="260" ind1="0" ind2=" ">
              <subfield code="a">New York :</subfield>
              <subfield code="b">A. Teres,</subfield>
              <subfield code="c">[192?]</subfield>
            </datafield>
            <datafield tag="300" ind1=" " ind2=" ">
              <subfield code="a">5 p. of music ;</subfield>
              <subfield code="c">31 cm.</subfield>
            </datafield>
            <datafield tag="500" ind1=" " ind2=" ">
              <subfield code="a">For piano.</subfield>
            </datafield>
            <datafield tag="500" ind1=" " ind2=" ">
              <subfield code="a">Cover title.</subfield>
            </datafield>
            <datafield tag="500" ind1=" " ind2=" ">
              <subfield code="a">&quot;Op. 224, No. 3&quot;--Cover</subfield>
            </datafield>
            <datafield tag="500" ind1=" " ind2=" ">
              <subfield code="a">&quot;Op. 424, No. 3&quot;--Caption.</subfield>
            </datafield>
            <datafield tag="650" ind1=" " ind2="0">
              <subfield code="a">Piano music.</subfield>
            </datafield>
            <datafield tag="AVA" ind1=" " ind2=" ">
              <subfield code="a">USM50</subfield>
              <subfield code="b">HIL</subfield>
              <subfield code="e">available</subfield>
              <subfield code="t">Available</subfield>
              <subfield code="f">1</subfield>
              <subfield code="g">0</subfield>
              <subfield code="h">N</subfield>
              <subfield code="i">1</subfield>
              <subfield code="p">8</subfield>
            </datafield>
            <datafield tag="AVA" ind1=" " ind2=" ">
              <subfield code="a">USM50</subfield>
              <subfield code="b">WID</subfield>
              <subfield code="c">Depository</subfield>
              <subfield code="d">ZHCL Mus 499.7.7420</subfield>
              <subfield code="e">check_holdings</subfield>
              <subfield code="t">Check Holdings</subfield>
              <subfield code="j">HD</subfield>
              <subfield code="k">ZHCL</subfield>
              <subfield code="p">3</subfield>
            </datafield>
          </record>
        </metadata>
      </record>
    </ListRecords>
  </OAI-PMH>
  <OAI-PMH xmlns="http://www.openarchives.org/OAI/2.0/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/ http://www.openarchives.org/OAI/2.0/OAI-PMH.xsd">
    <ListRecords>
      <record>
        <header>
          <identifier>aleph-publish:000010001</identifier>
        </header>
        <metadata>
          <record xmlns="http://www.loc.gov/MARC21/slim"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.loc.gov/MARC21/slim
http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd">
            <leader>00825nam  2200241Ia 4500</leader>
            <controlfield tag="FMT">BK</controlfield>
            <controlfield tag="LDR">00825nam  2200241Ia 4500</controlfield>
            <controlfield tag="001">000010001-3</controlfield>
            <controlfield tag="005">20020418155342.1</controlfield>
            <controlfield tag="008">871006s1986    fr af    b    00010 fre d</controlfield>
            <datafield tag="020" ind1=" " ind2=" ">
              <subfield code="a">2051007624</subfield>
            </datafield>
            <datafield tag="035" ind1="0" ind2=" ">
              <subfield code="a">(OCoLC)16816345</subfield>
            </datafield>
            <datafield tag="040" ind1=" " ind2=" ">
              <subfield code="a">UIU</subfield>
              <subfield code="c">UIU</subfield>
              <subfield code="d">HLS</subfield>
            </datafield>
            <datafield tag="100" ind1="1" ind2=" ">
              <subfield code="a">Milly, Jean.</subfield>
            </datafield>
            <datafield tag="245" ind1="1" ind2="3">
              <subfield code="a">La longueur des phrases dans &quot;Combray&quot; /</subfield>
              <subfield code="c">Jean Milly.</subfield>
            </datafield>
            <datafield tag="260" ind1="0" ind2=" ">
              <subfield code="a">Paris :</subfield>
              <subfield code="b">Champion ;</subfield>
              <subfield code="a">Genève :</subfield>
              <subfield code="b">Slatkine,</subfield>
              <subfield code="c">1986.</subfield>
            </datafield>
            <datafield tag="300" ind1=" " ind2=" ">
              <subfield code="a">167 p., [1] folded leaf of plates :</subfield>
              <subfield code="b">ill. ;</subfield>
              <subfield code="c">23 cm.</subfield>
            </datafield>
            <datafield tag="500" ind1=" " ind2=" ">
              <subfield code="a">&quot;Étienne Brunet, Le vocabulaire de Proust&quot;: p. 165-167.</subfield>
            </datafield>
            <datafield tag="504" ind1=" " ind2=" ">
              <subfield code="a">Includes bibliographical references.</subfield>
            </datafield>
            <datafield tag="600" ind1="1" ind2="0">
              <subfield code="a">Proust, Marcel,</subfield>
              <subfield code="d">1871-1922.</subfield>
              <subfield code="t">Du côté de chez Swann.</subfield>
            </datafield>
            <datafield tag="650" ind1=" " ind2="0">
              <subfield code="a">French language</subfield>
              <subfield code="x">Phraseology.</subfield>
            </datafield>
            <datafield tag="700" ind1="1" ind2="2">
              <subfield code="a">Brunet, Etienne.</subfield>
              <subfield code="t">Vocabulaire de Proust.</subfield>
            </datafield>
            <datafield tag="AVA" ind1=" " ind2=" ">
              <subfield code="a">USM50</subfield>
              <subfield code="b">WID</subfield>
              <subfield code="c">Depository</subfield>
              <subfield code="e">unavailable</subfield>
              <subfield code="t">Unavailable</subfield>
              <subfield code="f">1</subfield>
              <subfield code="g">1</subfield>
              <subfield code="h">N</subfield>
              <subfield code="i">0</subfield>
              <subfield code="j">HD</subfield>
              <subfield code="p">3</subfield>
            </datafield>
          </record>
        </metadata>
      </record>
    </ListRecords>
  </OAI-PMH>
  <session-id>CILUXUEMICVGACX8J5ICR5DK994SRX5YDM74QHEYKLS1L8G32Q</session-id>
</publish-avail>

Possible Error Codes

1. If the document number does not exist in the database, the following error message displays:

    <ListRecords>
      <record>
        <header>
          <identifier>aleph-publish:000910001</identifier>
        </header>
        <error>
          <error_code>21</error_code>
          <error_message>Error reading document</error_message>
        </error>
      </record>
    </ListRecords>

2. If the URL entered does not have a DOC_NUM, the following message is returned:

<?xml version = "1.0" encoding = "UTF-8"?>
<publish-avail>
  <session-id>G6DH8FYIHS7574IN3QURJBCJXDME1IFGNJIQHT4VSKM1NPL413</session-id>
  <error>doc_num must be included in parameters</error>
</publish-avail>

Notes

The “publish_avail” service can be configured to use the “expand_doc_bib_avail” expand procedure and with parameters.
This can be done by using the “X-AVAIL” entry – in Column 1 of “tab_expand” (in the BIB library) – and parameters in Col. 3.

For example, you can set in “tab_expand” the following:

!   1                   2                            3
!!!!!!!!!!-!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!-!!!!!!!!!!!!!!!!!!!!!!!!!!!!!>
X-AVAIL    expand_doc_bib_avail           THRESHOLD=200;AVA=BP,BD,PB,GV,CA,CT,CL,MI,MS,RE

When there is no “X-AVAIL” entry in “tab_expand” (in the BIB library) – then the “publish_avail” X-service uses the “expand_doc_bib_avail” expand procedure without any parameters.