header records on an export file

Rick Mitchell fpuser at mitchbg.com
Tue Sep 21 07:58:17 PDT 2004


I have to create a file to submit to a company to request data back from it.

There is a file called Dlist that has the company code and 3 start and end
dates per record.  The start and end dates denote different plan types of
Flexible Spending Coverage.

I have a process that reads through the records as the first stop of an
output process.

It counts the number of records that will be sent with date qualification.
 If today is 9/21/2004 I am not going to send a request for a program that
ran between 9/1/2003 and 8/31/2004.

I come up with the number of subsequent lines in the export record file and
add 1 for the header record.

I have to put my identifier in the first field, # of records in the second
field, password in the third field. 

The next three fields are either named templates, or left blank to be the
default.

This file is field delimited with commas.

The rest of the processing creates the records with the fields required to
extract the data.

A small sample is here:

ia,8,password,,,,,,,,,,,,,,
il,FEBCO,FEB1002,EN,,HRA,20040101,20041231,2,1,99,1,,20031126,20040131,2,1
il,FEBCO,FEB1012,EN,,FSA,20030801,20031231,2,1,99,1,,20031126,20040131,2,1
il,FEBCO,FEB1075,EN,,FSA,20040101,20041231,2,1,99,1,,20031126,20040131,2,1
il,FEBCO,FEB1077,EN,,FSA,20040101,20041231,2,1,99,1,,20031126,20040131,2,1
il,FEBCO,FEB1077,EN,,FRA,20040101,20041231,2,1,99,1,,20031126,20040131,2,1
il,FEBCO,FEB1077,EN,,HRA,20040101,20041231,2,1,99,1,,20031126,20040131,2,1
il,FEBCO,FEB1077,EN,,FSA,20040101,20041231,2,1,99,1,,20031126,20040131,2,1


The problem is that the first line is padded with ","s to match the max
number of fields in the records, (17) as filepro will.

The system I send this file to sees more than 3 ","s after the password and
rejects the file.

I tried opening a second file with the same name but a different alias and
got sharing violations unless I closed the first one and if I did, it wiped
out the header record.

It's bad enough that I have to submit unique filenames always (but I have
dealt with that) but DO NOT WANT my users to have to edit the file to
remove the commas unless that is the only way to do it. 

Any Ideas?

running 4.8n on Dos/Novell



More information about the Filepro-list mailing list