Greg, I think you are correct. And from what I read in the documentation, that was not exactly clear. I ended up creating a big FDA structure in one subroutine, but then handing it to UPDATE^DIE only one bit at a time.
Kevin --- Greg Woodhouse <[EMAIL PROTECTED]> wrote: > The code I posted some weeks ago that that generates > an FDA array for > used to update a file (of unknown degree) together > with subfiles > (again, of unknown degree) was needed for exactly > the same reason. My > first attempt used non-consecutive IEN strings > because they were easier > to generate, but it didn't work. In the end, I had > to write a couple of > nested loops building a temporary data structure and > then walk the > structure assigning a new subscripts as needed. Once > I did that, > everything worked beautifully. > > --- Kevin Toppenberg <[EMAIL PROTECTED]> wrote: > > > > > I guess I'll have to believe you on this one. > When I > > fixed my code to make the placemarkers appear in > > serial order it started working. After your post > > below, I tried to go back and reproduce the error > and > > then work towards your solution. But now the > error > > won't occur! Here is my log (which is exactly > like > > the one that failed in my earlier post--see way > down > > below) > > > > GTM>d DT^DICRW > > GTM>set FDA(200,"+999,",.01)="USER,TEST01" > > GTM>set DIC(0)="" > > GTM>do UPDATE^DIE("E","FDA","ZZIEN","ZZMSG") > > GTM>zwr ZZIEN > > ZZIEN(999)=100 > > GTM>zwr ZZMSG > > %GTM-E-UNDEF, Undefined local variable: ZZMSG > > > > Never-the-less, I have modified my code to > namespace > > my variables as you mentioned. I read that > > Programming Standards guide, but I apparently > didn't > > retain that important fact. > > > > Thanks again. > > Kevin > > > > > > --- steven mcphelan <[EMAIL PROTECTED]> > wrote: > > > > > The problem you are having is because you are > using > > > the FDA array as your > > > input to Fileman. The VA Programming Standards > > > required that if you pass > > > data to another API outside your assigned > namespace, > > > you must namespace your > > > input variables to avoid the very clashes you > are > > > seeing. If you do not > > > have an assigned namespace then you can use the > ZZ > > > namespace. Try the same > > > thing with ZZFDA() instead of FDA. > > > > > > As I knew, the place holders in calling Fileman > APIs > > > do not need to be > > > sequential. They are just that, a string in a > > > certain syntax to represent > > > an internal record number. The number you pass > is > > > important when evaluating > > > the return array from the FM API that contains > the > > > actual internal record > > > numbers created for those place holders. > > > > > > Here are two examples. One just adds a NEW > PERSON. > > > The second adds a NEW > > > PERSON and also adds a new entry to a multiple > in > > > file 200. > > > > > > VAH>S DIC(0)="",VFD(200,"+5,",.01)="DOE,JANE" > > > > > > VAH>K ZZERR,ZZIEN,DIERR,VFD > > > > > > VAH>S DIC(0)="",VFD(200,"+5,",.01)="DOE,JANE" > > > > > > VAH>D UPDATE^DIE("E","VFD","ZZIEN","ZZERR") W ! > ZW > > > ZZERR,ZZIEN > > > > > > ZZIEN(5)=2 > > > > > > VAH>D ^%G > > > > > > Device: Right margin: 80=> > > > > > > Global ^VA(200,2 > > > ^VA(200,2,0)=DOE,JANE > > > 1)=^^^^^^3041213^10000000033 > > > 3.1)=1951 > > > 20)=^JANE DOE > > > > > > > > > --------------------------------------------------------------------------- > > > VAH>S DIC(0)="",VFD(200,"+3,",.01)="DOE,JANE" > > > > > > VAH>S VFD(200.005,"+97,+3,",.01)="USERDOE" > > > > > > VAH>D UPDATE^DIE("E","VFD","ZZIEN","ZZERR") W ! > ZW > > > ZZERR,ZZIEN > > > > > > ZZIEN(3)=2 > > > ZZIEN(97)=1 > > > > > > VAH>D ^%G > > > > > > Device: Right margin: 80=> > > > > > > Global ^VA(200,2 > > > ^VA(200,2,0)=DOE,JANE > > > 1)=^^^^^^3041213^10000000033 > > > 3.1)=1951 > > > 20)=^JANE DOE > > > ^VA(200,2,500,0)=^200.005A^1^1 > > > ^VA(200,2,500,1,0)=USERDOE > > > ^VA(200,2,500,"B","USERDOE",1)= > > > > > > > > > > > > > > > ----- Original Message ----- > > > From: "Kevin Toppenberg" <[EMAIL PROTECTED]> > > > To: <[EMAIL PROTECTED]> > > > Sent: Sunday, December 12, 2004 1:22 PM > > > Subject: Re: [Hardhats-members] Mysterious DIERR > > > message > > > > > > > > > > Oops, "?2? should have been "?2" KT > > > > > > > > --- Kevin Toppenberg <[EMAIL PROTECTED]> wrote: > > > > > > > > > Well, I have gotten the process working. > I'll > > > post > > > > > here to give some conclusion in case someone > > > reads > > > > > this later. > > > > > > > > > > The placemarkers "?+1" or "?2? etc. DO have > to > > > be > > > > > used > > > > > in sequential order. At least starting out > with > > > "2" > > > > > caused an error. This is different from > what I > > > (and > > > > > I > > > > > think most others) previously thought. > > > > > > > > > > Thanks all > > > > > Kevin > > > > > > > > > > --- Kevin Toppenberg <[EMAIL PROTECTED]> > wrote: > > > > > > > > > > > Steven, > > > > > > > > > > > > I don't have Cache', so I can't try out > the > > > latest > > > > > > Cache.dat. > > > > > > > > > > > > It appears that in the code set that I > have, > > > there > > > > > > IS > > > > > > a difference between "+1," and "+999,". > Below > > > is > > > > > a > > > > > > screen log where the latter fails, while > the > > > > > former > > > > > > succeeds. > === message truncated === __________________________________ Do you Yahoo!? Meet the all-new My Yahoo! - Try it today! http://my.yahoo.com ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/ _______________________________________________ Hardhats-members mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hardhats-members