Re: 4GL Newbie: How to do file I/O in 4GL. Create output to file
Posted in 1994
manmetha@gauss.rutgers.edu (Rajesh Malhotra) writes: >Fellow Informix'ers, > How does one do file I/O in 4GL? I need to write a 4GL program >thet would generate SQL, but not execute it. This generated SQL needs to >be written to a file, and executed at a different location and time. > How would I open a file, write to it and then close the file? >I am running 4GL ver 4.00 on an IBM RS6000 AIX 3.2.4. > Any other ways that I could capture the output? I cannot use >redirect since I have a screen up that prompts the user for input. This is one of the areas best left to c functions, if you have c expertese (fortunately, it's not hard in c). If c is not a solution, and you are always creating a new file, you can of course start a REPORT to do the work. Other than that, RUN statements might be the answer: PROMPT "Enter the string:" FOR strng LET runtxt = "echo '", strng clipped, "' >> filename" RUN runtxt ... ============================================================ Dennis J. Pimple Informix Software Inc Senior Consultant Denver Colorado USA dennisp@informix.com Voice:303-850-0210 Fax:303-779-4025