Re: ESQLCOBOL & 4gl
Posted in 1994
->Subject: ESQLCOBOL & 4gl ->Date: 8 Aug 1994 19:03:48 GMT ->Reply-To: bogart!acrichto (Alison Crichton) ->Organization: IDS -> ->Hello, world! -> -> Does anyone know if you can call an Informix 4gl function ->(ie: a .o object file) from a Micro Focus ESQLCOBOL program? [1] ->Also, can you call an Informix 4gl function from a C program? [2] -> -> If either of the above are possible, please provide examples ->of compilation and linking instructions. -> ->So long, and thanks for all the fish! [3] ->Alison Crichton [1] I don't know about mixing 4GL and ESQL/COBOL. It probably depends on on the parameter passing conventions used by EQSL/COBOL. See the next answer. [2] Yes, it is very easy for C and 4GL functions to call each other. The conventions for this are well documented in the manuals, tho' the place- ment varies from version to version. Look for "Calling C functions" or "Functions, C" in the index of your 4GL manuals. Because 4GL uses the stack in a particular way, you must make sure that certain initializations are performed. One way is to use a 4GL main, which then calls what would be your C main as a function. The other is to make sure your C main function calls functions fgl_init(argc, argv) and fgl_sigint(). In some (mostly older) manuals, the use of these two functions is not well documented. [3] 42! Regards, Alan ___________________________ ______________________| R. Alan Popiel |__________________________ \\ Internet: | Martin Marietta, SLS | / \\ alan@den.mmc.com | P.O. Box 179, M/S 3810 | Std disclaimers apply. / )Voice: | Denver, CO 80201-0179 USA | ( / 303-977-9998 |___________________________| (But you knew that!) \\ /________________________) (____________________________\\