Export line feed
Kenneth Brody
kenbrody at bestweb.net
Wed Oct 18 06:14:27 PDT 2006
Quoting George (Tue, 17 Oct 2006 18:42:11 -0700):
> I thought I understood the syntax on adding a line feed from some
> previous posts, however I'm having a problem getting each record
> processed to add a line feed CHR("10") to the last field. Note the
> last field is & with a chr("10"), but the exported file does not
> reflect spaces between lines.
>
> What am I missing here?
>
> ::fn="/u/tmp/foo/"{"U"{@tm:
> :'Export ASCII, comma delimited; 1 line/record:export ascii exp=(fn)
> r=\n f=, -x:
> :'start with first field =barcode:exp(1)=1:
> :'Day of the week served mtwhfsu:exp(2)=25:
> :'Route number:oa=mid(2,"3","2"); exp(3)=oa:
> :'Stop Sequence:exp(4)=26:
> :'account number sending 8 character account number:exp(5)=2:
> :'type of garment from item number:exp(6)=4:
> :'Identity or wearer of garment name:exp(7)=3:
> :'Final routing/destination.:exp(8)="":
> :'27 ne "" 'auto routing code:exp(9)=27:
> :'27 eq "":'exp(9)="A":
> :28 ne "Y" 'Posting record to Softrol routing machine.:28="Y":
> :28 eq "":28="," & chr("10"):
> :28 ne "":28=28 & chr("10"):
> ::end:
First, although you will put a chr("10") at the end of field 28,
you don't export field 28.
Second, are you sure you really want the LF in field 28 itself,
rather than only in the export?
Finally, the test -- 28 eq "" -- on the next-to-last line can
never be true, as the previous line will for field 28 to always
be equal to "Y".
--
KenBrody at BestWeb dot net spamtrap: <g8ymh8uf001 at sneakemail.com>
http://www.hvcomputer.com
http://www.fileProPlus.com
More information about the Filepro-list
mailing list