<div dir="ltr"><div><div>Muchísimas gracias Ernesto!!! <br><br></div>Saludos<br></div>Carlos<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/3/8 spinaker <span dir="ltr"><<a href="mailto:spinaker@adinet.com.uy" target="_blank">spinaker@adinet.com.uy</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<div>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><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 href="mailto:proc=@sap.prc" target="_blank">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 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></fieldset>
<br>
<pre>_______________________________________________
isis-users mailing list
<a href="mailto:isis-users@iccisis.org" target="_blank">isis-users@iccisis.org</a>
To manage your own subscription options go to: <a href="http://lists.iccisis.org/listinfo/isis-users" target="_blank">http://lists.iccisis.org/listinfo/isis-users</a>
Or contact Henk Rutten: <a href="mailto:hlrutten@xs4all.nl" target="_blank">hlrutten@xs4all.nl</a>
</pre>
</blockquote>
<br>
<br>
<pre cols="72">--
.^. .^.
( ) ( )
=== ===
=[=]================================[=]=
| | Ernesto Spinak | |
| | <a href="mailto:spinaker@adinet.com.uy" target="_blank">spinaker@adinet.com.uy</a> | |
| | Montevideo, Uruguay | |
| | tel/fax (598) 2622-3352 | |
| | celular (598) 99612238 | |
=[=]================================[=]=
=== ===
( ) ( )
V V </pre>
</div>
<br>_______________________________________________<br>
isis-users mailing list<br>
<a href="mailto:isis-users@iccisis.org">isis-users@iccisis.org</a><br>
To manage your own subscription options go to: <a href="http://lists.iccisis.org/listinfo/isis-users" target="_blank">http://lists.iccisis.org/listinfo/isis-users</a><br>
Or contact Henk Rutten: <a href="mailto:hlrutten@xs4all.nl">hlrutten@xs4all.nl</a><br>
<br></blockquote></div><br></div>