error on new record
Bruce Easton
bruce at stn.com
Sun Dec 7 09:28:57 PST 2014
On 12/7/14, 2:27 AM, Mike Fedkiw via Filepro-list wrote:
> filepro 5.0.09
>
> I thought I was writing a simple process to duplicate some records in
> one file with a couple adjustments to the new record but nothing's
> ever that simple I suppose.
>
> I'm just going to post the processing here instead of trying tyo
> explain it I guess, its only ten lines and I had a paragraph
> explaining it.
>
> I don't know why it even says indexP because after seeing that come up
> as an error, I deleted the indexP to see if it made any difference but
> it didn't. Also I'm not too sure if this makes any difference but the
> copy from and to are the same file with different aliases.
>
> Also, it doesn't error out right away, it actually processes 3300 or
> so records before the error..
>
>
> *** A System Error Has Occurred ***
>
> On File: /filepro/invoicep/index.P
>
> Output Processing
> Line Number: 7
>
> lookup newp = invoicep r=free -e
> ^
> Invalid argument
>
>
>
> =====================here's the actual processing=================
> 1 ------- - - - - - - - - - -
> ◄ If: 10 ne "0177"
> Then: end
> 2 ------- - - - - - - - - - -
> ◄ If: (21 ne "1") and (21 ne "6")
> Then: end
> 3 ------- - - - - - - - - - -
> ◄ If:
> Then: ky(16,*,g)="10001381"&17
> 4 ------- - - - - - - - - - -
> ◄ If:
> Then: lookup invp = invoicep k=ky i=A -nx
> 5 ------- - - - - - - - - - -
> notp ◄ If: not invp
> Then: close invp;end
> 6 ------- - - - - - - - - - -
> ◄ If: invp(15)&invp(11) ne ky
> Then: close invp;end
> 7 ------- - - - - - - - - - -
> ◄ If:
> Then: lookup newp = invoicep r=free -e
> 8 ------- - - - - - - - - - -
> ◄ If:
> Then: copy invp to newp
> 9 ------- - - - - - - - - - -
> ◄ If:
> Then: newp(15)="10002850";newp(16)="0177"
> 10 ------- - - - - - - - - - -
> ◄ If:
> Then: newp(17)="FISH BOWL NORWICH NEW"
> 11 ------- - - - - - - - - - -
> ◄ If:
> Then: write newp;;getnext invp;goto notp
> 12 ------- - - - - - - - - - -
>
>
>
> Mike.
>
Mike, if deleting the lockfile and rebuilding all auto indexes does not
help, then try this: replace the "copy invp to newp" line with
assignment via array (but replace "###" with the highest field # in
invoicep):
Then: ix(3,.0)="1"
Then: dim fromfile(###):invp(1)
Then: dim tofile(###):newp(1)
ixloop If: ix le "###"
Then: tofile[ix]=fromfile[ix];ix=ix+"1"; goto ixloop
and see if that makes any difference. I have one program on Linux
5.0.14 (that does NOT have memo fields) where the record copy only
works via array. I only mention memo fields because, according to the
5.0.15 release notes, " If you have a lookup file with memo fields, and
do a COPY tothat lookup, the memos won't be copied correctly."
Bruce
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.celestial.com/pipermail/filepro-list/attachments/20141207/af92fb35/attachment.html>
More information about the Filepro-list
mailing list