import
scooter6 at gmail.com
scooter6 at gmail.com
Thu Jan 18 17:07:24 PST 2018
Well, I did get it working, albeit with more lines than I wanted to write
but alas it's working as I need it to.....thankfully
Thanks again Richard
From the data files I've seen, I've encountered a max of 6 pieces of data
in a single field that I've had to parse.....but I can tell by looking at
it that there are going to be some that have more....
specifically 1 field....so I wrote that to accept up to 20 -- we will see
how it goes....
Until we started getting live data, I won't truly know but at least if I
need to add more, I know how to...
thanks again
Scott
On Wed, Jan 17, 2018 at 4:42 PM, Fairlight via Filepro-list <
filepro-list at lists.celestial.com> wrote:
> That would always presume your array is dynamically sized, or big enough to
> contain whatever you exploded to. fP requires static dimensioning, and also
> has a 999 element limit, if memory serves.
>
> There're reasons #1 and #2 why fP can't gracefully support such a function.
>
> m->
>
> On Wed, Jan 17, 2018 at 03:25:35PM -0600, Richard D. Williams via
> Filepro-list thus spoke:
> > Top Post:
> >
> > Scott,
> >
> > Yes and no. I wish there was a function like in php where you could
> > just explode the string into an array, but alas, there is not.
> >
> > What I do is test the imported field value for a "^".
> >
> > If it does not contain the "^", well, you just do what you program
> > normally does.
> >
> > If it does contain the "^", this is what I do.
> >
> > dim specval(20)
> >
> > n(3,.0)=""
> >
> > z="abc1234^xyz6789^rdwtest"
> >
> > if: z co "^" and z ne ""
> > then: p(3,.0)=instr(z,"^");la=mid(z,"1",p-"1");n=n+"1";specval(n)=
> la;la="";mid(z,"1",p)="";z=""{z{""
> >
> > if: not(z co "^") and z ne ""
> > then: n=n+"1";specval(n)=z;goto done
> >
> > Now z eq "xyz6789^rdwtest".
> >
> > if z eq "" or n eq "20", I stop. If not I just loop back and do it
> again.
> >
> > Once I am done this I then can write the loop to read specval array
> > into what ever I want.
> >
> > Hope this helps,
> >
> > Richard D. Williams
> >
> > On 1/15/2018 4:20 PM, scooter6--- via Filepro-list wrote:
> > >I have a pipe delimited file that I'm looking to import
> > >It does however contain 4-5 fields that have ^ in them which denotes
> there
> > >are multiple items of data in a single field....
> > >Is there a way to pull the specific field of an import and put it in an
> > >array to pair with the filed after it...
> > >
> > >For example, a field has abc1234^xyz6789 (so this field
> contains
> > >2 pieces of information
> > >The very next field has filename.pdf^filename2.pdf (so this field
> > >also contains 2 pieces of information)
> > >
> > >My filePro file has fields called set1, set1-file, set2, set2-file,
> > >etc.....
> > >I want to be able to assign abc1234 to the field called set1 and
> > >filename.pdf to set1-file; and assign xyz6789 to set2 and filename2.pdf
> to
> > >set2-file
> > >
> > >Is there a way to pull a field into an array and declare a character (in
> > >this case, the ^ ) as a sepator for the array....or is there even a
> simpler
> > >way to do this without doing a bunch of mid statements, etc?
> > >
> > >thanks
> > >
> > >Scott
> > >-------------- next part --------------
> > >An HTML attachment was scrubbed...
> > >URL: <http://mailman.celestial.com/pipermail/filepro-list/
> attachments/20180115/03f78196/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.
> > >http://www.avg.com
> > >
> > >
> >
> > _______________________________________________
> > Filepro-list mailing list
> > Filepro-list at lists.celestial.com
> > Subscribe/Unsubscribe/Subscription Changes
> > http://mailman.celestial.com/mailman/listinfo/filepro-list
>
> --
> Audio panton, cogito singularis.
> _______________________________________________
> Filepro-list mailing list
> Filepro-list at lists.celestial.com
> Subscribe/Unsubscribe/Subscription Changes
> http://mailman.celestial.com/mailman/listinfo/filepro-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.celestial.com/pipermail/filepro-list/attachments/20180118/83c714eb/attachment.html>
More information about the Filepro-list
mailing list