[Isis-users] Changes in OD field structure

spinaker spinaker at adinet.com.uy
Mon Jun 10 22:51:34 CEST 2019


Renate

use your same command but try with this file  switchv704.prc

    *'d704',( if p(v704) then '<704>',|^d|v704^o,|^o|v704^d,'</704>' fi ),*

regards
Ernesto Spinak


El 10/6/2019 a las 17:37, Renate Morgenstern escribió:
> Hi,
>
> I have the same problem with other databases - tag no 704.
> I wrote the proc file using tag 704.
> However, when I run it there is an error message
> -
> *704  "^o20161114 02:06:39^djessica"*
> *704  "^o20161124 11:00:45^dronel"*
> 800  "-34:07"
> 807  "MD"
> 901  "OCCUPATION"
> 901  "VOCALIST - VOCATIONAL GUIDANCE"
> 902  "Interview"
> 906  "0"
> 913  "JE"
> 919  "Yes"
> ..x
> renate at renate-ubuntu 
> <mailto:renate at renate-ubuntu>:~/abcdbases/sound/data$ mx sound 
> proc=@switchv704.prc <mailto:proc=@switchv704.prc> copy=sound2 
> from=47000 to=47015 now -all
>
> fatal: ^d20161114 02:06:39^ojessica
> Here is the switch proc file:
> proc('d704',('<704>', 
> s(replace(replace(replace(v704,'^d','~o'),'^o','^d'),'~o','^o')), 
> '</704>',)),(v704/)
>
> Where is the error?
> Thanks for the help.
> Renate
>
>
>> 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)
>>
>> _______________________________________________
>> 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
>> Or contact Henk Rutten:hlrutten at xs4all.nl  <mailto:hlrutten at xs4all.nl>
> -- 
> Renate Morgenstern
> Tel.: +264 61 242124
> Cell: +264 81 2910284
> Fax: 088637518
> Windhoek, Namibia
>
>
> _______________________________________________
> isis-users mailing list
> isis-users at iccisis.org
> To manage your own subscription options go to: http://lists.iccisis.org/listinfo/isis-users
> Or contact Henk Rutten: hlrutten at xs4all.nl


-- 
   .^.                                .^.
   ( )                                ( )
   ===                                ===
  =[=]================================[=]=
   | |  Ernesto Spinak                | |
   | |  spinaker at adinet.com.uy        | |
   | |  Montevideo, Uruguay           | |
   | |  tel/fax  (598) 2622-3352      | |
   | |  celular  (598) 99612238      | |
  =[=]================================[=]=
   ===                                ===
   ( )                                ( )
    V                                  V

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.iccisis.org/pipermail/isis-users/attachments/20190610/c7e5475f/attachment.html>


More information about the isis-users mailing list