Summary of types

Table 1. Summary of types
Type of application How it is called Module entry point Data sets required at execution time Runtime options and other considerations
A mainline function that requires no C-specific library functions. From the command line, JCL, or an EXEC or CLIST. EDCXSTRT must be explicitly included at bind time. None. Runtime options are specified by #pragma runopts in the compilation unit for the main() function. The HEAP and STACK options are honored. STACK defaults to above the 16M line.
A mainline function that requires C library functions. From the command line, JCL, or an EXEC or CLIST. EDCXSTRL must be explicitly included at bind time. C library functions. Runtime options are specified by #pragma runopts in the compilation unit for the main() function. The TRAP, HEAP and STACK options are honored, but the stack defaults to above the 16M line.
A mainline function that uses storage pre-allocated by the caller. From Assembler code.   C library functions are optional; the caller must load these functions and pass their addresses to EDCXSTRX, if required to by the application. Runtime options are specified by #pragma runopts in the main() function. The TRAP option is honored if C library functions are required.
An exit. Typically from assembler code, with a structured parameter list.   C library functions, if required. Runtime options are specified by #pragma runopts in the compile unit for the entry point. The HEAP and STACK options are honored, but the stack defaults to be above the 16M line. The TRAP option is honored if C library functions are required.
A C subroutine called from Assembler language using a pre-established persistent environment. A handle, the address of the subroutine, and a parameter list are passed to EDCXHOTU.   C library functions are optional, depending on the way the handle was set up. Runtime options are specified by #pragma runopts in any compile unit. The HEAP and STACK options are honored, but the stack defaults to above the 16M line. The TRAP option is honored if C library functions are called for. The runopts in the first object module in the link-edit that contains runopts prevails, even if this compilation unit is part of the calling application.

The environment is established by calling EDCXHOTC or EDCXHOTL (if library functions are required). These functions return a value (the handle), which is used to call functions that use the environment.

A server. User code includes a stub routine that calls EDCXSRVI. This causes the server to be loaded and control to be passed to its entry point. EDCXSTRT or EDCXSTRL, depending on whether the server needs C library functions. C library functions, if required by the server code. Runtime options are the same as for EDCXSTRL or EDCXSTRT.

The author of the server must supply stub routines that call EDCXSRVI and EDCXSRVN to initialize and communicate with the server. These are bound with the user application.

A user of an application server.     The server and C library functions, if required by the server. The author of the server must supply stub routines which call EDCXSRVI and EDCXSRVN to initialize and communicate with the server.