Re: 4gl writing to a pure text file
Posted in 1994
keithr@winternet.com (Keith Root) writes: >I have the need to create a flat ascii file for an off line application. >The file is fixed length, 192 characters. >What is the easiest/fastest way from a 4gl program to write to an ascii text >file? I have come up with some of the following. >1. use the run command to echo >> filea - after formatting rows >2. create table with 1 column (192 char) and format a variable in the 4gl > code and update/insert - unload and strip "|" (2 passes - seems messy) >can someone point me to doco (4GL - 4.01) or have any ideas?? There are a nuber of ways to write out to a flat text file. Which one is the best depends of the application. My favorite way is to call a 'c' function that performs file_io. I have some source that I can E-mail to you or any one needing it. This code is of my own and not of Informix. It was developed about 7 or 8 years ago and has been used on several platforms without any problems. Ron Delpiere-Smith reds@informix.com >--------------------------------------------------------------------- >| Keith E. Root internet: keithr@winternet.com | >| National Business phone : 1-612-647-0143 | >| Data Systems, Inc. fax : 1-612-642-0913 | >| Microwaves will frizz your heirs! | >---------------------------------------------------------------------