BEA Logo BEA Tuxedo Release 7.1

  Corporate Info  |  News  |  Solutions  |  Products  |  Partners  |  Services  |  Events  |  Download  |  How To Buy

 

   Tuxedo Doc Home   |   Reference   |   Topic List   |   Previous   |   Next   |   Contents

   BEA Tuxedo COBOL Function Reference

TPSVRINIT(3cbl)

Name

TPSVRINIT() - BEA Tuxedo system server initialization routine

Synopsis

LINKAGE SECTION. 

01
CMD-LINE.
05 ARGC PIC 9(4) COMP-5.
05 ARGV.
10 ARGS PIC X OCCURS 0 TO 9999 DEPENDING ON ARGC
.
01
TPSTATUS-REC.
COPY TPSTATUS.
PROCEDURE DIVISION USING
CMD-LINE TPSTATUS-REC.
* User code
EXIT PROGRAM

Description

The BEA Tuxedo system server abstraction calls TPSVRINIT() during its initialization. This routine is called after the program has become a server but before it handles any service requests; thus, BEA Tuxedo system communication may be performed and transactions may be defined in this routine. However, if TPSVRINIT() returns with open connections, asynchronous replies pending or while still in transaction mode, the BEA Tuxedo system will close the connections, ignore replies pending, abort the transaction, and the server will exit gracefully.

If an application does not provide this routine in a server, then the default version provided by the BEA Tuxedo system is called instead. The default TPSVRINIT() calls TPOPEN() and USERLOG() to announce that the server has successfully started.

Application-specific options can be passed into a server and processed in TPSVRINIT() (see servopts(5)). The options are passed through ARGC and ARGV. ARGC contain the number of arguments that have been passed and ARGV contains the arguments (in character format) separated by a single SPACE character. getopt() is used in a BEA Tuxedo system.

If successful TPSVRINIT(), returns [TPOK] in TP-STATUS and the service can start accepting requests. If an error occurs in TPSVRINIT, the application can cause the server to exit gracefully (and not take any service requests) by returning any value except [TPOK] in TP-STATUS.

Return Values

If either TPRETURN() or TPFORWAR() are used outside of a service routine (for example, in clients, or in TPSVRINIT() or TPSVRDONE()), then these routines return having no effect.

Usage

If either TPRETURN() or TPFORWAR() are called in TPSVRINIT(), these routines simply return having no effect.

See Also

TPOPEN(3cbl), TPSVRDONE(3cbl)