[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: Line splits into two lines
You should not use print to generate text files. This limits your ability
to control the print size and file name, as well as preventing you from
generating an error report or any kind of listing, which I always recommend
when generating interface files.
Try this:
open 'c:\temp\voucher.txt' as 1 for-writing record=250
Inside your select statement:
move &ROW_ID to $ROWID
move &GROSS_AMT to $GROSS 09999999999.99
(move all your database columns to Text fields, especially the
numeric ones,
and format the numeric ones)
write 1 from
($ROWID:3,
<etc>
)
You'll have much better luck with this. Note that the file name can be a
variable if you want to change it by prompting the user.
At 08:17 AM 2/5/99 -0500, you wrote:
>Hi guys,
>i am new to sqr programming, i am facing prblem generating text file.
>Let me explain it in detail.
>
>I want to generate file for EDI upload in People soft and length of the
>lines are too big. When i generate the file, a line splits in to two
>line.
>
>This is the code..
>
>
>begin-setup
> declare-layout default
> paper-size=(150in,150in) left-margin=0 formfeed=NO top-margin=0
>bottom-margin=0 right-margin=0
> end-declare
>end-setup
>
>!-------------------------------------------------------------------!
>! Begin-Report !
>!-------------------------------------------------------------------!
>Begin-Report
> do Select_Voucher_Data
>end-Report
>
>!-------------------------------------------------------------------!
>! Select Voucher Report !
>!-------------------------------------------------------------------!
>
>begin-procedure Select_Voucher_Data
>
>begin-select
>ROW_ID (,1)
>BUSINESS_UNIT (,4)
>VOUCHER_ID (,9)
>INVOICE_ID (,17)
>INVOICE_DT (,33)
>VENDOR_ID (,48)
>OPRID (,80)
>VCHR_TTL_LINES (,88)
>GROSS_AMT (,122)
>DSCNT_AMT (,139)
>FREIGHT_AMT (,189)
>ENTERED_DT (,231)
> POSITION (+1)
>FROM TVCHR
>ORDER BY BUSINESS_UNIT, VOUCHER_ID, ROW_ID,VCHR_TTL_LINES
>end-select
>end-procedure ! Select_Vendor_Data
>
>Thanks for any help.
>
>Manoj
>
>______________________________________________________
>Get Your Private, Free Email at http://www.hotmail.com