To prepare COBOL programs on OS/2, link your programs with one of the
following libraries provided by MQSeries for OS/2 Warp:
Library file | Program/exit type |
---|---|
MQMCB16 | Server for 16-bit Micro Focus COBOL |
MQICCB16 | Client for 16-bit Micro Focus COBOL |
MQMCBB | Server for 32-bit IBM VisualAge COBOL |
MQMCB32 | Server for 32-bit Micro Focus COBOL |
MQICCBB | Client for 32-bit IBM VisualAge COBOL |
MQICCB32 | Client for 32-bit Micro Focus COBOL |
To compile, for example, the sample program amq0put0, using IBM VisualAge COBOL:
set SYSLIB=<drive>:\mqm\tools\cobol\copybook\VAcobol;%SYSLIB%
cob2 amq0put0.cbl -qlib <drive>:\mqm\tools\lib\mqmcbb.lib
(for use on the WebSphere MQ server)
cob2 amq0put0.cbl -qlib <drive>:\mqm\tools\lib\mqiccbb.lib
(for use on the WebSphere MQ client)
To prepare Micro Focus COBOL programs, follow these steps:
set cobsw=xxxx
Set the LIB environment variable to point to the compiler COBOL libraries.
Link the object file for use on the WebSphere MQ server:
cbllink amq0put0.obj mqmcb32.lib
or
Link the object file for use on the WebSphere MQ client:
cbllink amq0put0.obj mqiccb32.lib
set cobcpy=c:\mqm\tools\cobol\copybook;%COBCPY%
To prepare CICS Transaction Server for OS/2, V4 programs using IBM VisualAge COBOL:
UserWrk='c:\mqm\dll' UserCobol='IBM' UserCobcopy='c:\mqm\tools\cobol\copybook' UserCobWork='c:\mq-cics\wrk'
Where \mq-cics\wrk is the name of a work directory for output from CICSTRAN and CICSCOMP commands (see steps 2 and 3).
CICSTRAN MYPROG.CPP
This translates your program to a .CBL program.
CICSCOMP MYPROG.CBL
CICSLINK MYPROG.OBJ LIBS(MQMCBB)
For further information about this, see the CICS for OS/2 Customization V3.0, SC33-1581-00 and the Transaction Server for OS/2 Warp, V4 Application Programming Guide.