OOPS Someone else suggested the TXT option.
But consider the PDF option as you may find you like it better.

Dennis McGrath

________________________________
From: [email protected] [mailto:[email protected]] On Behalf Of Dennis McGrath
Sent: Wednesday, May 26, 2010 2:11 PM
To: RBASE-L Mailing List
Subject: [RBASE-L] - RE: Output <filespec> help

Don,

In Windows, the equivalent to a text file is a PDF.
Lots of options, tools in RBASE to automate this.
Outputting to TEXT is a lot of work in Windows, unlike DOS.

Dennis McGrath

________________________________
From: [email protected] [mailto:[email protected]] On Behalf Of 
[email protected]
Sent: Wednesday, May 26, 2010 11:13 AM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Output <filespec> help


We have an application that I am converting from version 2.11 to the newest 7.6 
(just updated today) that I can't get to work the way it does in 2.11.



The application generates and prints a report called Statement.  That part 
works ok.  What I can't figure out is how to get the report to print to a .txt 
file like I do in 2.11.  We use this .txt file to review before printing and as 
an archive of each statement run, so we really would like to have this working 
like in 2.11.



I've checked the help and it seems that the following would get what I am 
looking for:



output statement.txt append



However, when I try this I still get the on screen preview and when all is 
done, I get an empty statement.txt file.



I have tried the output statements in several places within the code, before 
the while, after the while, etc. all give the same result.  I imagine there is 
probably a simple solution, but I can't seem to figure it out on my own.



Thanks in advance for any help.



David Fowler



Here is the portion of the code:



CREATE TEMPORARY TABLE billit (billto INT)
      INSERT INTO billit SELECT DISTINCT(acct1) FROM job WHERE pyby = 'BI'
      DROP CURSOR s1
      DECLARE s1 CURSOR FOR SELECT billto FROM billit
      OPEN s1
      FETCH s1 INTO bill
        WHILE SQLCODE <> 100 THEN
        SET VAR credbal=SUM payamt FROM payments WHERE billtonum=.bill AND +
        paymethod='op'
   **output statement.txt append
        print statement where acct1=.bill and pyby='BI'
   **output screen
        FETCH s1 INTO bill
        ENDWHILE



Here is the help text that I'm basing my thoughts on:



filespec
Indicates the output device. Specify a file name, with or without an extension. 
You can also specify a drive and/or path.

APPEND
Appends data to the end of an existing file without overwriting the file. If 
you specify APPEND when the specified file does not exist, R:BASE creates the 
file with that name.

Reply via email to