CRE Programmer's Guide
CRE Services
Common Run-Time Environment (CRE) Programmer’s Guide—528146-004
2-61
Results of Operations That Support Process Pairs
with CRE support for process pairs). Therefore, a process pair can include C routines
only if those routines do not depend on run-time library resources. That is, C routines:
•
Cannot request or return heap space.
•
Cannot call system procedures that depend on the operating system environment,
such as FILE_OPEN_, FILE_CLOSE_, READ, or WRITEREAD. You can call
system procedures only if the procedures do not depend on prior context and do
not write data that is accessed during subsequent calls to system procedures. For
example, your program might call system procedures such as NUMIN and
NUMOUT.
•
Cannot initiate checkpoint operations.
C Data in a Process Pair
In a process pair, C routines can use data that is:
•
Passed as parameters
•
Declared locally within the routine
•
Declared globally by COBOL or FORTRAN routines
For more details on using process pairs with the TNS CRE, see the
COBOL Manual for
TNS and TNS/R Programs and the FORTRAN Reference Manual.
Results of Operations That Support Process Pairs
Each operation that supports process pairs generates a status code that is made
available to your program in a language-specific fashion. Table 2-10
on page 2-61
shows the status codes that can occur.
Note. A program that runs as a process pair cannot use the heap because only C routines
can allocate space from the heap but C is prohibited from allocating heap space in a
process pair.
Table 2-10. Status Codes Returned by CRE Functions That Support Process
Pairs
(page1of2)
Status Code Meaning
0000 The requested operation completed successfully.
0100 A takeover occurred because the primary process stopped.
0101 A takeover occurred because the primary process aborted.
0102 A takeover occurred because the primary process’s CPU failed.
0103 A takeover occurred because the primary process called CHECKSWITCH.
1000 The backup process’s CPU is down.
2nnn The CRE is unable to communicate with the backup process. nnn is a file
system error code.*
*The CRE converts file system error codes that are greater than 900 to 000.