


There are six USAGE types for integer data that simplify communications with other programming languages such as C. These types are designed to provide a portable method for handling machine-dependent data. For more information, see the Reference Manual, section 5.7.1.6 under "General Rules."
There are two methods, described below, to call subroutines written in the C language:
These methods may be used in combination with one another.
The direct method
The direct method allows you to pass arguments to C functions without writing special interfacing routines. Use this method when you want to simulate the behavior of a native code compiler. Parameters are passed directly to the C function according to the CALL statement that invoked the function, using the standard C calling conventions. This direct method simulates the actions of a native code compiler such as MicroFocus or VAX/COBOL.
The interface method uses special routines that are passed the name of the called function. Use this method when you want to simulate the actions of a non-native system. ACUCOBOL-GT supports two types of interfaces for doing this. The two methods simulate interfaces available in two versions of RM/COBOL:
You may use either or both of these interfaces. With the interface method, parameters are passed to the interface routines in a standardized format. The parameters must typically be converted to a format that is usable in C.
In order to call C subroutines from ACUCOBOL-GT, you must have the appropriate C compiler for your host machine. This depends on the type of machine you are using.
Software Required
Microsoft Windows and Windows NT
--Microsoft Visual C++ version 6.0.
Extended MS-DOS
--Watcom C/C++ version 11.0.
OS/2
--IBM CSet++ for OS/2 version 2.1, or later.
UNIX
--The C compiler supplied by the vendor of your UNIX system. On some
machines, this is supplied with UNIX. On others it is an add-on option.
VMS
--Digital Equipment Corporation's VAX C or DEC C compiler for VMS.
MPE/iX
--Hewlett Packard's C POSIX Developer's Kit.
No other software is required.
More: