[Isis-users] Fw: Splitting a Field

Egbert De Smet egbert.desmet at uantwerpen.be
Wed Oct 27 08:47:18 CEST 2021


[forwarded]


Hi,


if you are prepared to apply the modifications in a terminal window, you could use a 'proc' parameter with the CISIS-executable 'mx'.

For both the WinISIS and the JISIS data you would first have to export them to an ISO-format, the resulting records can be exported in their turn to ISO again and then imported in either WinISIS or JISIS.


So, starting from an ISO2709 export of your data, in a terminal window you have to issue the following commands, with the mx-executable (available in the cgi-bin folder of ABCD or from other sources) available in the work-folder where you have the ISO-export named 'before.iso' :

mx iso=before iso create=before now -all

mx before proc=@replacesf.proc create=after now -all

mx after iso=after.iso now -all


Then the file 'after.iso' is the result and these records can be imported into your database.


The actual trick is in the process (proc) which is executed by mx and listed here :

======
'd10',
     s1:=(s(v10)),
     e1:=size(s1),
     e2:=1,
     s2:=(''),
/* sequence of subfields : vdpk */
     while e2<=e1
     (
      if mid(s1,e2,1) : s(';') then
       if s2 : '^p' then s2:=(s2,'^k') else
        if s2 : '^d' then s2:=(s2,'^p') else
         if s(s2) : '^v' then s2:=(s2,'^d') else
          s2:=(s2,'^v'),
         fi,
        fi,
       fi,
      else s2:=(s2,mid(s1,e2,1)),
      fi,
     e2:=e2+1,
     )
   '<10>',s2,'</10>',
=====

Copy/paste this code into a file 'replacesf.proc' and put it in the same work-folder.
If you feel it being too complicated, send me the ISO-export of your data and I can do it (in fact in a few seconds time...).


Egbert de Smet
Universiteit Antwerpen


________________________________
From: Amjad Ali Malik <amjadalimalik66 at hotmail.com>
Sent: Tuesday, October 26, 2021 5:27 PM
To: Egbert De Smet
Subject: Re: Splitting a Field


CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.


Dear Egbert,
The sequence of subfields is fixed, The ';' is need to be replaced with any subfield character(s) in an algorithm sequentially 1st, 2nd , 3rd..... & I am using Winisis & JISIS

Regards
________________________________
From: Egbert De Smet <egbert.desmet at uantwerpen.be>
Sent: Tuesday, October 26, 2021 6:44 PM
To: Amjad Ali Malik <amjadalimalik66 at hotmail.com>; isis-users at iccisis.org <isis-users at iccisis.org>
Subject: Re: Splitting a Field


Hi,


the problem I see is how to do this if the sequence of subfields is not fixed : how do we know which ';' to replace by which subfield 'vdpk' ?

I can imagine it is possible if the sequence is fixed, but if it is not no way to do it. In principle in ISIS the sequence of subfields is not by definition fixed, e.g. ^b can come before ^a etc.

In ABCD there is in the FDT a column 'pre-literals' which is meant to match a separator in some input string to subfields. But again the sequence will need to be fixed.



Egbert de Smet
Universiteit Antwerpen


________________________________
From: isis-users <isis-users-bounces+egbert.desmet=ua.ac.be at iccisis.org> on behalf of Amjad Ali Malik <amjadalimalik66 at hotmail.com>
Sent: Tuesday, October 26, 2021 3:25 PM
To: isis-users at iccisis.org
Subject: [Isis-users] Splitting a Field


CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.


Dear Experts,

I want to split a field into subfields having data stored as

 Source --> v10 = ^m256;12;103;;^i10242020

Target --> v10 = ^m256^v12^d103^p^k^i10242020

How it will be accomplished.

Regards
Amjad Ali Malik
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.iccisis.org/pipermail/isis-users/attachments/20211027/fbc0b9e8/attachment.html>


More information about the isis-users mailing list