Import question

Richard D. Williams richard at appgrp.net
Thu Mar 11 05:58:02 PST 2021


A good way to handle this might be to chunk away at it;

dim codes(500)

string: 100.00^21.20^50.00^62.50^33.12
z="100.00^21.20^50.00^62.50^33.12"

getcodes if  : not(z co "^")
          then: return
          if  :
          then: p(5,.0)=instr(z,"^")
          if  : p ge "1"
          then: n=n+"1";code(n)=""{mid(z,"1",n-"1");mid(z,"1",n)="";z=""{z
          if  : n eq "500"
          then: return
          if  :
          then: goto getcodes

Richard

On 3/10/2021 4:14 PM, scooter6 at gmail.com wrote:
> Actually, my thought was skipping this field in the main import, then 
> running a 2nd import to a file called 'charges' lets say, then when 
> the open the record in the main file, one of the screens will have a 
> browse lookup window to the charges file - just wondered if there was 
> a way I hadn't thought of yet
>
>
>
> On Wed, Mar 10, 2021 at 5:06 PM Richard D. Williams via Filepro-list 
> <filepro-list at lists.celestial.com 
> <mailto:filepro-list at lists.celestial.com>> wrote:
>
>     Sorry. Please ignore my reply.
>
>     I did not see the that you had already thought of the export idea.
>
>     Richard D. Williams
>
>
>     On 3/10/2021 3:54 PM, Richard D. Williams via Filepro-list wrote:
>     > You could treat this line of data as a separate import.
>     >
>     > Export this line to a different file. Then import it back using
>     the ^
>     > as a field separator.
>     > Now you can treat them individually and it doesn't matter how many
>     > they send.
>     >
>     > Just a thought.
>     >
>     > Richard D. Williams
>     >
>     >
>     > On 3/10/2021 2:57 PM, scooter6--- via Filepro-list wrote:
>     >> So I have an import routine that imports a csv of some parsed XML
>     >> It's pretty detailed and I use a ton of variables
>     >> My question is, let's suppose I have a field that has over a
>     100 fields
>     >> within it, separated by a ^
>     >>
>     >> For example, if I'm importing a huge list of amounts, the field I
>     >> need to
>     >> breakdown can have 100 or more that are
>     >>
>     >> 100.00^21.20^50.00^62.50^33.12..........etc
>     >>
>     >> Is there an easier way than using strtok to parse large fields
>     like
>     >> this?
>     >>
>     >> I originally didn't think there would ever be more than 40, but
>     some
>     >> of my
>     >> brilliant clients who don't always know what they're doing in our
>     >> integrated partner's software, have sometimes managed to have
>     100 or
>     >> more -
>     >> so trying to see if there is a better/simpler way to do this
>     >>
>     >> Otherwise, I'm going to spit it off into its own file and create a
>     >> lookup
>     >> screen on the records - which I can do, but didn't really want
>     to go
>     >> that
>     >> route if not necessary
>     >>
>     >> I currently parse the incoming XML with xsltproc and create a csv
>     >> file and
>     >> that all works well - I'm trying to come up with possibly a better
>     >> way to
>     >> get that into my fp databases
>     >>
>     >> thanks for any input
>     >>
>     >> Scott
>     >> PDM
>     >> -------------- next part --------------
>     >> An HTML attachment was scrubbed...
>     >> URL:
>     >>
>     <http://mailman.celestial.com/pipermail/filepro-list/attachments/20210310/7355e9f7/attachment.html
>     <http://mailman.celestial.com/pipermail/filepro-list/attachments/20210310/7355e9f7/attachment.html>>
>     >> _______________________________________________
>     >> Filepro-list mailing list
>     >> Filepro-list at lists.celestial.com
>     <mailto:Filepro-list at lists.celestial.com>
>     >> Subscribe/Unsubscribe/Subscription Changes
>     >> http://mailman.celestial.com/mailman/listinfo/filepro-list
>     <http://mailman.celestial.com/mailman/listinfo/filepro-list>
>     >>
>     >
>     > _______________________________________________
>     > Filepro-list mailing list
>     > Filepro-list at lists.celestial.com
>     <mailto:Filepro-list at lists.celestial.com>
>     > Subscribe/Unsubscribe/Subscription Changes
>     > http://mailman.celestial.com/mailman/listinfo/filepro-list
>     <http://mailman.celestial.com/mailman/listinfo/filepro-list>
>     >
>
>
>     -- 
>     This email has been checked for viruses by AVG.
>     https://www.avg.com <https://www.avg.com>
>
>     _______________________________________________
>     Filepro-list mailing list
>     Filepro-list at lists.celestial.com
>     <mailto:Filepro-list at lists.celestial.com>
>     Subscribe/Unsubscribe/Subscription Changes
>     http://mailman.celestial.com/mailman/listinfo/filepro-list
>     <http://mailman.celestial.com/mailman/listinfo/filepro-list>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.celestial.com/pipermail/filepro-list/attachments/20210311/250bd1e7/attachment.html>


More information about the Filepro-list mailing list