USE CONTINE with your WRITE command to give you control

set var vCRLF TEXT = (CHAR(13) + CHAR(10))

set var vFirst = 'TRUE'
while .....
    fetch....
   if sqlcode = 100 then
      break
  endif
if vFirst = 'FALSE' then - add crlf to previous line
    write . vcrlf continue
  else
   set var vFirst = 'FALSE'
  endif

  write something continue

endw




Dennis McGrath
Software Developer
QMI Security Solutions
1661 Glenlake Ave
Itasca IL 60143
630-980-8461
[email protected]
From: [email protected] [mailto:[email protected]] On Behalf Of Fitts, David A.
Sent: Thursday, January 31, 2013 2:54 PM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Removing the last line feed

Greetings everyone,

I have a while loop that creates a text file. Each row processed results in a 
single line in the text file.

I need some way to have the text file end at the end of the last line of data 
and not on the line after the last line of data.

I have tried to add a backspace (char(8)) to the text file before issuing the 
out screen command but that has not helped.

Any suggestions would be appreciated.

Dave Fitts



Reply via email to