[Fwd: Fixed Length Export with append (-X -A)]

J. Ryan Kelley ryan.kelley at trinitytransport.com
Mon Feb 19 10:08:46 PST 2007



-------- 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.

http://www.trinitytransport.com




-- 
J. Ryan Kelley
Business Technology
Trinity Transport, Inc.
(302)253-3900 ext. 3844

http://www.trinitytransport.com



More information about the Filepro-list mailing list