Inserting Newlines in Export

Stanley - stanlyn-com stanley at stanlyn.com
Thu Jul 7 01:20:28 PDT 2011


How do I insert a newline into an Export stream?  I've tried nl=\n and that
produces an error, while nl="\n" produces a literal insertion.

I'm also getting an array index error after about 25000 records.  Can anyone
see what might be producing out of range array error?

 

Thanks, Stanley

 

Next is a line from the output that shows a line that needs to have a
carriage line inserted.

 

1134~                ~ 1.0000~EA  ~Citizens Bank           ~6055-475~
8.50~

1135~                ~ 1.0000~EA  ~International Calend    ~6055-475~
18.50~

1136~                ~ 1.0000~EA  ~Freight                 ~6055-475~
8.50~

1137~                ~ 1.0000~EA  ~Derrick Parts           ~6090-002~
381.10~\n  1137~S&H             ~ 1.0000~EA  ~shipping
~6055-475~   24.75~

1138~                ~ 1.0000~EA  ~Nozzle                  ~6090-002~
20.00~

1139~                ~ 1.0000~EA  ~Injector                ~6090-002~
16.80~

1140~                ~ 1.0000~EA  ~Paint                   ~6090-002~
.00~

 

Here is the code.

 

:':zz=zz+"1":

:zz ge "10":' goto finish:

::pp="SDTSI":

:@qu eq "_sla":pp="SLA":

::' debug on:

::dim arr01(6)90 ; ct="1" ; f="":

::dim arr02(6)98 ; cs="1":

::dim arr03(6)106 ; cu="1":

::nl="\n":

:ct eq "1":f=f & 89 & "~":

loop1:ct le "6":f=f & arr01(ct) & "~" ; ct=ct+"1" ; goto loop1:

:arr02(cs) eq "":goto loop3:

:cs eq "1":f=f & nl & 89 & "~":

loop2:cs le "6":f=f & arr02(cs) & "~" ; cs=cs+"1" ; goto loop2:

loop3:::

:arr03(cu) eq "":goto finish:

:cu eq "1":f=f & nl & 89 & "~":

:cu le "6":f=f & arr03(cu) & "~" ; cu=cu+"1" ; goto loop3:

finish::rr = "ap_det-"{ pp {"":

::export ascii data=(rr) r=\n:

::data(1)=f:

::write data:

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.celestial.com/pipermail/filepro-list/attachments/20110707/a3eedd04/attachment.html 


More information about the Filepro-list mailing list