Fred,
I don't recall seeing the FILEPARSE error before. It looks like GT.M may be 
complaining
about the file name or path. I would try changing .mumps to .m. If that doesn't 
work check
your file permissions. It might be helpful to see the script file that sets your
environment variables for mumps. Are you running it from the command line or 
from PHP or CGI?

You will also need to prefix the SET commands (also DO and ZWRITE) in your 
MUMPS routine
with a TAB or some spaces at the beginning of each line. Only a line label can 
precede the
first TAB or space.

It is also generally recommended (but not required) that the first line of any 
routine
should begin with a label of the same name as the routine and a comment that 
brifely
describes it and identifies the author and perhaps a date, etc.

If you are seeking to connect to VistA data on the web, you should give a 
serious look at
M2Web. Among other things, it includes some general tools for accessing Fileman 
defined
data and metadata in XML and JSON.

Fred Trotter wrote:
>Hello Hardhats,
>       Kevin T has been helping me with code to get an Array directly to an
>XML format. I have taken the M programming course at the last WorldVistA
>conference, but we did not have time for any hands on work. So I am
>unfamiliar with getting GTM to go, (although I have it installed on my
>computer successfully.)
>
>on the linux bash command line I type
>>mumps
>and then it prompts me for a file and I enter
>
>array2XML.mumps
>
>and I get the following error...
>
>%GTM-E-FILEPARSE, Error parsing file specification:
>/var/www/html/php4/vista2mm/array2XML.mumps
>
>I am running mumps from the same directory as the file. The contents of the
>file is at the end of the message. Note that any "real" code was generously
>given to me by Kevin. The only thing I did was to create my own array at the
>top of the file. I am sure that I am misusing white space and/or making
>other significant newbie errors. Feel free to point me to a FAQ, but a
>google got me no where. (As with all things Mumps/VistA, I was overwhelmed
>with the amount of data, and not sure where to start). So I am aware that
>this is very much a "how to get off the ground with GTM" question, and I did
>the due diligence.
>
>Regards,
>-FT
>
>P.S. The contents of array2XML.mumps
>
>file start>
>
>set test("patient_id")=1111111
>set test("patient_id","fname")="Fred"
>set test("patient_id","lname")="Trotter"
>set test("patient_id","socsec")=123121234
>set test("patient_id","phone")="1112223333"
>set test("patient_id","address_line1")="1005 E 8th #3023"
>set test("patient_id","state")="AZ"
>set test("patient_id","zip")=85281
>
>do Array2XML("test","result",1)
>zwr result(*)
>
>Array2XML(pArray,pResult,indent)
>       ;"Purpose: to convert an array into XML format
>       ;"Input: pArray -- the NAME OF the array to convert (array can
>be any format)
>       ;"       pResult -- the NAME OF the output array.
>       ;"              format:
>       ;"                Result(0)="<?xml version='1.0'?>"
>       ;"                Result(1)="<Node id="Node Name">Node Value</Node>
>       ;"                Result(2)="  <Node id="Node Name">Node Value</Node>
>       ;"                Result(3)="  <Node id="Node Name">Node Value</Node>
>       ;"                Result(4)="  <Node id="Node Name">Node Value
>  ;"<--- start subnode
>       ;"                Result(5)="    <Node id="Node Name">Node
>Value</Node>
>       ;"                Result(6)="    <Node id="Node Name">Node
>Value</Node>
>       ;"                Result(7)="  </Node>
>        ;"<---- end subnode
>       ;"                Result(8)="  <Node id="Node Name">Node Value</Node>
>       ;"       indent -- OPTIONAL.  if 1,  subnodes have whitespace
>indent for pretty viewing
>       ;"Output: pResult is filled
>       ;"Result: none.
>       ;"Note: example call  do Array2XML("MyArray","MyOutput",1)
>
>       kill @pResult
>       set @pResult@(0)=0
>       if $get(indent)=1 set indent=""
>       else  set indent=-1
>       do A2XNode(pArray,pResult,.indent)
>       set @pResult@(0)=$$XMLHDR^MXMLUTL
>
>       quit
>
>
>A2XNode(pArray,pResult,indent)
>       ;"Purpose: To do the output for Array2XML
>       ;"Input: pArray - the NAME OF the array to convert
>       ;"       pResult - the NAME OF the output array.
>       ;"              Format to be as described in Array2XML, except
>Result(0)=MaxLine
>       ;"       indent -- OPTIONAL.  if -1, subnodes WON't whitespace
>indent for pretty viewing
>       ;"                              otherwise, indent is string
>holding space to indent
>       ;"Result: none
>
>       new i,s
>       set indent=$get(indent)
>       set i=$order(@pArray@(""))
>       if i'="" for  do  quit:(i="")
>       . set s="" if indent'=-1 set s=indent
>       . set s=s_"<Node id="""_i_""">"_$get(@pArray@(i))
>       . if $data(@pArray@(i))>1 do
>       . . set @pResult@(0)=+$get(@pResult@(0))+1  ;"Increment maxline
>       . . set @pResult@(@pResult@(0))=s
>       . . new subIndent set subIndent=-1
>       . . if indent'=-1 set subIndent=indent_"  "
>       . . do A2XNode($name(@pArray@(i)),pResult,subIndent)
>       . . set s="" if indent'=-1 set s=indent
>       . . set s=s_"</Node>"
>       . else  do
>       . . set s=s_"</Node>"
>       . set @pResult@(0)=+$get(@pResult@(0))+1  ;"Increment maxline
>       . set @pResult@(@pResult@(0))=s
>       . set i=$order(@pArray@(i))
>
>       quit
><file end
>
>
>
>
>
>--
>Fred Trotter
>SynSeer, Consultant
>http://www.fredtrotter.com
>http://www.synseer.com

---------------------------------------
Jim Self
Systems Architect, Lead Developer
VMTH Computer Services, UC Davis
(http://www.vmth.ucdavis.edu/us/jaself)
---------------------------------------
M2Web Demonstration with VistA
(http://vista.vmth.ucdavis.edu/)
(http://openforum.worldvista.org/~forum/m.cgi)
---------------------------------------


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Hardhats-members mailing list
Hardhats-members@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hardhats-members

Reply via email to