Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ESQLCOBOL & 4gl

18 views
Skip to first unread message

Alison Crichton

unread,
Aug 8, 1994, 3:03:48 PM8/8/94
to

Hello, world!

Does anyone know if you can call an Informix 4gl function
(ie: a .o object file) from a Micro Focus ESQLCOBOL program? Also,
can you call an Informix 4gl function from a C program?

If either of the above are possible, please provide examples
of compilation and linking instructions.

So long, and thanks for all the fish!
Alison Crichton

Craig Ludington

unread,
Aug 8, 1994, 9:25:46 PM8/8/94
to
Alison Crichton (acri...@bogart.uucp) wrote:

: Hello, world!

Alan Popiel

unread,
Aug 9, 1994, 11:53:04 AM8/9/94
to
->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 | /
\ al...@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!) \
/________________________) (____________________________\

Alison Crichton

unread,
Aug 9, 1994, 5:38:41 PM8/9/94
to
Alan Popiel (al...@po.den.mmc.com) wrote:

: 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.

Alan,

Thank you for your response. I am running Informix 4.11, and
I can't find a reference to the functions fgl_init() and fgl_sigint()
in my reference manual. Could you tell me what version of the reference
manual would have this information?

Alison Crichton

Jonathan Leffler

unread,
Aug 10, 1994, 12:33:07 PM8/10/94
to
}From: bogart!acrichto (Alison Crichton)
}Subject: Re: ESQLCOBOL & 4gl
}Date: 9 Aug 1994 21:38:41 GMT
}X-Informix-List-Id: <news.8094>

}Alan Popiel (al...@po.den.mmc.com) wrote:
}: 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.

} Thank you for your response. I am running Informix 4.11, and


}I can't find a reference to the functions fgl_init() and fgl_sigint()
}in my reference manual. Could you tell me what version of the reference
}manual would have this information?

I don't think those two functions are documented anywhere.

However, the routines fgl_start() and fgl_call() and fgl_exitfm() and
fgl_end() are documented. In 6.00, they're in Apppendix C of Informix-4GL
Reference: Volume 2. In the 4.1x documentation, they're on page S-210 ff
in the Informix-4GL Supplement. They weren't available in 4.00.

Yours,
Jonathan Leffler (jo...@informix.com) #include <disclaimer.h>

Alison Crichton

unread,
Aug 11, 1994, 9:47:01 AM8/11/94
to
: }I can't find a reference to the functions fgl_init() and fgl_sigint()

: }in my reference manual. Could you tell me what version of the reference
: }manual would have this information?

: I don't think those two functions are documented anywhere.

: However, the routines fgl_start() and fgl_call() and fgl_exitfm() and
: fgl_end() are documented. In 6.00, they're in Apppendix C of Informix-4GL
: Reference: Volume 2. In the 4.1x documentation, they're on page S-210 ff
: in the Informix-4GL Supplement. They weren't available in 4.00.

Thank you to all who wrote with the information on calling a
4GL function from a C program. There is a chapter on doing this in
the Informix 4GL supplement, version 4.10, pages S-201 to S-212.

What I really wanted to do was to call a 4GL function from a
Micro Focus ESQLCOBOL program. I have had no luck finding any
documentation to indicate that this is possible. What I will have to
do is have my Cobol program call a C function, which in turn will call
the 4GL functions necessary.

Golly! It's sure fun getting a legacy Cobol application to
play in the same sandbox as a group of 4GL and C applications using an
Informix database.

Alison Crichton - Yes, Michael Crichton and I are related (and _tall_)
- all Crichtons (and probably Creightons) are related, unless their
family took that name, as some former slaves did after the Civil War.
I don't think this entitles me to any money from _Jurassic Park_,
though. :-)

0 new messages