[Fwd: Fixed Length Export with append (-X -A)]
Bob Stockler
bob at trebor.iglou.com
Mon Feb 19 12:18:24 PST 2007
Bob Stockler wrote (on Mon, Feb 19, 2007 at 03:13:59PM -0500):
| J. Ryan Kelley wrote (on Mon, Feb 19, 2007 at 01:08:46PM -0500):
|
| | -------- Original Message --------
| | Subject: Fixed Length Export with append (-X -A)
| | Date: Mon, 19 Feb 2007 10:05:32 -0500
| | From: J. Ryan Kelley <ryan.kelley at trinitytransport.com>
| | To: fplist <filepro-list-bounces at lists.celestial.com>
| |
| | Good Morning,
| |
| | I'm trying to generate an export file to automate ACH deposits with our
| | bank. The process requires me to go through several dozen records, and
| | generate a fixed length output. Everything seems to work well as I
| | debug through the code and the file continuously gets longer without any
| | issues. Then, at the very end of the file I need to send the totals for
| | the transaction to ensure the file hasn't been corrupted. I do this in
| | @done processing (since there is no output format so @wgt didn't make
| | sense to use) by returning to my gosub that performs the export command
| | and trying to export more fields. This always results in the complete
| | overwriting of the file with simply the footer information. I've tried
| | to use the -X and -A flags in unison to get this to work in several
| | different fashions (-X -A, -A - X, -AX, -XA) and it seems that without
| | fail the first argument is accepted while the second is ignored. So if
| | i try something like -A -X the file is appended, but it is not exported
| | in fixed width, while using -X -A will export the file in fixed width
| | form but not append the data to the end of the file.
| |
| | I also tried to export to another file from the same processing table
| | figuring that I could just cat the files to each other outside of
| | processing, but filepro will not allow me to have multiple export
| | commands to different filenames for some reason. There has to be
| | something that I'm missing here to get both the Fixed width and the
| | append flag to work properly, I'm running on version 5.0.13R4 on Solaris.
| |
| | my gosub looks like this :
| |
| | exp
| | ~ If:
| | Then: export ascii nacha = /ptmp/nachamain r=\n -X -A
| | 24 ------- - - - - - - - - - - - - - - -
| | ~ If:
| | Then: return
| |
| | Thanks in advance for any input,
| |
| | --
| | J. Ryan Kelley
| | Business Technology
| | Trinity Transport, Inc.
| | (302)253-3900 ext. 3844
| |
| | http://www.trinitytransport.com
|
| The -X and -A flags to EXPORT are (or at least were in your
| version of filePro) mututally exclusive.
|
| The best advice I can give you is to use filePro File I/O,
| instead of EXPORT, to write your file.
|
| Bob
|
| --
| Bob Stockler +-+ bob at trebor.iglou.com +-+ http://members.iglou.com/trebor
I neglected to mention that filePro closes the export file before
doing the processing in the @done section. This was recently a
subject on this list, I believe. I alos believe it's been entered
as a bug to be fixed.
Bob
--
Bob Stockler +-+ bob at trebor.iglou.com +-+ http://members.iglou.com/trebor
More information about the Filepro-list
mailing list