Freestanding applications are C modules that run either:
- Without z/OS® Language Environment® and the z/OS XL C library (using EDCXSTRT)
- Without z/OS Language
Environment but with the z/OS XL C library functions (using EDCXSTRL)
Three initialization routines are provided by SPC for building
freestanding applications:
- EDCXSTRT
- For building completely freestanding applications. The applications
can use no z/OS XL C runtime library functions and can have no z/OS Language
Environment attachment.
- EDCXSTRL
- For building applications that use z/OS XL C runtime library functions
but have no z/OS Language
Environment attachment.
- EDCXSTRX
- This routine accepts a parameter to choose whether your application
should behave as if it was initialized with either EDCXSTRT or EDCXSTRL.
This parameter is described further in Setting up a C environment with preallocated stack and heap.
Certain restrictions apply to freestanding applications initialized
by the routines
EDCXSTRT,
EDCXSTRL, and
EDCXSTRX.
These restrictions are as follows:
- They cannot perform interlanguage calls, except with assembler
language routines that preserve register 12 and use the IBM-supplied
macros for entry and exit.
- The parameters received by the main() function (normally argc and argv)
are undefined. __xregs() (described in __xregs() — Get Registers on Entry) can be
used to examine the parameters passed by the calling environment.
- They cannot do arithmetic using long double variables
on pre-XA machines (that is, on machines that do not support
the DXR instruction).