<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>Luciano,</p>
<p><br>
</p>
<p>I think you need to first subset by word (using subwrd; defined
by spaces); in this case,</p>
<p><br>
</p>
<p>var1 = subwrd(line1,3)</p>
<p>var = substr(var1,28,4)</p>
<p><br>
</p>
<p>Jim<br>
</p>
<br>
<div class="moz-cite-prefix">On 9/14/16 7:47 AM, Luciano Ritter
wrote:<br>
</div>
<blockquote
cite="mid:BN3PR18MB05807AAF0C122301AEA29370A7F10@BN3PR18MB0580.namprd18.prod.outlook.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
<div id="divtagdefaultwrapper"
style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<div>Hi<br>
<br>
I am trying to read a data file in .txt and extract the
information that I need.<br>
I read the file trough the function 'read', but the problem is
that i can't extract the information.<br>
The format of the data is:<br>
line1 = 83844;01/01/2000;1200;57.6;23.6;22.8;93;0;0;<br>
line2 = 83844;01/01/2000;1800;;23.6;22.6;91;18;6.6;<br>
line3 = 83844;02/01/2000;0000;;22;21.3;93;18;4.6;<br>
line4 = 83844;02/01/2000;1200;51.4;23.2;21.7;87;18;3.3;<br>
<br>
I need to extract only 23,6 ; 23,6 ; 22 ; 23,2 of the first,
second, third and fourth lines. I was trying with the
intrinsic function, for example to the first line:<br>
<br>
var = substr(line1,28,4)<br>
<br>
var = 23,6<br>
<br>
If it was only those 4 lines, i could do manually but they are
10200 lines. So, I think i need some loop with 'while'
variating the substr function, but i don't know how to do
this.<br>
<br>
Someone can help me?<br>
<br>
Thanks a lot.<br>
</div>
<div id="Signature">
<div><br>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
gradsusr mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a>
<a class="moz-txt-link-freetext" href="http://gradsusr.org/mailman/listinfo/gradsusr">http://gradsusr.org/mailman/listinfo/gradsusr</a>
</pre>
</blockquote>
<br>
</body>
</html>