[Isis-users] Changes in OD field structure
Egbert De Smet
egbert.desmet at uantwerpen.be
Sun Jun 9 11:49:44 CEST 2019
Eustache,
indeed for some period there was a bug in the script to store the v980 'operator and date' field where ^o and ^d were switched.
To repair this you could apply, on the records where this is the case, the following proc :
------------------ cut here for proc 'switchv980.prc'
proc(
'd980',
( '<980>', s(replace(replace(replace(v980,'^d','~o'),'^o','^d'),'~o','^o')), '</980>',)
),
(v980/)
------------------ end of proc 'switchv980.prc'
with the command :
mx marc proc=@switchv980.prc copy=marc now -all
If you only want to have it correctly displayed (not really changing the records), you can simply use the PFT :
replace(replace(replace(v980,'^d','~o'),'^o','^d'),'~o','^o')
and if you have mixed records, with and without the problem, you can check whether ^o contains '20' at the beginning before applying the replace() :
if (v980^o*0.2='20' then .... fi
The replace command has to be used 3 times (instead of 2) because first you have to set aside the date subfield marked as ~o, then switch the two subfields ^d and ^o, then put the ~o value in ^o. A bit complicated but it works.
Egbert de Smet
Universiteit Antwerpen
________________________________
From: isis-users <isis-users-bounces+egbert.desmet=ua.ac.be at iccisis.org> on behalf of Eustache Mêgnigbêto <eustache.megnigbeto at outlook.com>
Sent: Saturday, June 8, 2019 8:09 AM
To: isis-users at iccisis.org
Subject: [Isis-users] Changes in OD field structure
Dear all,
I download abcd (version 2.0f, December 2018) to replace the old version I was using.
In one of my databases, I have an operator and date (OD) field. Once I saved the first record with this new version, I noticed that the OD field did not display as expected for the new record. I browsed some existing records and found that the field displays normally. Inspecting the records with the “sin format” internal format, I discovered that the structure is not the same as in the existing records : the subfields (d and o) are permuted so instead of storing the date in ^d and the operator in ^o, the new version stores them in ^o and ^d respectively.
How can I change ?
Thank you in advance.
====================================================================
Eustache Mêgnigbêto
09 BP 477 Saint Michel, Cotonou (République du Bénin)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.iccisis.org/pipermail/isis-users/attachments/20190609/6aae5b22/attachment.html>
More information about the isis-users
mailing list