Inserting Newlines in Export

Kenneth Brody kenbrody at spamcop.net
Thu Jul 7 11:12:46 PDT 2011


On 7/7/2011 1:00 PM, Stanley - stanlyn-com wrote:
> Hi Ken,
>
> I'm top posting...
>
>> I'm not sure why you are building the export lines manually, rather than
> using "f=~" and just exporting
>> multiple records when you want/need.
>
> I see no other way of getting the data out, because..... each ap_invoice
> record contains 24 of its detail records in contiguous 6 field sets.  That
> is what each of the arrays (arr01, arr02, ..... arr24) points to.  I'm
[...]

You can, of course, execute the export multiple times if you need to export 
multiple sets of data.

[...]
>> Which line gives the error, and what is the exact, complete, error
> message?
>
> *** A filrpro Error Has Occurred ***
> Array Index Out of Range: dim arr03(6) -- Index: 7
> Output Processing
> Line Number: 16
> Arr03(cu) eq ""
> Goto finish
>
> Here is the complete routine...
[...]
> ::dim arr03(6)106 ; cu="1":
[...]
> loop3:::
> :arr03(cu) eq "":goto finish:
> :cu eq "1":f=f&  nl&  89&  "~":
> :cu le "6":f=f&  arr03(cu)&  "~" ; cu=cu+"1" ; goto loop3:

What happens when that line is executed when cu contains "6"?

[...]
> Ken, would you elaborate on what the error message is saying, ie: what is
> the (6) and Index:7 all represents?

"dim arr03(6)" is just that -- you dimensioned arr03 to be 6 elements long. 
  The "index:7" means you tried to access the array with a subscript of 7.

[...]


-- 
Kenneth Brody


More information about the Filepro-list mailing list