[gradsusr] read data

Martin V. Mathew vmartinmathew at gmail.com
Fri Jul 26 08:08:58 EDT 2019


Hi,

Try this way

*--------------------------------
InFile='data.txt';

* skipping the first line of the data file
res=read(InFile)

res=read(InFile)
returnCd=subwrd(res,1);

while (returnCd!=2) ;* Checking for end of file
latpt=subwrd(res,2);* say 'lat='latpt
lonpt=subwrd(res,3);* say 'lon='lonpt

* Reading next line
res=read(InFile)
returnCd=subwrd(res,1);* say 'rc='returnCd
endwhile ;* while (returnCd!=2)
*--------------------------------

On Thu, 25 Jul 2019 at 15:35, E Mobarak <mobarak_e at yahoo.com> wrote:

> Hi usr
> how write scripts for read  data from text file with some row and column
> for example
>
> data.txt  including
> lat    lon   name
> 31     45  AA
> 38     40  BB
>  25    50  CC
> thnaks
>
>
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>


-- 
Dr. Martin V. Mathew
Project Scientist -2
Ocean Observation Systems
National Institute of Ocean Technology
Pallikaranai, Chennai,
India.
https://www.researchgate.net/profile/Martin_Mathew
https://scholar.google.co.in/citations?user=02RvXg4AAAAJ&hl=en
http://www.dak.iitkgp.ernet.in/phd/profile.php?roll=09CL9405
https://www.scopus.com/authid/detail.uri?authorId=57190953029
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gradsusr.org/pipermail/gradsusr/attachments/20190726/341adb47/attachment.html>


More information about the gradsusr mailing list