Filepro-list Digest, Vol 135, Issue 14

Brian K. White brian at aljex.com
Wed Apr 15 10:27:54 PDT 2015


On 4/14/2015 12:40 PM, Lawrence A wrote:
> HELP

They did.

Several possible answers and approaches have been provided. I can tell 
you since I do those kinds of exports all the time that those 
suggestions were correct. Specifically, ensure the last last field 
always contains something on every record, or, use something other than 
the export command to write the file.

If you have a more specific question, ask it.

If you want someone to do the job for you, I'm sure someone will be 
happy to take credit card and login info and do it in possibly as little 
as 1 hour.

-- 
bkw


>
>> From: filepro-list-request at lists.celestial.com
>> Subject: Filepro-list Digest, Vol 135, Issue 14
>> To: filepro-list at lists.celestial.com
>> Date: Mon, 13 Apr 2015 02:17:16 -0700
>>
>> Send Filepro-list mailing list submissions to
>> 	filepro-list at lists.celestial.com
>>
>> To subscribe or unsubscribe via the World Wide Web, visit
>> 	http://mailman.celestial.com/mailman/listinfo/filepro-list
>> or, via email, send a message with subject or body 'help' to
>> 	filepro-list-request at lists.celestial.com
>>
>> You can reach the person managing the list at
>> 	filepro-list-owner at lists.celestial.com
>>
>> When replying, please edit your Subject line so it is more specific
>> than "Re: Contents of Filepro-list digest..."
>>
>>
>> Today's Topics:
>>
>>     1. RE: Dropped Fields in Export (Mike Schwartz)
>>     2. RE: Dropped Fields in Export (Stanley - stanlyn.com)
>>     3. RE: Dropped Fields in Export (Mike Schwartz)
>>     4. Re: Dropped Fields in Export (Bruce Easton)
>>
>>
>> ----------------------------------------------------------------------
>>
>> Message: 1
>> Date: Sun, 12 Apr 2015 16:21:42 -0500
>> From: "Mike Schwartz" <mschw at athenet.net>
>> To: "'Stanley - stanlyn.com'" <stanley at stanlyn.com>,
>> 	<filepro-list at lists.celestial.com>
>> Subject: RE: Dropped Fields in Export
>> Message-ID: <036f01d07566$ac398870$04ac9950$@athenet.net>
>> Content-Type: text/plain;	charset="us-ascii"
>>
>>> Using ScO Unix and filepro 5.0.14.
>>>
>>> FilePro's export is dropping fields when the field(s) is empty for all
>> records.  Is
>>> this normal?  What would cause this behavior?  What should I do?
>>>
>>> Thanks, Stanley
>>>
>>> The code below creates a file with 64 delimited fields instead of 73.  It
>> starts
>> [snip]
>>
>>       Yes, as I recall you are correct.  If the last fields of a record are
>> blank, the rest of the .CSV record is truncated.   Usually this doesn't
>> cause any problems, but I recall having to write an export to dump a CSV
>> file to Peachtree Accounting a few years ago after I discovered the
>> Peachtree import  wasn't working because the last few "empty" fields weren't
>> on the filePro exported record.
>>
>>       I solved it in that case by adding an "X" or some such thing in the
>> last field to be imported.  This caused all the rest of the missing fields
>> to show up.  As I recall, the last field was a comment field or some such
>> thing so that was a quick fix.
>>
>>       When writing some exports for an insurance company where the last
>> fields were missing, I think I used the"'-X" option on the filePro export
>> command, but then I had to insert the quotes and commas to make the record
>> look like a comma delimited file.
>>
>>       If neither of these options helps you, tomorrow morning (Monday) I will
>> look back on the code I wrote and let you know how I fixed it.
>>
>> Mike Schwartz
>>
>>
>>
>>
>> ------------------------------
>>
>> Message: 2
>> Date: Sun, 12 Apr 2015 21:04:47 -0400
>> From: "Stanley - stanlyn.com" <stanley at stanlyn.com>
>> To: <mschw at athenet.net>
>> Cc: filepro-list at lists.celestial.com
>> Subject: RE: Dropped Fields in Export
>> Message-ID:
>> 	<!&!AAAAAAAAAAAYAAAAAAAAAPR6Tw5LnS5CoVg+IvMfAXDCgAAAEAAAAOCYqWVmkLJNnpd1ASahQmMBAAAAAA==@stanlyn.com>
>> 	
>> Content-Type: text/plain;	charset="us-ascii"
>>
>> Hi Mike,
>>
>> Currently I do the export in record number order.  So wonder if I add a
>> string to record #1's empty fields like "EMPTY" and remove it later by
>> replacing "EMPTY" with "".
>>
>> Do you know if the output export file's structure is defined on what the
>> actually data looks like from the first record it processes, and holds true
>> for all subsequent records?  My documents doesn't talk about any of this...
>>
>> Thanks, Stanley
>>
>>
>>
>>
>>
>> -----Original Message-----
>> From: Mike Schwartz [mailto:mschw at athenet.net]
>> Sent: Sunday, April 12, 2015 5:22 PM
>> To: 'Stanley - stanlyn.com'; filepro-list at lists.celestial.com
>> Subject: RE: Dropped Fields in Export
>>
>>> Using ScO Unix and filepro 5.0.14.
>>>
>>> FilePro's export is dropping fields when the field(s) is empty for all
>> records.  Is
>>> this normal?  What would cause this behavior?  What should I do?
>>>
>>> Thanks, Stanley
>>>
>>> The code below creates a file with 64 delimited fields instead of 73.
>>> It
>> starts
>> [snip]
>>
>>       Yes, as I recall you are correct.  If the last fields of a record are
>> blank, the rest of the .CSV record is truncated.   Usually this doesn't
>> cause any problems, but I recall having to write an export to dump a CSV
>> file to Peachtree Accounting a few years ago after I discovered the
>> Peachtree import  wasn't working because the last few "empty" fields weren't
>> on the filePro exported record.
>>
>>       I solved it in that case by adding an "X" or some such thing in the
>> last field to be imported.  This caused all the rest of the missing fields
>> to show up.  As I recall, the last field was a comment field or some such
>> thing so that was a quick fix.
>>
>>       When writing some exports for an insurance company where the last
>> fields were missing, I think I used the"'-X" option on the filePro export
>> command, but then I had to insert the quotes and commas to make the record
>> look like a comma delimited file.
>>
>>       If neither of these options helps you, tomorrow morning (Monday) I will
>> look back on the code I wrote and let you know how I fixed it.
>>
>> Mike Schwartz
>>
>>
>>
>>
>>
>> ------------------------------
>>
>> Message: 3
>> Date: Sun, 12 Apr 2015 21:51:56 -0500
>> From: "Mike Schwartz" <mschw at athenet.net>
>> To: "'Stanley - stanlyn.com'" <stanley at stanlyn.com>
>> Cc: filepro-list at lists.celestial.com
>> Subject: RE: Dropped Fields in Export
>> Message-ID: <03a501d07594$ce0d92b0$6a28b810$@athenet.net>
>> Content-Type: text/plain;	charset="us-ascii"
>>
>>> Currently I do the export in record number order.  So wonder if I add a
>> string
>>> to record #1's empty fields like "EMPTY" and remove it later by replacing
>>> "EMPTY" with "".
>>>
>>> Do you know if the output export file's structure is defined on what the
>>> actually data looks like from the first record it processes, and holds
>> true for all
>>> subsequent records?  My documents doesn't talk about any of this...
>>>
>>> Thanks, Stanley
>>
>>       As I recall, each record gets truncated if the last fields in that
>> record are empty.  So doing putting "EMPTY" only at the end of record #1
>> won't help.
>>
>>       AFAIK, this is a problem only with filePro's EXPORT command.  If you
>> create the file any other way, I don't think you will have this problem.
>> For example, see functions like:  Writeline(), CREATE(), OPEN(), READ(),
>> READLINE(), WRITE().
>>
>>       Stuart Werner's filepro training books (Developer reference series)
>> have good sections describing how to create output files using several
>> different methods.
>>
>> Mike
>>
>>
>>
>>
>> ------------------------------
>>
>> Message: 4
>> Date: Mon, 13 Apr 2015 00:06:48 -0400
>> From: Bruce Easton <bruce at stn.com>
>> To: Filepro-list at lists.celestial.com
>> Subject: Re: Dropped Fields in Export
>> Message-ID: <552B40D8.3060103 at stn.com>
>> Content-Type: text/plain; charset=windows-1252; format=flowed
>>
>> I believe one way to handle this situation is to, for the first record
>> processed only, have it export first a heading row where every column is
>> populated (for example below I use a "~" char).  To produce the heading
>> row, you could use  something like:
>>
>> xagain If:
>> Then: export ascii data = . . . . . .
>> ------- - - - - - - - - - - -
>> If: dh eq ""     '(start special heading prc)
>> Then: data(1)="~"; data(2)="~"; data(3)="~"... etc
>> ------- - - - - - - - - - - -
>> If: dh eq ""
>> Then: data(4) = "~"; ........ data([highest col#])="~"
>> ------- - - - - - - - - - - -
>> If: dh eq ""
>> Then: dh(1,*,g)="Y"; goto xagain 'to signal end of heading prc
>> ------- - - - - - - - - - - -
>>          '**NOTE: dh is global**
>> ------- - - - - - - - - - - -
>> If:                 '(start normal exporting for all recs)
>> Then: data(1)=f&gg&....
>> .
>> .
>> .
>>
>> All the lines above starting with "If: dh eq """ would only export just
>> ahead of the normal export of that first record being processsed.
>>
>> Of course, once run, you then need to remove the first row from the
>> exported file.
>> Since you're on unix, you could use something like this outside of
>> filepro processing to automate removal of first row:
>>
>> sed '1d' file.txt > tmpfile; mv tmpfile file.txt
>>
>> Bruce
>>
>>
>>
>> On 4/12/15 10:51 PM, Mike Schwartz wrote:
>>>> Currently I do the export in record number order.  So wonder if I add a
>>> string
>>>> to record #1's empty fields like "EMPTY" and remove it later by replacing
>>>> "EMPTY" with "".
>>>>
>>>> Do you know if the output export file's structure is defined on what the
>>>> actually data looks like from the first record it processes, and holds
>>> true for all
>>>> subsequent records?  My documents doesn't talk about any of this...
>>>>
>>>> Thanks, Stanley
>>>        As I recall, each record gets truncated if the last fields in that
>>> record are empty.  So doing putting "EMPTY" only at the end of record #1
>>> won't help.
>>>
>>>        AFAIK, this is a problem only with filePro's EXPORT command.  If you
>>> create the file any other way, I don't think you will have this problem.
>>> For example, see functions like:  Writeline(), CREATE(), OPEN(), READ(),
>>> READLINE(), WRITE().
>>>
>>>        Stuart Werner's filepro training books (Developer reference series)
>>> have good sections describing how to create output files using several
>>> different methods.
>>>
>>> Mike
>>>
>>>
>>> _______________________________________________
>>> Filepro-list mailing list
>>> Filepro-list at lists.celestial.com
>>> Subscribe/Unsubscribe/Subscription Changes
>>> http://mailman.celestial.com/mailman/listinfo/filepro-list
>>>
>>
>>
>>
>>
>> ------------------------------
>>
>> Subject: Digest Footer
>>
>> _______________________________________________
>> Filepro-list mailing list
>> Filepro-list at lists.celestial.com
>> http://mailman.celestial.com/mailman/listinfo/filepro-list
>>
>>
>> ------------------------------
>>
>> End of Filepro-list Digest, Vol 135, Issue 14
>> *********************************************
>   		 	   		
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://mailman.celestial.com/pipermail/filepro-list/attachments/20150414/d52305b3/attachment.html>
> _______________________________________________
> Filepro-list mailing list
> Filepro-list at lists.celestial.com
> Subscribe/Unsubscribe/Subscription Changes
> http://mailman.celestial.com/mailman/listinfo/filepro-list
>



More information about the Filepro-list mailing list