[Isis-users] copy marc record from another sofware to ABCD

Egbert De Smet egbert.desmet at uantwerpen.be
Fri Apr 10 09:18:17 CEST 2020


Hi again,


let me clarify : since real MARC21-records are a special type of ISO2709 records (in fact MARC is based on that standard), you can import MARC-records into ABCD directly. Two issues have to be considered then : 1. handling the 'leader' fields (mx has the iso=marc=input.iso and outisotag1= parameters for that) and 2. converting the subfield markers to '^' (which can be done using a gizmo like Ernesto described). We have a manual on how to do this e.g. in the context of converting a KOHA-catalog to ABCD (which I did many times).

But your example was a text-dump of a MARC-record, not a MARC-record. That is a quite different situation and takes a different solution. otherwise I would have pointed you directly to the ISO-import method. The method I described, esp. if combined with the gizmo in order to avoid the preliminary step of 'replacing' all pipes into circumflexes (^), could be done with one command, taking the input file as formatted in your example and directly producing the desired output : an ISIS database.

The ISO-import interface in ABCD allows direct upload of a local ISO-file to the server, to I don't see the problem there. In version 2.x there is a 'tick-box' to indicate whether or not it is about a MARC-ISO file or not. How much simpler should it get ?


About Z39.50 : yes, in order to work in ABCD you need to setup the 'dynamic extension' for it in php.ini. I found it particularly complicated in Windows, because PHP doesn't offer it as a default extension. In Windows you have to make sure you have the correct extension (from <http://www.indexdata.com> https://www.indexdata.com/resources/software/phpyaz/) for the particular Microsoft VC-version, 32- or 64-bits, threaded or non-threaded version of Apache etc., so compiling it yourself seems to be the safest solution but requires quite some steps, described in the 'The ABC of ABCD manual'.

For Linux you can install it like any other extension, and the distribution packages (.deb and .rpm) come with a working one provided.


I hope all this helps,


Egbert de Smet
Universiteit Antwerpen


________________________________
From: Soraya Ferraz Lima <soyferrazlima at gmail.com>
Sent: Thursday, April 9, 2020 11:52 PM
To: Egbert De Smet
Cc: Ernesto Spinak; isis-users at iccisis.org
Subject: Re: [Isis-users] copy marc record from another sofware to ABCD

Nice Egbert!

I will do this, more to test this solution. As we are a work team, I believe that it would also be impracticable to use them on a daily basis since it would be necessary to save the text files and still request access to the server, which is not always an easy thing to achieve ...

But it would be an interesting feature for ABCD that option to copy or import MARC records. Other Brazilian software such as PHL (which is also based on ISIS), Biblivre and Sophia have this functionality.

For now I will do the configuration of the Z39.50 as you said and we will be looking at LOC. Although I think it would be difficult to find brazilian theses and papers there.

Taking advantage, is no configuration required on the server to enable Z39.50? PHP extension or something?

Thank you so much!

Em qui., 9 de abr. de 2020 às 16:44, Egbert De Smet <egbert.desmet at uantwerpen.be<mailto:egbert.desmet at uantwerpen.be>> escreveu:

Hi,


o.k., not having access to the server makes things a lot more difficult indeed.

However I think you could try this : download ABCD to your local PC (Windows or Linux), extract the files mx(.exe) and id2i(.exe) from cgi-bin into a folder, apply the trick to create an ISIS-database, use again mx to output the database as an ISO-2709 file and then use the ABCD-interface to import that ISO-2709 file, which includes the option to 'upload' it.

If you just want to add one or more records, don't forget to use the 'append' option (i.e. not deleting the existing records first).


About Z39.50 : it would surprise me if Brazil National Library doesn't have such a server, but did you try to search (by title, I don't see an ISBN in your example) in Library of Congress ? Chances are good to find it there.


Egbert de Smet
Universiteit Antwerpen


________________________________
From: Soraya Ferraz Lima <soyferrazlima at gmail.com<mailto:soyferrazlima at gmail.com>>
Sent: Thursday, April 9, 2020 9:19 PM
To: Egbert De Smet
Cc: Ernesto Spinak; isis-users at iccisis.org<mailto:isis-users at iccisis.org>
Subject: Re: [Isis-users] copy marc record from another sofware to ABCD

Wow!! You are brilliant!
Thanks for that!

But I have a big problem: we are working from home, so we don't have access to the server, making it impossible to run mx or id2i.
Is there no way to do it through the ABCD administration interface?

Anyway, I will study those tips and codes to see if we can implement it in any way.

Tks again

Em qui., 9 de abr. de 2020 às 15:33, Egbert De Smet <egbert.desmet at uantwerpen.be<mailto:egbert.desmet at uantwerpen.be>> escreveu:

Hi,


... and continuing on Ernesto's idea : here is a 'proc' (a set of instructions to modify records with the ABCD 'command-line' executable 'mx' to automatically generate the correctly formatted tagged-text file to be used with the tool 'id2i' (both mx and id2i are located into the cgi-bin directory of ABCD).

======== listing of marc2isis.prc (to be stored on your computer as a file)

'd1',
if v1='' then
 s2:=(s('!ID '), mfn),
 s4:=(s('')),
else
s1:=(replace(v1,'~','^')),
s3:=(replace(s1 ,'^a ','^a')),
e1:=instr(s3,' '),
s1:=(s(mid(s3,1,e1-1))),
if s1='000' then s1:=(s('999')) fi,
s4:=(s('!v',s1,'!')),
s2:=(s(mid(s3,e1+1,999))),
fi,
'<1>',s4,s2,'</1>',
=========

Notes :

  1.  First put all necessary files mentioned here in a directory (including your input-file 'new.txt', mx and id2i) and open a terminal (CMD in Windows) in that directory.
  2.  Since mx will split a line at each character '|', you will first have to replace all occurrences of that pipe to a wave : '~', to keep the line as one field before further processing it. This can be easily done with a 'search-and-replace' action in any text-processor. This is the manual extra effort required.
  3.  Each record in the input file should be separated by an empty line, which the proc will replace by the string !ID MFN (record number), but use id2i with the 'create/app' instead of just 'create' parameter so as to make it number the records just sequentially (and ignoring the actual value which is the line number rather than the record number).
  4.  run the following command to convert the input file to a suitable id2i input file : mx seq=new.txt proc=@marc2isis.prc "pft=v1/" now >id2i_input.txt
  5.  the file id2i_input.txt can be used with the id2i command :
id2i id2i_input.txt create/app=new and the database 'new' will contain your records.
  6.  I noted that in your input example all subfields start with a space (after the subfield-marker!), which is in fact unnecessary and bad practice. Line 7 deletes that space for ^a, but for the other subfields you will have to do a nested 'replace' for each subfield. I'm sure Ernesto can help you for this as he takes such things for breakfast, even before his coffee. Otherwise use Ernesto's step 6 (the gizmo) to replace the string ' ^b ' to '^b' (omitting the space before and after) and add the gizmo-parameter to the mx-command.


Good luck !


Egbert de Smet
Universiteit Antwerpen


________________________________
From: isis-users <isis-users-bounces+egbert.desmet=ua.ac.be at iccisis.org<mailto:ua.ac.be at iccisis.org>> on behalf of Ernesto Spinak <ernesto_luis_96 at hotmail.com<mailto:ernesto_luis_96 at hotmail.com>>
Sent: Thursday, April 9, 2020 5:48 PM
To: isis-users at iccisis.org<mailto:isis-users at iccisis.org>
Subject: [Isis-users] copy marc record from another sofware to ABCD


continuing with Egbert's idea

it is possible with a little procedural work

I give the idea, after a volunteer passes it to the mx code

let's take your example copiado al final

1) it is plain ansi text easy to parse

2) the first four positions are the field tag and a separator space

3) So we must use the CISIS program called ID2I (see the manual)

   take notes:

     (a) each record must start with the line  !ID 000000 (case sensitive)

         so the input text should be massaged, which can be done easily

     (b) tag 000 should be changed to an acceptable value, I recommend 999

         because that makes up the Registry Leader

4) convert plain text to isis helper, for example xxx

   id2i  file_in create=xxx

   if you have any error the input text is surely not canonical

5) then there are the subfields, denoted here as space, pipe, letter, space, for example | a

6) for this you must create a gizmo in isis with the following conversion

   prepare a text file as follows  from a-z and save it as pepe.txt

    |a ;^a

    |b ;^b

    |c ;^c

    ...

   etc

   notice that there is a blank space to the left of the pipe

   then convert that file to gizmo name it gizfld

   mx seq=pepe.txt;  create=gizfld now -all tell=10

   note that the ; after the pepe.txt it is mandatory,

7) now run the gizmo to the isis XXX file to convert the subfield characters

   mx xxx gizmo=gizfld create=xxx2 now -all tell=10

8) mx iso=marc=xxx2.iso outisotag1=999 now -all tell=10

now you have an export ISO prepared to import it with crisis with the corresponding parameters









000 00899cam a22002537  4500

001 000531240

003 BR-RjBN

005 19970609210000.0

008 890907s19830000bsc           000 0 por u

012 __ |a BT000059353

035 __ |a 96101812253769001

040 __ |a Br |b por

082 04 |a 340

092 __ |a VI-89,2,2 |d TESE

100 1_ |a Ferreira, Erinalva Medeiros.

245 13 |a "A figuração da (des) igualdade" : |b algumas idéias sobre o "espaço público" de poder da mulher |b desde sua condição "privada" / |c Erinalva Medeiros Ferreira. -

260 __ |a Florianópolis : |b [s.n.], |c 1983.

300 __ |a vii, 120f. ; |c 33cm.

500 __ |a Orientador: José Maria Gomez.

502 __ |a Dissertação (mestrado) - Universidade Federal de Santa Catarina, Centro Sócio-Econômico.

595 __ |a TM |a DIR |c 83

650 04 |a Direito.

700 1_ |a Gómez, José María.

710 2_ |a Universidade Federal de Santa Catarina. |b Centro Sócio-Econômico.

852 __ |a Obras Gerais

990 __ |a Livro



Enviado desde Correo<https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgo.microsoft.com%2Ffwlink%2F%3FLinkId%3D550986&data=02%7C01%7Cegbert.desmet%40uantwerpen.be%7Cf6f0aead35b14db902d908d7dcd05145%7C792e08fb2d544a8eaf72202548136ef6%7C0%7C0%7C637220659586170391&sdata=vNH56KgK76gdymVSJpfkOgcucmGClTgmfr7CJTxThJ0%3D&reserved=0> para Windows 10



_______________________________________________
isis-users mailing list
isis-users at iccisis.org<mailto:isis-users at iccisis.org>
To manage your own subscription options go to: http://lists.iccisis.org/listinfo/isis-users<https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.iccisis.org%2Flistinfo%2Fisis-users&data=02%7C01%7Cegbert.desmet%40uantwerpen.be%7Cf6f0aead35b14db902d908d7dcd05145%7C792e08fb2d544a8eaf72202548136ef6%7C0%7C0%7C637220659586170391&sdata=tuJb30ACmFA17AQxupq3Ckwm%2B7YMVg%2B%2B4WieUa96iJk%3D&reserved=0>
Or contact Henk Rutten: hlrutten at xs4all.nl<mailto:hlrutten at xs4all.nl>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.iccisis.org/pipermail/isis-users/attachments/20200410/85745db7/attachment.html>


More information about the isis-users mailing list