<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Dear Carlos<br>
<br>
My explanation will be in English because this question could be
interesting for everybody<br>
<br>
You have a repeatable field (v859) with subfields, let's say
something like<br>
<big><font face="Courier New, Courier, monospace"><br>
859: ^aSome data1^b12345^cmore data1<br>
859: ^aSome <b>SAP </b>data^b12500^cmore data2<br>
859: ^aSome data3^b13001^cmore data3</font></big><br>
<br>
Your problem is how to modify an occurrence of field 859 when <br>
IF v859^a contains 'SAP' or 'sap' or any variation of this
trigram<br>
then<br>
add a leter at the end of subfield v856^b<br>
FI<br>
<br>
Let's say that the letter to add is 'E' (which stands for
Ernesto <span class="moz-smiley-s1"><span> :-) </span></span>)<br>
So the result of the example above is <br>
<br>
<big><font face="Courier New, Courier, monospace"> 859: ^aSome
data1^b12345^cmore data1<br>
859: ^aSome <b>SAP </b>data^b12500<b>E</b>^cmore data2<br>
859: ^aSome data3^b13001^cmore data3<br>
</font><br>
Ok, let's go to work<br>
<br>
You have to do it from the command line, using MX, <br>
let's say the name of your database is dbcarlos<br>
<br>
mx dbcarlos <a class="moz-txt-link-abbreviated" href="mailto:proc=@sap.prc">proc=@sap.prc</a> create=xxx now -all tell=1000<br>
copy xxx.* dbcarlos.*<br>
then you have to do a fullinversion of dbcarlos<br>
<br>
Now come the interesting part, sap.prc this file you can
create with notepad<br>
-----------------------------------------------------<br>
'd859'<br>
<br>
( if p(v859) then <br>
<br>
'<859>^a', v859^a, <br>
|^b|v859^b, if s(mhu,v859^a,mpl):'SAP'
then 'E' fi,<br>
|^c|v859^c,<br>
'</859>',<br>
<br>
fi )</big><br>
<big><big>-----------------------------------------------------</big><font
face="Courier New, Courier, monospace"><br>
</font>Note the trick: </big><big>s(mhu,v859^a,mpl):'SAP'<br>
in this way you can catch all variations of the string SAP,
sAP, Sap, etc<br>
<br>
<br>
Enjoy it<br>
Regards<br>
Ernesto Spinak<br>
<font face="Courier New, Courier, monospace"><br>
</font></big><br>
<br>
El 08/03/2013 12:57, Carlos Andres Di Pierro escribió:<br>
</div>
<blockquote
cite="mid:CAPC6mA+EkNNMkgzvkAvFbkED8RFjqtnTxGz5tJaKnOTtp65ANg@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>Hola a todos!<br>
<br>
</div>
<div>Quiero saber si es posible con la herramienta MX hacer lo
siguiente.<br>
<br>
</div>
<div>Tengo un campo repetible(<b>v859</b>) con 3 subcampos <b>a,b,c</b><br>
</div>
<div>El subcampo "<b>b"</b> guarda el inventario.<br>
</div>
<div>Necesito agregar un letra al final del subcampo <b>"b"</b>,
siempre y cuando el subcampo <b>"a"</b> contenga "SAP". Eso
con cada ocurrencia del campo <b>v859</b> que cumpla con esa
condición.<br>
<br>
</div>
<div><br>
Desde ya muchas gracias por cualquier sugerencia que me puedan
dar<br>
<br>
</div>
<div>Saludos<br>
</div>
<div>Carlos<br>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
isis-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:isis-users@iccisis.org">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">http://lists.iccisis.org/listinfo/isis-users</a>
Or contact Henk Rutten: <a class="moz-txt-link-abbreviated" href="mailto:hlrutten@xs4all.nl">hlrutten@xs4all.nl</a>
</pre>
</blockquote>
<br>
<br>
<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>