RE: Multi-module application in Informix4gl V.4.0
Posted in 2004
jarek wrote: >I'm very new user of Informix4gl. I'm using version 4.0 of it. My problem >is - how to write a multi-module program in this language. And next problem >is -> how to write to file using Informix4gl? Do I have to write modules in >C language to do this? That's an old version. To start, if you don't already have the documentation, you can get it at the following link: http://www-306.ibm.com/software/data/informix/pubs/library/lists.html The 4GL Reference Manual for Version 4.00 is there (as well as for the newer versions). For what you are asking to do, however, the version shouldn't matter much. As far as creating multiple modules goes, each module is a file named with a .4gl extension and you combine them to produce an executable or runable version. (The C Compiler version creates an executable file; RDS generates p-code.) Chapter 1 of the reference takes you through everything you need whether you are using the Informix-4GL menu or if you prefer to work at the command line. Working with the C Compiler version is described first, then working with RDS. Chapter 1 gives you not only the syntax for the commands (if working at command level) but also gives examples. It is very easy to follow. There are four types of functions that you can use within a 4GL program: MAIN, FUNCTION, REPORT, and GLOBALS. To write to a file, I'd suggest using a 'REPORT' function. See Chapter 5 of the reference manual (version 4.00) for information on report writing. When starting a report, you can specify whether you want the report to go to a printer, another program via a 'pipe' (display to the screen using the 'pg' command, for example), or to a file. The Informix documentation is excellent. (I've got hard copies of the I4GL Reference for version 4.00 and refuse to part with them - they are old friends. Personally, I prefer the format used in the older manuals, but I'm sure it is just a matter of what you get used to. In any case... ) I'd suggest getting to know the documentation. I used to suggest to my students that they skim it first, just to see what is possible and what statements are available. You can go back for details later. I used Informix-4GL for 10 years. I hope you have as much fun with it as I did. -- June Hunt _________________________________________________________________ Check out MSN PC Safety & Security to help ensure your PC is protected and safe. http://specials.msn.com/msn/security.asp sending to informix-list