<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Fred<br>
      Time ago, until version CISIS 4.x,  there was an utility named
      MXGW that did exactly what you need, but it disappeared from
      versions 5.x<br>
      If you compile cisis source for linux this tool appears, but not
      for Windows<br>
      and the documentation I cannot find in my old backups<br>
      <br>
      Sorry<br>
      Ernesto<br>
      <br>
      El 11/12/2017 a las 17:04, fred train escribió:<br>
    </div>
    <blockquote type="cite"
      cite="mid:257225e2-c50c-8618-2008-f84270306e68@xs4all.nl">
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      Thanks Ernesto<br>
      Works like a charm with these backquotes.<br>
      <br>
      Only one challenge left:<br>
      Is it possible to instruct a gizmo that it should match the
      complete field?<br>
      Example of the field content: RWXR<br>
      Example of the line in the gizmo database : RW|Read Write<br>
      This transforms the field to : Read WriteXR<br>
      Is there a way to instruct gizmo to check the complete string?<br>
      Or should I add a dummy in the gizmo database like: RWXR|RWXR<br>
      <br>
      Regards<br>
      Fred<br>
      <br>
      <div class="moz-cite-prefix">Op 11-12-2017 om 18:51 schreef
        spinaker:<br>
      </div>
      <blockquote type="cite"
        cite="mid:cd3dc368-0be5-aa13-9b4f-62efe467bfec@adinet.com.uy">
        <meta http-equiv="Content-Type" content="text/html;
          charset=utf-8">
        <div class="moz-cite-prefix">Fred<br>
          <br>
          There is a way to circunvent the problem with normal quotes <font
            color="#ff0000"><b>'</b></font>   using inverted quotes <font
            color="#ff0000"><b>`</b></font>   like the following example<br>
          <br>
          <font size="+1"><b><font face="Courier New, Courier,
                monospace">C:\dbisis\cds>mx cds "pft=if v26:`'` then
                mfn,x2 fi" now<br>
                000103  000138</font></b></font><br>
          <br>
          Regards<br>
          Ernesto Spinak<br>
          <br>
          <br>
          El 11/12/2017 a las 13:51, fred train escribió:<br>
        </div>
        <blockquote type="cite"
          cite="mid:aef8ce4d-30b3-7ac9-644e-853ff2c43e2b@xs4all.nl">
          <meta http-equiv="Content-Type" content="text/html;
            charset=utf-8">
          Thanks Egbert<br>
          <br>
          Your proc example gives exactly the thing I was looking for.
          Saves us a lot of work because I can generate these
          statements.<br>
          <br>
          The reason why my version of creating a gizmo database did not
          work happens to be a stupid thing:<br>
          The commands were executed in a cygwin (=unix on windows)
          shell. The 'çat' command in the cygwin shell creates files
          with only linefeeds.<br>
          When I changed the input file from LF to CRLF it worked as
          expected.<br>
          <br>
          New challenge number 1:<br>
          Is it possible to instruct a gizmo that it should match the
          complete field?<br>
          Example of the field content: RWXR<br>
          Example of the line in the gizmo database : RW|Read Write<br>
          This transforms the field to : Read WriteXR<br>
          Is there a way to instruct gizmo to check the complete string?<br>
          Or should I add a dummy in the gizmo database like: RWXR|RWXR<br>
          <br>
          New challenge number 2:<br>
          The value1 in "if v620^a='value1' then" cannot contain the
          single quote. Is there a way to rewrite the if statement in
          such a way that the test value can be specified with a quote?<br>
          <br>
          Thanks & Regards<br>
          Fred<br>
          <br>
          <div class="moz-cite-prefix">Op 7-12-2017 om 06:19 schreef De
            Smet Egbert:<br>
          </div>
          <blockquote type="cite"
            cite="mid:666c59577e8e4a56acc496d078247b01@uantwerpen.be">
            <pre wrap="">The challenge is how to identify which of your (repeated) keywords should move to another field and which not. If there is a consistent way of defining that, it can be easily done in (C)ISIS.
E.g. if it is always the first occurrence, you can point to it with the occurrence counter. Your proc will run as a repeatable group anyway since it deals with a repeated field, and each iteration has its own counter for the occurrence.
If it is not a fixed occurrence, then the values should be matched against values to decide on whether the field should move to the other field or not. That is tricky if there are many possible values. You could first create an 'authority' database, e.g. from a sequential files where all values are listed one per line with the seq= parameter. Then you could use e.g. a ref(l()) construct and if that function applied to the current occurrence of your field matches, which means the value exists in the external authority database, then you know it should move.

Example starting point for your proc (to be saved as a file) :
'd620'  /*delete the original field as we are going to process it in the output */
(      /* start of repeatable group */
if v620^a='value1' then '<611>',v620^a,'</611>'  else '<620>', |^a| v620^a,'</620)' fi,  /* move v620^a to v611 if it is equal to the value1, otherwise put it back into v620 */
)  /* end of repeatable group */
Always be carefull doing such operations, e.g. take a backup of your original database and output to a test-database first. CISIS is a bit ideosyncratic sometimes in applying procs. 

As for the command mx seq=xxx.lst~ create=xxx now, please note that in this case 'xxx.lst' is just a placeholder for a filename to a real sequential file. If the text-lines in that file have separated values (the separator is by default | but can also be re-defined as in the example with ~) these values will become fields v1, v2...vN. 

Small example : 
- create a text file 'xxx.lst' with contents 
one~1
two~2
three~3
four~4
- create an ISIS database from that sequential file : 
mx seq=xxx.lst~ create=xxx now  -all

then that xxx database will contain 4 records with each 2 fields, the first field is the textual one, the second the numeric value. Since you added ~ after the filename, it will be used as the alternative separator to split values in each line as fields.
Such a database is in fact what is used with the gizmo-parameter to change all words 'one' to '1', 'two' to '2' etc.
In your case the file was empty most probably, so resulting in an empty database.

I hope this helps.

Egbert de Smet
Universiteit Antwerpen
________________________________________
From: Fred Hommersom <a class="moz-txt-link-rfc2396E" href="mailto:fred.hommersom@xs4all.nl" moz-do-not-send="true"><fred.hommersom@xs4all.nl></a>
Sent: Wednesday, December 6, 2017 10:17 PM
To: De Smet Egbert; Albert LEMORT; <a class="moz-txt-link-abbreviated" href="mailto:isis-users@iccisis.org" moz-do-not-send="true">isis-users@iccisis.org</a>
Subject: Re: [Isis-users] Global Change

Thanks gentlemen,
I found a manual "CISIS-ManualReferencia-en-5.2" with a large description of MX with a proc
Are more examples present anywhere?
I am trying to change one of the members of a repeating field.
The field is called "Keywords" and contains on each line a keyword.
I am looking for an example how to operate on only one of the keywords.

I also tried a gizmo for another option. I found an example in manual CISIS-ManualReferencia-en-5.2.pdf
Applies a gizmo to the record, which can apply to a list of specific fields.
echo transpiration~xxx> xxx.lst
mx seq=xxx.lst~ create=xxx now
This code creates  xxx.mst and xxx.xrf as expected.
However: the content of this database is empty.
The command "mx xxx" shows no records.

Any help or examples available?
Regards
Fred



Op 6-12-2017 om 15:42 schreef De Smet Egbert:

Unfortunately CISIS (as used in ABCD) does not support a reformatting FST, which is a CDS/ISIS or WinISIS concept.
But it is replaced by a more flexible 'proc' (process or procedure) parameter which defines either in-line or by referral to a script which operations need to be done on a record, using the Formatting Language (as in the FST).
Here records but also fields can be deleted, added, reformatted etc.
So according to the current value of your field 611^a that occurrence of the (sub-)field can be either left untouched or deleted and added into v620, which is more or less what you need.

Such a 'proc' (or several of them) is to be passed to mx in a command (terminal), while at the same time in the same run of the command one or more gizmo's can be applied. So the list of possibilities to manipulate fields in records is enormous...

Egbert de Smet
Universiteit Antwerpen
________________________________________
From: isis-users <a class="moz-txt-link-rfc2396E" href="mailto:isis-users-bounces+egbert.desmet=ua.ac.be@iccisis.org" moz-do-not-send="true"><isis-users-bounces+egbert.desmet=ua.ac.be@iccisis.org></a><a class="moz-txt-link-rfc2396E" href="mailto:isis-users-bounces+egbert.desmet=ua.ac.be@iccisis.org" moz-do-not-send="true"><mailto:isis-users-bounces+egbert.desmet=ua.ac.be@iccisis.org></a> on behalf of Albert LEMORT <a class="moz-txt-link-rfc2396E" href="mailto:albert.lemort@hepl.be" moz-do-not-send="true"><albert.lemort@hepl.be></a><a class="moz-txt-link-rfc2396E" href="mailto:albert.lemort@hepl.be" moz-do-not-send="true"><mailto:albert.lemort@hepl.be></a>
Sent: Wednesday, December 6, 2017 3:24 PM
To: <a class="moz-txt-link-abbreviated" href="mailto:isis-users@iccisis.org" moz-do-not-send="true">isis-users@iccisis.org</a><a class="moz-txt-link-rfc2396E" href="mailto:isis-users@iccisis.org" moz-do-not-send="true"><mailto:isis-users@iccisis.org></a>
Subject: Re: [Isis-users] Global Change

Hello Fred,

You could try using a reformatting FST.

If your Keyword field has tag 611 and a subfield ^a and you want to copy some fields to Locations with tag 620, then the following FST should work:

[<a class="moz-txt-link-freetext" href="cid:part1.BFBA7E8E.ED848F5A@hepl.be" moz-do-not-send="true">cid:part1.BFBA7E8E.ED848F5A@hepl.be</a>]

The data will be copied, not moved.

Albert

Le 05-12-17 à 17:36, fred train a écrit :
Hello guru's

We have repeatable field called Keywords.
This field contains for historical reasons also coded location information.
A Keyword field could have entries like
Colored; upside; metal; painted; GLD; LIM; NLD; sale
The semicolons are added by the PFT. Each keyword has its own record.

We have created a new repeatable field called Locations. And the location entries from the keywords should be moved to the new Locations field and also translated into more readable strings.
The end-effect after the operation should look like:

Keyword: Colored; upside; metal; painted; sale
Locations: Gelderland(GLD); Limburg(LIM); Netherlands

The idea was to apply a global change for each of the keywords GLD, LIM and NLD.
I can modify the strings into their target strings (e.g. GLD becomes Gelderland) in the keywords.
But the Move option in Global change moves all entries of Keyword to Locations.

Is there a solution for my problem?
In other words: Is it possible with Global Change or another option to move some entries from the source repeatable field to a target repeatable field?
Regards
Fred

_______________________________________________
isis-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:isis-users@iccisis.org" moz-do-not-send="true">isis-users@iccisis.org</a><a class="moz-txt-link-rfc2396E" href="mailto:isis-users@iccisis.org" moz-do-not-send="true"><mailto:isis-users@iccisis.org></a><a class="moz-txt-link-rfc2396E" href="mailto:isis-users@iccisis.org" moz-do-not-send="true"><mailto:isis-users@iccisis.org></a><a class="moz-txt-link-rfc2396E" href="mailto:isis-users@iccisis.org" moz-do-not-send="true"><mailto:isis-users@iccisis.org></a>
To manage your own subscription options go to: <a class="moz-txt-link-freetext" href="http://lists.iccisis.org/listinfo/isis-users" moz-do-not-send="true">http://lists.iccisis.org/listinfo/isis-users</a>
Or contact Henk Rutten: <a class="moz-txt-link-abbreviated" href="mailto:hlrutten@xs4all.nl" moz-do-not-send="true">hlrutten@xs4all.nl</a><a class="moz-txt-link-rfc2396E" href="mailto:hlrutten@xs4all.nl" moz-do-not-send="true"><mailto:hlrutten@xs4all.nl></a><a class="moz-txt-link-rfc2396E" href="mailto:hlrutten@xs4all.nl" moz-do-not-send="true"><mailto:hlrutten@xs4all.nl></a><a class="moz-txt-link-rfc2396E" href="mailto:hlrutten@xs4all.nl" moz-do-not-send="true"><mailto:hlrutten@xs4all.nl></a>

[<a class="moz-txt-link-freetext" href="https://ecolevirtuelle.provincedeliege.be/docStatique/images/Logo%20HEPL10ans_RVB_signature.jpg" moz-do-not-send="true">https://ecolevirtuelle.provincedeliege.be/docStatique/images/Logo%20HEPL10ans_RVB_signature.jpg</a>]
_______________________________________________
isis-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:isis-users@iccisis.org" moz-do-not-send="true">isis-users@iccisis.org</a><a class="moz-txt-link-rfc2396E" href="mailto:isis-users@iccisis.org" moz-do-not-send="true"><mailto:isis-users@iccisis.org></a>
To manage your own subscription options go to: <a class="moz-txt-link-freetext" href="http://lists.iccisis.org/listinfo/isis-users" moz-do-not-send="true">http://lists.iccisis.org/listinfo/isis-users</a>
Or contact Henk Rutten: <a class="moz-txt-link-abbreviated" href="mailto:hlrutten@xs4all.nl" moz-do-not-send="true">hlrutten@xs4all.nl</a><a class="moz-txt-link-rfc2396E" href="mailto:hlrutten@xs4all.nl" moz-do-not-send="true"><mailto:hlrutten@xs4all.nl></a>


_______________________________________________
isis-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:isis-users@iccisis.org" moz-do-not-send="true">isis-users@iccisis.org</a>
To manage your own subscription options go to: <a class="moz-txt-link-freetext" href="http://lists.iccisis.org/listinfo/isis-users" moz-do-not-send="true">http://lists.iccisis.org/listinfo/isis-users</a>
Or contact Henk Rutten: <a class="moz-txt-link-abbreviated" href="mailto:hlrutten@xs4all.nl" moz-do-not-send="true">hlrutten@xs4all.nl</a>
</pre>
          </blockquote>
          <br>
          <br>
          <fieldset class="mimeAttachmentHeader"></fieldset>
          <br>
          <pre wrap="">_______________________________________________
isis-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:isis-users@iccisis.org" moz-do-not-send="true">isis-users@iccisis.org</a>
To manage your own subscription options go to: <a class="moz-txt-link-freetext" href="http://lists.iccisis.org/listinfo/isis-users" moz-do-not-send="true">http://lists.iccisis.org/listinfo/isis-users</a>
Or contact Henk Rutten: <a class="moz-txt-link-abbreviated" href="mailto:hlrutten@xs4all.nl" moz-do-not-send="true">hlrutten@xs4all.nl</a>
</pre>
        </blockquote>
        <p><br>
        </p>
        <pre class="moz-signature" cols="72">-- 
  .^.                                .^.
  ( )                                ( )
  ===                                ===
 =[=]================================[=]=
  | |  Ernesto Spinak                | |
  | |  <a class="moz-txt-link-abbreviated" href="mailto:spinaker@adinet.com.uy" moz-do-not-send="true">spinaker@adinet.com.uy</a>        | |
  | |  Montevideo, Uruguay           | |
  | |  tel/fax  (598) 2622-3352      | |
  | |  celular  (598) 99612238      | |
 =[=]================================[=]=
  ===                                ===
  ( )                                ( )
   V                                  V </pre>
      </blockquote>
      <br>
    </blockquote>
    <p><br>
    </p>
    <pre class="moz-signature" cols="72">-- 
  .^.                                .^.
  ( )                                ( )
  ===                                ===
 =[=]================================[=]=
  | |  Ernesto Spinak                | |
  | |  <a class="moz-txt-link-abbreviated" href="mailto:spinaker@adinet.com.uy">spinaker@adinet.com.uy</a>        | |
  | |  Montevideo, Uruguay           | |
  | |  tel/fax  (598) 2622-3352      | |
  | |  celular  (598) 99612238      | |
 =[=]================================[=]=
  ===                                ===
  ( )                                ( )
   V                                  V </pre>
  </body>
</html>