OpenTP1 Version 7 User's Guide
This subsection explains UAP creation in COBOL2002.
This subsection explains the commands that are specified in the following cases:
If you use the trnmkobj command to create transaction control objects, make sure that you specify the -C "/Zl" option.
If you use the default transaction control object file (dc_trn_allrm.obj) that is created by using the trnlnkrm command, execute the trnlnkrm command with the -C "/Zl" option specified and re-create the object.
If you compile the C language source file created by stbmake, make sure that you specify the "/Zl" compiler option.
This subsection shows an example of a makefile needed for creating an SPP.
The following are the source files that are used in the example of a makefile:
The following shows an example of a makefile:
!include <ntwin32.mak> # TP1TEST Make File CBLFG1 = -Compile,NoLink -Comp5 -Lib,CUI -Main,System CBLFG2 = -Compile,NoLink -Comp5 -Lib,CUI SYSLIB = $(conlibsdll) TP1LIB = [libdam.lib]#1 [libtam.lib]#2 libbetran.lib CCBL = ccbl2002 LK = ccbl2002 -Lib,CUI all:TP1TEST.exe # Compile main.obj:main.cbl $(CCBL) $(CBLFG1) main.cbl sev1.obj:sev1.cbl $(CCBL) $(CBLFG2) sev1.cbl sev2.obj:sev2.cbl $(CCBL) $(CBLFG2) sev2.cbl ex_sstb.obj:ex_sstb.c [$(cc) $(cflags) /Zl $(cvarsdll) $*.c]#3 # Create a stub source file ex_sstb.c:ex.def $(DCDIR)\bin\stbmake $? # Link TP1TEST.exe: main.obj sev1.obj sev2.obj ex_sstb.obj $(LK) -OutputFile $*.exe $** \ [$(DCDIR)\spool\trnrmcmd\userobj\dctrninf.obj \]#4 $(TP1LIB) $(SYSLIB) |
This subsection shows an example of a makefile needed for creating an MHP.
!include <ntwin32.mak> # makefile for making UAP(COBOL Language) # COBOL2002 install directory COBOL2002 = C:\Progra~1\HITACHI\COBOL2002 # command STBMAKE = $(DCDIR)\bin\stbmake.exe # user server object MHP_SRC = CBLMHPM.obj TCPMHPSV.obj # include file INCDIR = -I. \ -I $(DCDIR)\include # common object SH_OBJ = $(DCDIR)\spool\trnrmcmd\userobj\mcf_sw.obj # common library LIBNAME = $(DCDIR)\lib\libmcf.lib \ $(DCDIR)\lib\libmnet.lib \ $(DCDIR)\lib\libbetran.lib # COBOL2002 library CBLLIBNAME = $(COBOL2002)\lib\cbl2k_32.lib \ $(COBOL2002)\lib\cbl2klc.lib \ $(COBOL2002)\lib\cbl2kdl.lib # compiler options CC = cl CCBL = $(COBOL2002)\bin\ccbl2002 CCOPT = -nologo $(cflags) $(cvarsdll) CONFIG = -c -Zl CFLAGS = $(CCOPT) $(CONFIG) $(INCDIR) CBLFG1 = -Compile,Nolink -Comp5 -Lib,CUI -OpenTP1 -Main,System CBLFG2 = -Compile,Nolink -Comp5 -Lib,CUI -OpenTP1 # linker options LK = ccbl2002 -Lib,CUI LNKFLG = $(conflags) /NODEFAULTLIB LINKAGE = $(conlibsdll) $(LIBNAME) $(CBLLIBNAME) msvcrt.lib all : $(SH_OBJ) tcpmhp.exe .SUFFIXES : .cbl # compile .c.obj : $(CC) $(CFLAGS) $*.c .cbl.obj : $(CCBL) $(CBLFG2) $*.cbl TCPMHPSV.obj : $(CCBL) $(CBLFG2) TCPMHPSV.cbl CBLMHPM.obj : $(CCBL) $(CBLFG1) cblmhpm.cbl # stub, creating source file cblmhp_sstb.c : $(STBMAKE) cblmhp.def # link tcpmhp.exe : $(MHP_SRC) cblmhp_sstb.obj $(LK) -OutputFile $*.exe $** $(LINKAGE) $(SH_OBJ) !if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1 !if exist $@.manifest del $@.manifest $(SH_OBJ) : $(DCDIR)\bin\trnmkobj -o mcf_sw -R OpenTP1_MCF -C "/Zl" |
Specify the COBOL2002 Development Manager settings as follows:
COBOL2002 with a version earlier than 02-00 is created by using Visual Studio .NET 2002. An error results if you use the ccbl2002 command and the linker (link) included in COBOL2002 to link an object created by using Visual Studio (Visual Studio 2005 and Visual Studio 2008). In order to avoid such an error, you must specify the environment settings according to the following rules and then link the program:
For COBOL2002 02-00 or later, this error will not occur because COBOL2002 is created by using Visual Studio 2005.
All Rights Reserved. Copyright (C) 2012, Hitachi, Ltd.