1 / 30

API SUMMIT, HALIFAX, October 2004

API SUMMIT, HALIFAX, October 2004. API SUMMIT, HALIFAX, October 2004. Ved editing with API demystified. David Thomas, Product Manager, SIRSI Limited. What is VED data ?. VED data is like MARC. 00 * .*

summer
Télécharger la présentation

API SUMMIT, HALIFAX, October 2004

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. API SUMMIT, HALIFAX, October 2004 API Summit 2004

  2. API SUMMIT, HALIFAX, October 2004 Ved editing with API demystified David Thomas, Product Manager, SIRSI Limited API Summit 2004

  3. What is VED data ? API Summit 2004

  4. VED data is like MARC 00 * .* 00035AC0 96 00 00 05 BE 00 01 00 12 00 06 00 01 23 2A 00 *.............#*.* 00035AD0 30 00 0B 00 12 23 2A 00 3B 00 0F 00 02 23 3E 00 *0....#*.;....#>.* 00035AE0 4A 00 0F 00 03 23 2B 00 59 00 13 00 04 23 2C 00 *J....#+.Y....#,.* 00035AF0 6C 00 09 00 08 23 2F 00 75 00 14 7C 61 53 69 72 *l....#/.u..|aSir* 00035B00 73 69 20 4C 74 64 7C 61 55 6E 69 63 6F 72 6E 20 *si Ltd|aUnicorn * 00035B10 48 6F 75 73 65 7C 61 53 74 61 74 69 6F 6E 20 43 *House|aStation C* 00035B20 6C 6F 73 65 7C 61 50 6F 74 74 65 72 73 20 42 61 *lose|aPotters Ba* 00035B30 72 2F 48 65 72 74 73 7C 61 45 4E 36 20 33 4A 57 *r/Herts|aEN6 3JW* 00035B40 7C 61 64 61 76 69 64 74 40 73 69 72 73 69 2E 63 *|adavidt@sirsi.c* 00035B50 6F 2E 75 6B API Summit 2004

  5. VED data in diagnostic format Enter offset (0 - 2000000000) [0] 219838 longkey=1470 shortkey=1 size=153 last=18 #entries=6 abs=1 num=9002 start=48 len=11 |aSirsi Ltd abs=18 num=9002 start=59 len=15 |aUnicorn House abs=2 num=9022 start=74 len=15 |aStation Close abs=3 num=9003 start=89 len=19 |aPotters Bar/Herts abs=4 num=9004 start=108 len=9 |aEN6 3JW abs=8 num=9007 start=117 len=20 |adavidt@sirsi.co.uk API Summit 2004

  6. VED data in flat format .USER_ADDR1_BEGIN. .LINE. |aSirsi Ltd .LINE. |aUnicorn House .STREET. |aStation Close .CITY/STATE. |aPotters Bar/Herts .ZIP. |aEN6 3JW .EMAIL. |adavidt@sirsi.co.uk .USER_ADDR1_END. API Summit 2004

  7. VED format entries * Entry ID : EMAIL * Entry Number : 9007 * Valid Subfields : ALL * Entry Type : Email * Data Type : ANY * Minimum Size : 1 * Maximum Size : 9999 * Entry Default : NONE * Repeatable : YES * Required : NO * Editable : YES API Summit 2004

  8. Outputting VED data with seltools (sirsi-8)296% echo 0000002402 | seluser -iB -oX.9007. |& translate UNICORN user selection v2002 started on Friday, 13 June, 2003, 2:53 PM The user ID will be read from standard input. Address1 entry 9007 will be written to standard output. 1 user record(s) considered. 1 user record(s) selected. UNICORN user selection finished on Friday, 13 June, 2003, 2:53 PM davidt@sirsi.co.uk| API Summit 2004

  9. Selecting records with VED data seluser -oBD -X"^1^EMAIL^0^=^davidt@sirsi.co.uk" | & translate UNICORN user selection v2002 started on Friday, 13 June, 2003, 2:58 PM The user file will be read sequentially by primary key. The user ID will be written to standard output. The user name will be written to standard output. User will be selected if any Address1 entry of type EMAIL is davidt@sirsi.co.uk 1450 user record(s) considered. 2 user record(s) selected. UNICORN user selection finished on Friday, 13 June, 2003, 2:58 PM MAIN|main ill user| 0000002402|THOMAS, DAVID| API Summit 2004

  10. @ Subphrase selection - not a substring (sirsi-8)305% seluser -oD -X"^1^EMAIL^0^@^davidt" |& translate UNICORN user selection v2002 started on Friday, 13 June, 2003, 3:02 PM The user file will be read sequentially by primary key. The user name will be written to standard output. User will be selected if any Address1 entry of type EMAIL includes the phrase davidt 1450 user record(s) considered. 0 user record(s) selected. UNICORN user selection finished on Friday, 13 June, 2003, 3:02 PM API Summit 2004

  11. @ Subphrase searching - delimiters space tab comma full stop/period semi-colon ? question mark ! exclamation mark “ double quote ‘ single quote ` backtick brackets ()[]{} API Summit 2004

  12. API edit requests - Edit User Part A ^S31ICFFSIRSI^FcNONE^FEMAIN^UO0000002402^DKY^DFN^deY^ d6N^d7N^d8Y^gxN^P1M^^O Transaction start = ^S REQUEST Sequence #: 31 Command: IC Edit User Part A FF user access SIRSI Fc clearance NONE FE station library MAIN UO user ID 0000002402 DK addresses option Y DF charges option N de extended info Y d6 display outreach interest flag N d7 display outreach history flag N d8 display outreach user information Y flag gx accountability option N P1 user display access type M API Summit 2004

  13. API Response - EDIT USER Part B LV Nk^^Z nKX^ND19^NPBuilding^NHBLDG^S1N^N9601^^Z nKX^ND20^NPRoom^NHROOM^S1N^N9595^^Z nKh^ND21^NPDaytime Phone^NHDAYPHONE^S1N^N9575^^Z nKX^ND1^NPLine^NHLINE^S1N^NESirsi Ltd^^Z nKX^ND18^NPLine^NHLINE^S1N^NEUnicorn House^^Z nKX^ND2^NPStreet^NHSTREET^S1N^NEStation Close^^Z nKX^ND3^NPCity, State^NHCITY/STATE^S1N^NEPotters Bar/Herts^^Z nKz^ND4^NPZip^NHZIP^S1N^NEEN6 3JW^^Z nKm^ND8^NPEmail^NHEMAIL^S1N^NEdavidt@sirsi.co.uk^^Z nKX^ND22^NPLocation^NHLOCATION^S1N^N9602^^Z NK22^^Z ^5 API Summit 2004

  14. Datacodes in VED part of response • Datacode ND is absolute entry number • Datacode NH is the Entry ID • Datacode NE is the actual data • Datacode NP is the Entry display variation • Datacode nK is the entry type of Entry ID • Datacode N9 is the Entry ID policy number • Datacode S1 is “required entry” flag • Empty entries from the TEMPLATE are allocated values for ND based on highest used so far in the database record. API Summit 2004

  15. ND absolute entry numbers • Empty entries allocated for the TEMPLATE in the response do not exist in the database record • they are not necessarily consistent between different records on the same database. THEY CANNOT BE EQUATED WITH ENTRY IDS. • Values found in one history log transaction cannot be used as a model for further edits API Summit 2004

  16. Special entries in the VED data list • Datacode Nk appears on its own with no data in the first entry of the list. • Datacode NK is the highest absolute number for entries allocated so far. It always appears as the last entry in the list. Notice that it reflects the addition of the empty template entries and is higher than the last entry actually present in the ved record on the server. API Summit 2004

  17. Deleting a ved entry ^S01IYFFSIRSI^FEMAIN^UO0000002402^ NJ1:18:2:3:4:8:^daLV^^O da is the listcode (LV for user address 1) NJ is colon-delimted list of absolute entries to be deleted API Summit 2004

  18. Editing or creating new ved entries • Each entry in a ved entry is edited or added separately • There is no concept in API of “save record” • Absolute entry numbers are used to identify which ved entry you are editing. • To determine in what position you want to add a new ved entry the absolute entry numbers of previous and following entries are used API Summit 2004

  19. Example: editing the ZIP field • ND = 4 nKz^ND4^NPZip^NHZIP^NEEN6 3JW^^Z ^S01IYFFSIRSI^FEMAIN^UO0000002402^ daLV^ND4^NHZIP^NEEN6 3JW^^O API Summit 2004

  20. Specifying position to add a new entry • Datacode NI is the absolute entry number of the entry that you want to add a new entry after. 0 (zero) for beginning of record. • Datacode Nz is the absolute entry number of the entry that you want to add a new entry before. 0 (zero) for end of record. API Summit 2004

  21. Example: adding an entry after ZIP • ND = 23 (remember NK was 22) • NI = 4 • Nz = 8 nKX^ND3^NPCity, State^NHCITY/STATE^NEPotters Bar/Herts^^Z nKz^ND4^NPZip^NHZIP^NEEN6 3JW^^Z nKm^ND8^NPEmail^NHEMAIL^NEdavidt@sirsi.co.uk^^Z ^S01IYFFSIRSI^FEMAIN^UO0000002402^ daLV^NI4^Nz8^ ND23^NHCOUNTRY^NEUnited Kingdom^^O API Summit 2004

  22. New entry added after ZIP Enter offset (0 - 2000000000) [0] 80772 longkey=1470 shortkey=1 size=177 last=23 #entries=7 abs=1 num=9002 start=56 len=11 |aSirsi Ltd abs=18 num=9002 start=67 len=15 |aUnicorn House abs=2 num=9022 start=82 len=15 |aStation Close abs=3 num=9003 start=97 len=19 |aPotters Bar/Herts abs=4 num=9004 start=116 len=9 |aEN6 3JW abs=23 num=9008 start=125 len=16 |aUnited Kingdom abs=8 num=9007 start=141 len=20 |adavidt@sirsi.co.uk API Summit 2004

  23. Special case - creating a new record NI0^ND1^Nz0^ NI1^ND2^Nz0^ NI2^ND3^Nz0^ NI3^ND4^Nz0^ etc. API Summit 2004

  24. Gotcha - beware empty template entries nKX^ND19^NPBuilding^NHBLDG^N9601^^Z nKX^ND20^NPRoom^NHROOM^N9595^^Z nKh^ND21^NPDaytime Phone^NHDAYPHONE^N9575^^Z nKX^ND1^NPLine^NHLINE^NESirsi Ltd^^Z nKX^ND18^NPLine^NHLINE^NEUnicorn House^^Z To add ROOM NI0^ND20^Nz1^ not NI19^ND20^Nz21^ because 19 & 21 don’t actually exist in the user record API Summit 2004

  25. Wrong result :-( ^S01IYFFSIRSI^FEMAIN^UO0000002402^daLV^ NI19^Nz21^ND20^NHROOM^NERoom 101^^O abs=1 num=9002 start=64 len=11 |aSirsi Ltd abs=18 num=9002 start=75 len=15 |aUnicorn House abs=2 num=9022 start=90 len=15 |aStation Close abs=3 num=9003 start=105 len=19 |aPotters Bar/Herts abs=4 num=9004 start=124 len=9 |aEN6 3JW abs=23 num=9008 start=133 len=16 |aUnited Kingdom abs=8 num=9007 start=149 len=20 |adavidt@sirsi.co.uk abs=20 num=9010 start=169 len=10 |aRoom 101 API Summit 2004

  26. Survival strategies… • Use loadflatuser or edituserved instead ! • suppress empty template entries if possible with part A request. Eg. Edit Item Part A (IA) with datacode Ne=N API Summit 2004

  27. API Summit 2004

  28. Item extended information entries LC Nk^^Z nKc^ND4^NP$<itemx_othr_circ>^NHCIRCNOTE^S1N^N91216^^Z nKn^ND5^NP$<itemx_othr_public>^NHPUBLIC^S1N^N91215^^Z nKs^ND3^NP$<itemx_othr_staff>^NHSTAFF^S1N^NEDamaged^^Z NK5^^Z ^5 API Summit 2004

  29. Edit Item Part B to edit item xinfo ^S23IVFFSIRSI^FECITYLIB1^NQ15780-2001^ daLC^ND3^NI0^Nz0^NHSTAFF^NEDamaged^^O API Summit 2004

  30. Marc ved – additional considerations • Datacode NG for indicators • Prefer ALL to TEMPLATE entry list for part A request • Data should be in database character set (ie. ANSEL) API Summit 2004

More Related