Re: Can "import ascii" be used with multiple file handles on the same import file?
mschw@athenet.net
mschw at athenet.net
Fri May 31 09:55:58 PDT 2019
Hmmm... Actually that makes a LOT of sense! I can make a backup copy immediately when I FTP the data file in!
Great idea!
Thanks!
Sent from my HTC
----- Reply message -----
From: "Rod Caddy" <rcaddy at pro-set.com>
To: <mschw at athenet.net>
Cc: "Michael Schwartz (PC Support & Services) via Filepro-list" <filepro-list at lists.celestial.com>, "Michael Schwartz (PC Support & Services)" <filepromike at gmail.com>
Subject: Can "import ascii" be used with multiple file handles on the same import file?
Date: Fri, May 31, 2019 11:48 AM
Could you make a second copy of the file and read it separately only opening it based upon your first read? This may not be feasible nor make sense in what you are doing.
Rod Caddy
817-793-4148 Cell
1-877-657-1480
Sent from BlueMail
On May 31, 2019, 10:27 AM, at 10:27 AM, "Michael Schwartz (PC Support & Services) via Filepro-list" <filepro-list at lists.celestial.com> wrote:
>On 5/31/2019 8:08 AM, Michael Schwartz (PC Support & Services) via
>Filepro-list wrote:
>
>> filePro version 5.8.03.12D6 running on Centos 6
>>
>> Before I spend a lot of time writing code to test this, do any
>of
>you
>> know if I can open the same file with "import ascii" using more than
>one
>> file handle in the same processing table? Something like:
>>
>> Import ascii NewOrder=(FF{"") r=\n f=|
>>
>> Import ascii PreCheck=(FF{"") r=\n f=|
>>
>> FF is a huge text file with lines containing order numbers and
>part
>> numbers and I need to "read ahead" through the lines in the file one
>order
>> at a time to see if the order contains certain part numbers. If
>these
>> certain part numbers are present in that order, I have to do some
>different
>> things when I start reading and posting the data lines using the
>"NewOrder"
>> file handle.
>>
>> I understand that "getnext" and "getprev" don't work with
>"import
>> ascii". If they did then I wouldn't need to open the file twice.
>>
>> If nobody gives me a definitive answer, I will write some test
>code
>and
>> let you all know how it works out.
>>
>> Thanks!
>> Mike Schwartz
>>
>----- ----- ---------------------------------
>-- Only if you close the first handle before you open the second.
>
>-- This file will be open and locked, so the second import will fail as
>if
>-- you reach the end of the file.
>
>-- Richard D. Williams
>> _______________________________________________
>
> Ok, thanks! I guess I will have to do something like opening import
>file, reading it to the end, putting the PO # of those orders that have
>the
>odd parts into a dim'ed array, then closing the import file and
>reopening it
>to do the posting to the filePro order database, referencing the dimmed
>array as necessary to handle the posting.
>
>Mike
>
>_______________________________________________
>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/20190531/6c624021/attachment.html>
More information about the Filepro-list
mailing list