OpenTP1 Version 7 User's Guide

[Contents][Index][Back][Next]

3.2.4 Creating UAPs by using Net Express

This subsection explains UAP creation using Net Express.

Organization of this subsection
(1) Specifying commands (Net Express)
(2) Example of a makefile (Net Express: SPP)
(3) Example of a makefile (Net Express: MHP)

(1) Specifying commands (Net Express)

This subsection explains the commands that are specified in the following cases:

(a) Creating transaction control objects by using the trnmkobj command

If you use the trnmkobj command to create transaction control objects, make sure that you specify the -C "/Zl" option.

(b) Using the default transaction control object file (dc_trn_allrm.obj)

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.

(c) Compiling the stub file

If you compile the C language source file created by stbmake, make sure that you specify the "/Zl" compiler option.

(2) Example of a makefile (Net Express: SPP)

This subsection shows an example of a makefile needed for creating an SPP.

(a) Names of source files

The following shows the names of the source files that are used in the example of a makefile:

(b) Example of a makefile

The following shows an example of a makefile:

!include <ntwin32.mak>
# TP1TEST Make File
CBLFG = /LITLINK /OBJ
SYSLIB = $(conlibsdll)
TP1LIB = [libdam.lib]#1 [libtam.lib]#2 libbetran.lib user32.lib
CBL_LIB = cblrtss.lib cbllds.obj adis.obj adisinit.obj adiskey.obj mffh.obj     
COBOL = cobol
 
all:TP1TEST.exe
# Compile
main.obj:main.cbl
         $(COBOL) $* $(CBLFG);
sev1.obj:sev1.cbl
         $(COBOL) $* $(CBLFG);
sev2.obj:sev2.cbl
         $(COBOL) $* $(CBLFG);
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
         $(link) $(conflags) -out:$*.exe $** \
         [$(DCDIR)\spool\trnrmcmd\userobj\dctrninf.obj \]#4
         $(TP1LIB) $(SYSLIB) $(CBL_LIB)

#1
Specify libdam.lib only if you use TP1/FS/Direct Access.

#2
Specify libtam.lib only if you use TP1/FS/Table Access.

#3
For ex_sstb.obj, specify the /Zl compiler option.

#4
Specify $(DCDIR)\spool\trnrmcmd\userobj\dctrninf.obj only if you use the transaction facility. For dctrninf.obj, specify the name of object file for transaction control that was created by using the trnmkobj command. If you execute the trnmkobj command, specify the -C "/Zl" option so that information about the manifest file is not embedded in the object. For details about the trnmkobj command, see Chapter 7. Operation Commands.

(3) Example of a makefile (Net Express: MHP)

This subsection shows an example of a makefile needed for creating an MHP.

!include <ntwin32.mak>
# makefile for making UAP(COBOL Language)
 
 
# 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
 
# Library
CBLLIBNAME       =       cblrtss.lib cbllds.obj adis.obj adisinit.obj\
                         adiskey.obj mffh.obj
 
# Compiler options
CC               =       cl
COBOL            =       cobol
CCOPT            =       -nologo $(cflags) $(cvarsdll)
CONFIG           =       -c -Zl
CFLAGS           =       $(CCOPT) $(CONFIG) $(INCDIR)
CBLFG            =       /LITLINK /OBJ
 
# Linker options
LK               =       link
LNKFLG           =       $(conflags) /NODEFAULTLIB
LINKAGE          =       $(LIBNAME) msvcrt.lib user32.lib $(conlibsdll) $(CBLLIBNAME)
 
all : $(SH_OBJ) tcpmhp.exe
 
# Compile
.c.obj   :
                $(CC) $(CFLAGS) $*.c
 
TCPMHPSV.obj :
                $(COBOL) tcpmhpsv.cbl $(CBLFG);
 
CBLMHPM.obj :
                $(COBOL) cblmhpm.cbl $(CBLFG);
 
cblmhp_sstb.obj :
                $(CC) $(CFLAGS) cblmhp_sstb.c
 
# Create stub source file
cblmhp_sstb.c :
                $(STBMAKE) cblmhp.def
 
# Link
tcpmhp.exe : $(MHP_SRC) cblmhp_sstb.obj
                cblnames -V -MCBLMHPM + CBLMHPM
                $(LK) $(LNKFLG) $** $(LINKAGE) $(SH_OBJ) -out:$@
                !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"