× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi,
 
Long story:
I have written a RPG service program that allows you to generate an XML
document from a document template and SQL prepared statements. I am in the
process of writing the docs for this and I am putting together some example
programs and document templates to explain how to generate XML using the
document template, queries, and sub-queries, etc. Now, for the purpose of
example, I am using printf to display the resulting XML on the console. The
data is being displayed, but the console closes as soon as my last string is
printed to it. Thus, the screen fills with XML and then the console closes. 
 
Short story:
How do I keep the console open after the data is displayed? I assume I can
use something like getchar(c) which (I hope) will wait for input from the
keyboard. But what I really need to know is: What is causing the console to
close (or how can I control when it closes)? I have other RPG programs which
write only a couple of lines to standard output (each terminated with a
X'25'), and the console does not close - not until I press Enter. Is the
console closing because this data is more than a page long, or because it
has embedded CRLF data in it? My knowledge (as is evident) is a bit thin in
these areas and my C programming book is a bit thin on consoles and a bit
thick on files. Got to say though - all great stuff. I shouldn't enjoy my
work, but sometimes you just can't help yourself can you? :-)
 
If this is the incorrect forum then I apologise (sorry David), and will
happily accept advice off-list or redirection to other sources or forums.
 
TIA
 
Larry Ducie     

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.