[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: column variable usage
hi,
i am not sure to understand what is your problem but this a sample sqr
code that create a file which is the result of merge of different files.
This program do not care about any CR/LF in the file.
**********************************************************
open 'c:\clients\lyon\fichiers\resultat.lis' as 1 for-writing
record=10000:fixed
write 1 from ''
begin-select
NomFicMat
NomFicGard
let $fichier = 'c:\clients\lyon\fictest\'||&nomficmat
open $fichier as 2 for-reading record=10000:fixed
read 2 into $ligne:10000
close 2
let #lg = length($ligne)-2
let $ligne=substr($ligne,1,#lg)
write 1 from $ligne
if &NomFicGard <> ''
let $fichier = 'c:\clients\lyon\fictest\'||&nomficgard
open $fichier as 2 for-reading record=10000:fixed
read 2 into $ligne:10000
close 2
! supress the cr/lf from the file 2 because write add one
let #lg = length($ligne)-2
let $ligne=substr($ligne,1,#lg)
end-if
from TB_Index
order by CodEtab, CatPers
end-select
**************************************************************
hope this example will help you to accomplish your developpement
franck,
the dragon wrote:
>
> Hi gurus,
>
> psoft 7.5x
> oracle 8.x
> solaris/NT
> sqr 4.3x
>
> We are replacing a unix script with an sqr which creates e-mail eft
> notifications of direct deposits based upon voucher records.
>
> I have the majority of the code complete. The problem I have encountered is
> when I have to create the flat file which will be the 'input' for the text
> of the email; I am unable to use the carriage return/line feed to line up
> multiple vouchers because the write command interprets that as a carriage
> return/line feed. is there any way around this????
>
> BTW, if this is any easy one, sorry in advance. I am brain dead... watched
> the midnight showing of "Star Wars: The Phantom Menace" this morning......
> :-)
>
> clark
>
> _______________________________________________________________
> Get Free Email and Do More On The Web. Visit http://www.msn.com