array help needed

John Esak john at valar.com
Tue Jan 27 17:47:42 PST 2009


I wrote an infrastructure piece for my  EDI suite that parses lines by field
(using field_separator and record_separator) in such a way that I could
refer to any field along the line just as you might refer to a field in an
import or export.  I used readline and writeline of course... Not
import/export. You have complete flexibility with the full processing set of
tools when you take control of the reading and writing of a file rather than
leaaving it upt to import/export.  These are valuable tools when you are in
a hurry, or the task is just that a simple import or export.  Otherwise, the
other route seems preferable.

John

> -----Original Message-----
> From: filepro-list-bounces+john=valar.com at lists.celestial.com 
> [mailto:filepro-list-bounces+john=valar.com at lists.celestial.co
m] On Behalf Of Walter Vaughan
> Sent: Tuesday, January 27, 2009 4:39 PM
> To: filePro
> Subject: array help needed
> 
> We've been using the IMPORT facility to read in a text file that
> has 3 different types of records
> 
> I'd really like to change that so we read in something from
> the environment, and I was hoping arrays could be used,
> something along the lines of how the import fields are used.
> 
> For example if the input (tildes between fields) is
> "1~~AB~12~A~" (actually nearly a hundred fields),
> Is there some reasonable bit of code that would emulate
> IMPORT stuf (xx) f=~ r=\n
> that would look at stuf(4) and show it as "12" using arrays?
> 
> I want to import via @pm fields and get the same functionality
> so we don't have to rewrite a ton of fragile code.
> 
> --
> Walter
> _______________________________________________
> Filepro-list mailing list
> Filepro-list at lists.celestial.com
> http://mailman.celestial.com/mailman/listinfo/filepro-list
> 



More information about the Filepro-list mailing list