Inserting Newlines in Export
Robert T. Repko (R Squared Consultants)
rtr at rsquared.com
Thu Jul 7 03:54:12 PDT 2011
Believe it or not at 7/7/2011 04:20 AM, Stanley - stanlyn-com said:
>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
>
>_______________________________________________
>Filepro-list mailing list
>Filepro-list at lists.celestial.com
>Subscribe/Unsubscribe/Subscription Changes
>http://mailman.celestial.com/mailman/listinfo/filepro-list
To include a newline to an exported line append a chr("10") to the
end. Below is a line in my export routine that adds a newline to an
exported line of data. I first load the variable aa with the data I
want exported and append chr("10") to the end.
aa=1&2&3&4&5&6&7&8&9&10&11&12&13
vip(1)=aa{chr("10")
***************************
* Robert T. Repko *
* R Squared Consultants *
* 4 Juniper Ave. *
* Easton, PA 18045 *
* (610) 360-1117 (mobile) *
* (610) 253-0725 (fax) *
***************************
More information about the Filepro-list
mailing list