<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">On 12/7/14, 2:27 AM, Mike Fedkiw via
      Filepro-list wrote:<br>
    </div>
    <blockquote cite="mid:5484017A.6080700@aol.com" type="cite">filepro
      5.0.09
      <br>
      <br>
      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.
      <br>
      <br>
      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.
      <br>
      <br>
      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.
      <br>
      <br>
      Also, it doesn't error out right away, it actually processes 3300
      or so records before the error..
      <br>
      <br>
      <br>
      *** A System Error Has Occurred ***
      <br>
      <br>
      On File: /filepro/invoicep/index.P
      <br>
      <br>
      Output Processing
      <br>
      Line Number: 7
      <br>
      <br>
      lookup newp = invoicep  r=free  -e
      <br>
      ^
      <br>
      Invalid argument
      <br>
      <br>
      <br>
      <br>
      =====================here's the actual processing=================
      <br>
        1  -------   -   -   -   -   -   -   -   -   -   -
      <br>
             ◄ If: 10 ne "0177"
      <br>
             Then: end
      <br>
        2  -------   -   -   -   -   -   -   -   -   -   -
      <br>
             ◄ If: (21 ne "1") and (21 ne "6")
      <br>
             Then: end
      <br>
        3  -------   -   -   -   -   -   -   -   -   -   -
      <br>
             ◄ If:
      <br>
             Then: ky(16,*,g)="10001381"&17
      <br>
        4  -------   -   -   -   -   -   -   -   -   -   -
      <br>
             ◄ If:
      <br>
             Then: lookup invp = invoicep  k=ky   i=A -nx
      <br>
        5  -------   -   -   -   -   -   -   -   -   -   -
      <br>
      notp   ◄ If: not invp
      <br>
             Then: close invp;end
      <br>
        6  -------   -   -   -   -   -   -   -   -   -   -
      <br>
             ◄ If: invp(15)&invp(11) ne ky
      <br>
             Then: close invp;end
      <br>
        7  -------   -   -   -   -   -   -   -   -   -   -
      <br>
             ◄ If:
      <br>
             Then: lookup newp = invoicep  r=free  -e
      <br>
        8  -------   -   -   -   -   -   -   -   -   -   -
      <br>
             ◄ If:
      <br>
             Then: copy invp to newp
      <br>
        9  -------   -   -   -   -   -   -   -   -   -   -
      <br>
             ◄ If:
      <br>
             Then: newp(15)="10002850";newp(16)="0177"
      <br>
       10  -------   -   -   -   -   -   -   -   -   -   -
      <br>
             ◄ If:
      <br>
             Then: newp(17)="FISH BOWL NORWICH NEW"
      <br>
       11  -------   -   -   -   -   -   -   -   -   -   -
      <br>
             ◄ If:
      <br>
             Then: write newp;;getnext invp;goto notp
      <br>
       12  -------   -   -   -   -   -   -   -   -   -   -
      <br>
      <br>
      <br>
      <br>
      Mike.
      <br>
      <br>
    </blockquote>
    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):<br>
    <br>
    Then:  ix(3,.0)="1"<br>
    Then:  dim fromfile(###):invp(1)<br>
    Then:  dim tofile(###):newp(1)<br>
    ixloop  If: ix le "###"<br>
    Then: tofile[ix]=fromfile[ix];ix=ix+"1"; goto ixloop<br>
    <br>
    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, "
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <span>If you have a lookup file with memo fields, and do a COPY to<font
        style="color:#000000; background-color:#b2b4bf"></font> that
      lookup, the memos won't be copied correctly."<br>
      <br>
      Bruce<br>
    </span><br>
    <br>
    <br>
    <br>
    <br>
    <br>
  </body>
</html>