|
Name Environment
Synopsis Description
Diagnostics Notes
See also Examples |
Name |
UciOpen
|
Environment |
Unix, Win32 Cobol
|
Synopsis |
COPY "UCI.CPY". ACCEPT
UCI-SOCKET FROM COMMAND-LINE.
CALL "UciOpen" USING UCI-PAR. |
Description |
UciOpen initializes the socket identified by the
number stored in the UCI-SOCKET field of the UCI-PAR structure. By using the
generic server utility UcmServer(U), this number is
available as command argument and may be received from COMMAND-LINE. The next UCI
function call after UciOpen should be UciRead. UciOpen
will fail if one or more of the following is true:
| UE_NOTINIT |
The UCI interface has not been initialize by a call to UciInit (UCI-ERRNO 1). |
| UE_INVALID |
The value of UCI-SOCKET is not a valid socket descriptor (2). |
| UE_NOMEM |
The new socket could not be entered into the internal database, due to low
memory (99). |
| UE_ULMREG |
The product UCM is not registered in the license database. Enter
your activation key in the ulm(I) utility (20). |
| UE_ULMEXP |
The UCM license has expired. This error may occur in demo versions
only (21). |
| UE_ULMBUSY |
Too many users. The UCM license does not allow additional users at
this time. Please consult Unitec for details on how to increase your license (22). |
|
Diagnostics |
Upon successful completion UciOpen returns ZERO.
Otherwise, the value of the global ucmErrno is returned and the field UCI-ERRNO
in the UCI-PAR structure is set to indicate the error. In most Cobol
implementations the return code of C functions may be accessed through a predefined
variable named RETURN-CODE.
|
Notes |
The socket number to be passed to UciOpen is received
on the command line from the UcmServer(U) utility.
This number may be passed to other Cobol programs using the same mechanism through the system(3)
library function (CreateProcess on Win32 platforms). To
maintain correct socket housekeeping, it is important, that each of these task do their
own UciInit, UciOpen, UciClose and UciTerm
call sequence.
|
See also |
UciInit, UciClose, UciTerm
|
Examples |
| COPY
"UCI.CPY". ACCEPT UCI-SOCKET FROM
COMMAND-LINE.
CALL "UciInit".
CALL "UciOpen" USING UCI-PAR.
CALL "UciRead" USING UCI-PAR
UCI-MSG.
...
CALL "UciClose" USING UCI-PAR.
CALL "UciTerm". |
|