syntax to export data in an array

Richard D. Williams richard at appgrp.net
Fri Sep 28 08:12:18 PDT 2018


one oops.   p(3,.0) is the counter for individual exported fil names.

I should have typed, p(3,.0)=p+"1".

Of course if you do not want individual files do not use this counter 
and remove the "close mgr" on line 5.

Richard D. Williams

On 9/28/2018 9:46 AM, Richard D. Williams via Filepro-list wrote:
> I believe this would work. (see below)
>
> If you still have issues, call me at (713) 931-9938.
>
> Richard D. Williams
>
>
>
>   1  -------   -   - -   -   -   -   -   -   -   -   -   -   - -   -   -
>          If:
>        Then: 'once your array is fill or you are done filling it
>   2  -------   -   -   -   -   -   -   -   -   -   -   -   -   - -   
> -   -
>          If:
>        Then: n(3,.0)="";p(3,.0)="1";fa(60)="";x(1)="";gosub wrtcsv
>   3  -------   -   -   -   -   -   -   -   -   -   -   -   -   - -   
> -   -
>          If:
>        Then: clear ecw;'goto back to start again
>   4  -------   -   -   -   -   -   -   -   -   -   -   -   -   - -   
> -   -
> wrtcsv   If:
>        Then: n=n+"1"
>   5  -------   -   -   -   -   -   -   -   -   -   -   -   -   - -   
> -   -
>          If: n gt "50"
>        Then: n="";close mgr;return
>   6  -------   -   -   -   -   -   -   -   -   -   -   -   -   - -   
> -   -
>          If: ecw(n) eq ""
>        Then: goto wrtcsv
>   7  -------   -   -   -   -   -   -   -   -   -   -   -   -   - -   
> -   -
>          If: fa eq ""
>        Then: fa="/tmp/export_csv_"{p{".csv"
>   8  -------   -   -   -   -   -   -   -   -   -   -   -   -   - -   
> -   -
> again    If:
>        Then: export WORD mgr = (fa)
>   9  -------   -   -   -   -   -   -   -   -   -   -   -   -   - -   
> -   -
>          If: x eq ""                'make header - optional
>        Then: mgr(1)="HEADER";x="x";goto again
>  10  -------   -   -   -   -   -   -   -   -   -   -   -   -   - -   
> -   -
>          If:
>        Then: mgr(1)=ecw(n);goto wrtcsv
>  11  -------   -   -   -   -   -   -   -   -   -   -   -   -   - -   
> -   -
>
> On 9/27/2018 4:34 PM, Tim OBrien via Filepro-list wrote:
>> I have an array dim ecw(100)(50,*) that collects data from a text 
>> file of forms.
>> What would be the syntax to export all the fields in the given array 
>> in csv format , reset the array (clear ecw) and then loop each time 
>> another record needs output.
>> Thanks
>> Tim OBrien
>>   -------------- next part --------------
>> An HTML attachment was scrubbed...
>> URL: 
>> <http://mailman.celestial.com/pipermail/filepro-list/attachments/20180927/cbf547ee/attachment.html>
>> _______________________________________________
>> Filepro-list mailing list
>> Filepro-list at lists.celestial.com
>> Subscribe/Unsubscribe/Subscription Changes
>> http://mailman.celestial.com/mailman/listinfo/filepro-list
>>
>> ---
>> This email has been checked for viruses by AVG.
>> https://www.avg.com
>>
>>
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: 
> <http://mailman.celestial.com/pipermail/filepro-list/attachments/20180928/9f11647a/attachment.html>
> _______________________________________________
> Filepro-list mailing list
> Filepro-list at lists.celestial.com
> Subscribe/Unsubscribe/Subscription Changes
> http://mailman.celestial.com/mailman/listinfo/filepro-list



More information about the Filepro-list mailing list