M/MUMPS import a CSV file

204 views Asked by At

I am currently learning the M/MUMPS programming language and would like to import a CSV file to store for later use with the MUMPS global array system.

I have found an example of code from the Mumpster site (I modified the infile statement to point to another directory, from the original code on the site):

s infile="~/Desktop/test.csv"
f i=1:1 u infile r x q:x="" u 0 w !,i,?10,x

However, when running this code with YottaDB, I get the following error:

%YDB-E-QUITARGUSE, Quit cannot take an argument in this context
    for i=1:1 u infile r x q:x="" u 0 w !,i,?10,x
                                  ^-----

Any help would be greatly appreciated.

1

There are 1 answers

0
igotmumps On BEST ANSWER

You just need an extra space before the u 0 w...

for i=1:1 u infile r x q:x=""  u 0 w !,i,?10,x

The compiler is telling you that the quit command is trying to return a value, which you can't do the way you have the code structured.