This chapter specifically covers the use of the COBOL language binding feature of the /Workstation on the following workstation platforms:
The material in this chapter is intended to supplement
the material presented in
the programming chapters of this guide and the
BEA TUXEDO /Workstation Guide.
This section covers item specific to writing and building BEA TUXEDO System/T
COBOL
client programs to run under UNIX.
COBOL
client programs for UNIX workstations are the same as
COBOL
client programs within the System/T administrative domain.
You do have available all of the ATMI functions.
Workstation client programs are compiled and link edited
with the
buildclient
command.
If you are building a UNIX /Workstation client on the native node,
use the
-w
option.
This specifies that the client should be built using the
workstation libraries.
On a native node, where both native and workstation
libraries are present, the default is to use the native
libraries.
The
-w
option ensures that the correct libraries for a workstation
client are used.
On a workstation, where only the workstation libraries are
present, it is not necessary to use the
-w.
Figure 1 shows an example of the
buildclient
command line on the native node.
The
-o
option provides a name for your
a.out
file.
Input files are specified with a
-f
firstfiles
option in Figure 1 to indicate that they are called in ahead
of system libraries.
buildclient
needs
TUXDIR
to locate system libraries.
CC
defaults to
cc,
but can be set to another compiler as in the example.
Workstation clients make use of several environment
variables.
The following are checked by
TPINITIALIZE
when the workstation client attempts to join the application:
Other environment variables may be needed by /Workstation
COBOL
clients on a UNIX workstation depending on what System/T
features are being used.
Note: MicroFocus COBOL does not support shared objects on UNIX 3.2.
LIBNSL.a is delievered as a shared object and
is required by buildclient when linking a
workstation client.
As a result, /WS for for UNIX 3.2 is not supported.
This section covers items specific to writing and building BEA TUXEDO System/T
COBOL
client programs to run under MS-DOS.
COBOL
client programs for MS-DOS workstations are the same as
COBOL
client programs within the System/T administrative domain.
You have available all of the ATMI functions.
The
COBOL
source files that call ATMI functions must be compiled with the
COBOL
compiler using LITLINK option.
Workstation client object files are link edited
with the
buildclt
command.
While the syntax of the command is straightforward,
the usage varies according to the compilation system used.
Figure 2 shows a sample.
buildclt
command line.
buildclt
has the following options:
After the client programs have been developed and tested
they can be moved to the
MS-DOS workstations where they will be
available to users.
Workstation clients make use of several environment
variables.
The following are checked by
TPINITIALIZE
when the client attempts to join the application:
Other environment variables may be needed by /Workstation
COBOL
clients on a MS-DOS workstation depending on what System/T
features are being used.
This section covers items specific
to writing and building BEA TUXEDO System/T
client programs to run under Microsoft Windows.
They are intended to supplement the material presented
in the programming chapters of this guide and the
BEA TUXEDO /Workstation Guide.
The
ATMI
calls used in Windows client programs are the
same as described in the programming chapters of this guide.
The
COBOL
source files that call ATMI functions must be compiled with the
COBOL
compiler using LITLINK option.
Workstation client object files are link edited with the
buildcltcommand.
While the syntax of the command is straightforward,
the usage varies according to the compilation system used.
Figure 3 shows a sample.
buildclt
command line.
buildclt
has the following options:
Figure 4 is the module definition file used in the Windows
buildclt
command line.
To build an executable client for an ACCEPT/DISPLAY
application (like CSIMPAPP, for example), use the procedure
shown in Figure 5.
Refer to the
BEA TUXEDO /Workstation Guide.
Refer to the
BEA TUXEDO /Workstation Guide.
This section covers items specific
to writing and building BEA TUXEDO System/T
COBOL
client programs to run under OS/2.
They are intended to supplement the material presented
in the programming chapters of this guide and the
BEA TUXEDO /Workstation Guide.
The
ATMI
calls used in Presentation Manager client programs are the
same as described in the programming chapters of this guide.
They must, however, be incorporated into Presentation Manager
modules.
Refer to the
BEA TUXEDO /Workstation Guide.
The
COBOL
source files that call ATMI functions must be compiled with the
COBOL
compiler using LITLINK option and must use the OPTLINK calling
convention.
There is an example of the use of the OPTLINK calling convention in
$TUXDIR/apps/CSIMPAPP/ws/os2/csimpcl.cbl.
Workstation client object files are link edited with the
buildcltcommand.
While the syntax of the command is straightforward,
the usage varies according to the compilation system used.
Figure 6 shows a sample
buildclt
buildclt
has the following options:
Figure 7 shows the module definition file used in the OS/2 Presentation Manager
buildclt
command line.
Figure 8 shows a sample OS/2 character-mode
buildclt
command line.
buildclt
has the following option:
UNIX
Programming Consideration with UNIX Clients
Writing Client Programs
Building Client Programs
Fig. 1: Example of UNIX buildclient Command Lines
ALTCC=cobcc ALTCFLAGS="-I /APPDIR/include"
COBCPY=$TUXDIR/cobinclude
COBOPT="-C ANS85 -C ALIGN=8 -C NOIBMCOMP -C TRUNC=ANSI -C OSEXT=cbl"
export COBOPT COBCPY ALTCC ALTCFLAGS
buildclient -C -w -o empclient -f name.cbl -f "userlib1.a userlib2.a"
Environment Variables
DOS
Programming Considerations with MS-DOS Clients
Writing Client Programs
Building Client Programs
Fig. 2: Example of MS-DOS buildclt Command Lines
COBCPY=C:\TUXEDO\COBINC
COBDIR=C:\COBOL\LBR;C:\COBOL\EXEDLL
PATH=C:\C700\BIN;C:\COBOL\EXEDLL;...
TUXDIR=C:\tuxedo
INCLUDE=C:\TUXEDO\INCLUDE;C:\NET\TOOLKIT\INCLUDE;C:\C700\INCLUDE
LIB=C:\NET\TOOLKIT\LIB;C:\C700\LIB;C:\TUXEDO\LIB;C:\COBOL\LIB
buildclt -C -o EMP.EXE -f EMP+MFC7INTF+C7DOSIF+C7DOSLB \
-f "/NOE/NOI/SE:300/CO/ST:10000" -l "LLIBSOCK LLIBCE"
Environment Variables
Windows
Programming Considerations with the Windows DLL
Writing Client Programs
Building Client Programs
Fig. 3: Example of Windows buildclt Command Lines
COBCPY=C:\TUXEDO\COBINC
COBDIR=C:\COBOL\LBR;C:\COBOL\EXEDLL
PATH=C:\COBOL\EXEDLL;...
TUXDIR=C:\tuxedo
LIB=C:\NET\TOOLKIT\LIB;C:\MSVC\LIB;C:\TUXEDO\LIB;C:\COBOL\LIB
buildclt -C -W -o EMP.EXE -f EMP \
-f "/NOD/NOI/NOE/CO/SE:300" -d EMP.DEF -l WLIBSOCK
For Windows NT:
buildclt -C -W -o EMP.EXE \
-f empobj -d emp.def
Fig. 4: Example of a Windows Module Definition File
NAME EMP
DESCRIPTION "EMPLOYEE CLIENT ATMI"
EXETYPE WINDOWS
CODE PRELOAD MOVEABLE DISCARDABLE
DATA PRELOAD FIXED MULTIPLE
HEAPSIZE 15000
STACKSIZE 15000
EXPORTS WordProc
Building ACCEPT/DISPLAY Clients
Fig. 5: Building ACCEPT/DISPLAY clients
a) compile the COBOL module and create a file.obj
cobol file.cbl omf(obj) litlink;
b) use the following link statement
link FILE+cblwinaf,,,\
wcobatmi+cobws+wtuxws+ \
lcobol+lcoboldw+cobw+cobfp87w+ \
wlibsock,FILE.def /nod/noe;
For Windows NT the link statement is:
cbllink -oEMP.exe EMP.obj \
cobws.lib ncobatmi.lib wtuxws32.lib \
libcmt.lib user32.lib
Blocking Network Behavior
Restoring the Environment
OS/2
Programming Considerations with OS/2 Clients
Writing Presentation Manager Client Programs
Blocking Network Behavior
Building Client Programs
Fig. 6: Example of OS/2 Presentation Manager buildclt Command Lines
COBCPY=C:\TUXEDO\COBINC
COBDIR=C:\COBOL\LBR;C:\COBOL\EXEDLL
PATH=C:\COBOL\EXEDLL;...
TUXDIR=C:\tuxedo
LIB=C:\TCPIP\LIB;C:\IBMCPP\LIB;C:\TOOLKT2\OS2LIB;C:\TUXEDO\LIB;C:\COBOL\LIB
buildclt -C -P -o emp.exe -f emp.obj -d emp.def
Fig. 7: Example of an OS/2 Presentation Manager Module Definition File
NAME EMP WINDOWAPI
PROTMODE
EXETYPE OS2
HEAPSIZE 15000
STACKSIZE 15000
EXPORTS EMPWNDPROC
Fig. 8: Example of OS/2 Character-Mode buildclt Command Lines
COBCPY=C:\TUXEDO\COBINC
COBDIR=C:\COBOL\LBR;C:\COBOL\EXEDLL
PATH=C:\COBOL\EXEDLL;...
TUXDIR=C:\tuxedo
LIB=C:\TCPIP\LIB;C:\MSVC\LIB;C:\TUXEDO\LIB;C:\COBOL\LIB
buildclt -C -O -o emp.exe -f emp.obj