Why not try

WP^DIE( ): Word Processing Filer
This procedure files a single word processing field. 

Format
WP^DIE(FILE,IENS,FIELD,FLAGS,wp_root,msg_root)
 

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Kevin
Toppenberg
Sent: Monday, October 04, 2004 3:17 PM
To: Hardhats Sourceforge
Subject: [Hardhats-members] ?? FILE^DIE bug ??

I am having an unusual error when using FILE^DIE to upload a value into
a word processing field.  The execution just drops out and exits back to
the command line when I call the function.  In these situations, it is
more likely my problem than the API's, but I can't figure out the issue.
Here is my input data:

FDA structure
+-8989.3
 |
 +--"1,"
    |
    +--".01"="TMG.TMGDOMAIN.COM"
    |
    +--"240"="Welcome to OpenVistA EMR"

Flags="KE"
MsgG=(not yet defined)

I call FILE^DIE(Flags,"FDA","Msg") which results in the following series
of calls:
--> FILEX^DIEF
--> D DRIVER
--> D PUTDATA^DIEF1
--> D PUTWP^DIEFW(DIEFFLAG,DIEFNVAL,DIEFNODE)
   in this case: ==> D PUTWP^DIEFW("KE","welcome to OpenVistA EMR
System","^XTV(8989.3,1,""INTRO"")")
I then come to a consistent crash at the following point (Note the '==>'
on the 3rd line):
-----------------------------------------------
PUTWP(DIEFWPFL,DIEFTSRC,DIEFNODE)       ;
        N BEGIN
        I "@"[DIEFTSRC K @DIEFNODE Q
==>     I '($D(@DIEFTSRC)\10) D
BLD^DIALOG(305,DIEFTSRC,DIEFTSRC) Q
        I $G(DIEFWPFL)'["A" S BEGIN=1 K @DIEFNODE
        E  S BEGIN=$$NUMLNS(DIEFNODE)+1 K:BEGIN=1 @DIEFNODE
        I $D(@DIEFTSRC@($O(@DIEFTSRC@(0)),0))#2 S
DIEFWPFL=$G(DIEFWPFL)_"Z"
        N LINECNT,INLINE S INLINE=0
        F LINECNT=BEGIN:1 S INLINE=$O(@DIEFTSRC@(INLINE))
Q:INLINE'=+$P(INLINE,"E")  D
        . I $G(DIEFWPFL)'["Z" S
@DIEFNODE@(LINECNT,0)=$G(@DIEFTSRC@(INLINE))
        . E  S @DIEFNODE@(LINECNT,0)=$G(@DIEFTSRC@(INLINE,0))
        S LINECNT=LINECNT-1
        S @DIEFNODE@(0)=U_U_LINECNT_U_LINECNT_U_DT
        Q
----------------------------------------------

What's strange here is that DIEFTSRC="Welcome to OpenVistA EMR System"
so @DIEFTSRC has no meaning.

Notice also that the calling parameters are:

D PUTWP^DIEFW(DIEFFLAG,DIEFNVAL,DIEFNODE) ... found in DIEF1.m

but the PUTWP function expects these parameters:

PUTWP(DIEFWPFL,DIEFTSRC,DIEFNODE) .. declared in DIEFW.m

It seems to me that the middle parameter (in my case the string
"Welcome...") is passed as a string input value, but in PUTWP, it is
being used as a variable name (SRC)... causing a crash.

The exact cause of the crash is this (As determined from the immediate
execution window in the Serenji
debugger)
write ($D(@DIEFTSRC)\10)
%GTM-E-INDEXTRACHARS, Indirection string contains extra trailing
characters write DIEFTSRC welcome to OpenVistA EMR System

Any thoughts?  This seems like a bug to me.

Thanks
Kevin

 


                
_______________________________
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com


-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give
us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find
out more http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Hardhats-members mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hardhats-members


-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Hardhats-members mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hardhats-members

Reply via email to