DCE Application Programming Guide

Application Design Considerations
HP NonStop DCE Application Programming Guide429551-003
2-8
Programming Languages
SERVERCLASS_DIALOG_ABORT_ jacket (the
DCE_SERVERCLASS_DIALOG_ABORT_() function). SERVERCLASS_SEND_,
SERVERCLASS_DIALOG_BEGIN_, SERVERCLASS_DIALOG_SEND_,
SERVERCLASS_DIALOG_END_, and SERVERCLASS_DIALOG_ABORT_ jackets
have the advantage of not blocking the process.
Programming Languages
Most applications for NonStop DCE are written in C, but C and COBOL can be
combined in a single application. Appendix B, Sample Mixed-Language Application,
contains a sample TNS application using both C and COBOL. For a discussion of
mixing programming languages, see the COBOL Manual for TNS and TNS/R
Programs and the COBOL Manual for TNS/E Programs.
When combining C and COBOL in a single application:
The COBOL program should be single-threaded. In regular servers, that condition
can be ensured by requesting one call thread in the server’s call to the
rpc_server_listen() function.
The main routine should be a C main() function.
The entire application should be compiled to run as a TNS, TNS/R, or TNS/E
application. Otherwise, both the COBOL and C portions must obey the rules for
mixing TNS, TNS/R, and TNS/E modules in an application. For migration and
conversion considerations, see:
°
For migrating an application from TNS to TNS/R, see the TNS/R Native
Application Migration Guide.
°
For migrating an application from TNS/R to TNS/E, see the H-Series
Application Migration Guide.
°
For converting a TNS application to TNS/E native mode, see the TNS/E Native
Application Conversion Guide.
Note that the TNS version of the HP C for NonStop Systems compiler is located at
/nonnative/bin/c89 (G-series systems only; H-series does not support TNS
tools) and the TNS/R and TNS/E versions are located at /usr/bin/c89. Each
version supports different compilation and linking options.
For more information, see the appropriate c89(1) reference pages. The reference
page for the TNS version of the compiler (G-series only; H-series does not support
TNS tools) can be read with the command:
man -M /nonnative/usr/share/man c89
To access the c89(1) reference page for the TNS/R and TNS/E versions of the
compiler, enter:
man c89
Or see the Open System Services Shell and Utilities Reference Manual.