header records on an export file

Jeff Harrison jeffaharrison at yahoo.com
Tue Sep 21 14:31:12 PDT 2004


--- Rick Mitchell <fpuser at mitchbg.com> wrote:

> I have modified my system:
> 
> It does the count, get's the filename and opens the
> export record header
> subroutine
> 
> export day1=(fd) R=^j f=\,
> 
> day(1)="IA", etc.
> 
> Close day1
> 
> Then as it processes calls another subroutine
> 
> export day=(fd) r=^j f:\, -a
> return
> 
> then the export works
> 
> day(1)="IL";day(2)="FEBCO"
> day(3)=2; day(3)=4; day(5)=5
> 
> etc.
> 
> When I close both records after writing, i get
> failures and it dumps out of
> processing after trying to write the first data
> record.
> 
> if i close only the header i get error on first data
> record.  I press F ad
> it goes on and writes the file correctly.   Maybe i
> need a delay before
> reopening the file for append?
> 
> 

I think the problem is that you have two different
"export" statements in your processing.  I don't think
that is allowed.  Try making it one statement and do
your assignments in subroutines - one subroutine for
the header and one for the detail.  You will need to
use export ascii with the -a flag, so you'll probably
want to initialize your file at the beginning of this
process with a separate command - jsfile would be a
pretty simple way to do this.

jsfile :cr "/tmp/filename"
jsfile :cr-

Good Luck.

Jeff Harrison
jeffaharrison at yahoo.com

---------------------------------------------------------
Author of JHImport and JHEXPORT.  The fastest and
easiest
way to create code for filePro Imports and
Exports.
---------------------------------------------------------



		
__________________________________
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail


More information about the Filepro-list mailing list