턱시도를 이용한 호스트(IBM)<->UNIX 연결
원본출처 : http://kldp.org/~kabin/doc/tuxedo-jolt.txt
* 연결 그림
IBM 390 ----- SunLink ----- E-Link ----- 턱시도 ------ Jolt ------ Weblogic App Server
* 설명
IBM호스트의 CICS와 턱시도 CICS를 연결하기 위해 턱시도의 E-Link를 SunLink(Sun기종인 경우)와 연결한다.
SunLink는 TCP/IP와 SNA를 연결해 준다. 또한 E-Link는 EBCDIC을 ASCII로 ASCII를 EBCDIC으로 변환해 줄
수 있다.
*SunLink 셋업
% sunsetup
*SunLink 를 이용한 턱시도CICS<->IBM CICS간의 데이터 이동상황 보기
% sunscope -d /dev/hme -t -e -m [hme의 mac-address]
*SunLink 구동 및 다운
% sunsetup
*턱시도 환경 설정
LANG=C
APPDIR=/tool/tuxedo/apps/simpapp
TLOGDEVICE=/tool/tuxedo/apps/simpapp/TLOG
FIELDTBLS=Usysflds,common.flds
TUXCONFIG=/tool/tuxedo/apps/simpapp/tuxconfig
TUXDIR=/tool/tuxedo
FLDTBLDIR=/tool/tuxedo/udataobj:/tool/tuxedo/apps/simpapp
CLASSPATH=/tool/weblogic/classes:/tool/weblogic/lib/weblogicaux.jar
LOGNAME=tuxedo
MAIL=/var/mail/tuxedo
FLDTBLDIR32=/tool/tuxedo/lib
FIELDTBLS32=fmb.def
HOME=/tool/tuxedo
BDMCONFIG=/tool/tuxedo/apps/simpapp/bdmconfig
LD_LIBRARY_PATH=/tool/tuxedo/lib:/tool/tuxedo/lib:/tool/tuxedo/lib
* 턱시도 서버형태 서비스들 load
% tmloadcf -y ubbconf
* 호스트프로그램 설정
% dmloadcf -y dmconf
* 턱시도 부팅
% tmboot -y
* 턱시도 셧다운
% tmshutdown -y
* 턱시도 관리프로그램 구동
% tmadmin
* weblogic application server(이하 웹로직) 의 jolt 구동을 위한 웹로직 propertiy파일일부
------------
weblogic.httpd.register.Test=examples.jolt.servlet.simpapp.Test
weblogic.allow.execute.servlet.Test=everyone
weblogic.allow.execute.servlet.file=everyone
weblogic.system.startupClass.connappStart=\
bea.jolt.pool.servlet.weblogic.PoolManagerStartUp
weblogic.system.startupArgs.connappStart=\
poolname=connapp,\
appaddrlist=//sun:5060,\
minpoolsize=4,\
maxpoolsize=20
weblogic.system.shutdownClass.connappStop=\
bea.jolt.pool.servlet.weblogic.PoolManagerShutDown
weblogic.system.shutdownArgs.connappStop=\
poolname=connapp
-------------
* jolt Repository 추가및 삭제 변경
http://webserver:7001/RE.html
# 주의: RE.html 애플릿에서 서비스 추가후 반드시 패키지를 export해야 한다.
턱시도 서비스 프로그램 작성
1. makefile
---------------------------------
TUXDIR=/tool/tuxedo
BINDIR=$(TUXDIR)/bin
OBJS=HOSTCTRL
all:$(OBJS)
HOSTCTRL:HOSTCTRL.c
$(BINDIR)/buildserver \
-s HOSTCTRL \
-o HOSTCTRL \
-f HOSTCTRL.c \
-f hostcall.c \
-f hostcall1.c \
-f ppp.c \
-f cnv.c
---------------------------------
2. 서비스 프로그램 소스
#include
#include "atmi.h" /* TUXEDO Header File */
#include
#include
#include "common.flds.h"
#include "macro.h"
#if defined(__STDC__) || defined(__cplusplus)
main(int argc, char *argv[])
#else
main(argc, argv)
int argc;
char *argv[];
#endif
{
FBFR *transf;
long rcvlen;
int ret;
char buf[100];
char buf2[1024*9];
/* Attach to System/T as a Client Process */
if (tpinit((TPINIT *) NULL) == -1) {
(void) fprintf(stderr, "Tpinit failed\n");
exit(1);
}
/* Allocate STRING buffers for the request and the reply */
if((transf = (FBFR *) tpalloc("FML", NULL, 1024*9)) == NULL) {
(void) fprintf(stderr,"Error allocating send buffer\n");
tpterm();
exit(1);
}
PUT(SVRNAME, 0, "HOSTCTRL");
PUT(CONTENT, 0, "71072710255111");
ret = tpcall("SADOWMS82", (char *)transf, 0, (char **)&transf, &rcvlen,(long)0);
if(ret == -1) {
(void) fprintf(stderr, "Can't send request to service COMMSVRXA\n");
(void) fprintf(stderr, "Tperrno = %d\n", tperrno);
tpfree((char *)transf);
tpterm();
exit(1);
}
memset(buf2, 0x00, 1024*9);
GET(CONTENT, 0, buf2);
printf("CONTENT: %s\n", buf2);
/* Free Buffers & Detach from System/T */
tpfree((char *)transf);
tpterm();
}
3. ubbconf 파일
-----------------------------------------------------
*RESOURCES
IPCKEY 250000
UID 900
GID 80
DOMAINID simpsnad
MASTER SITE1
MAXACCESSERS 120
MAXSERVERS 100
MAXSERVICES 140
MODEL SHM
LDBAL N
SCANUNIT 30
BLOCKTIME 30
SANITYSCAN 3
*MACHINES
hyundai LMID=SITE1
TUXDIR="/tool/tuxedo"
APPDIR="/tool/tuxedo/apps/simpapp"
TUXCONFIG="/tool/tuxedo/apps/simpapp/tuxconfig"
ULOGPFX="/tool/tuxedo/apps/simpapp/ULOG"
MAXWSCLIENTS=60
*GROUPS
GROUP1 LMID=SITE1 GRPNO=1
WSGRP LMID=SITE1 GRPNO=2
JSLGRP LMID=SITE1 GRPNO=3
JREPGRP LMID=SITE1 GRPNO=4
GROUP5 LMID=SITE1 GRPNO=5
GROUP6 LMID=SITE1 GRPNO=6
*SERVERS
HOSTCTRL SRVGRP=GROUP1 SRVID=1
CLOPT="-A -r"
WSL SRVGRP=WSGRP SRVID=2
CLOPT="-A -- -n //10.14.1.202:5000 -w WSH -m 1 -M 3 -x 5"
JSL SRVGRP=JSLGRP SRVID=3
CLOPT=" -- -n //10.14.1.202:5060 -d /dev/tcp -m 2 -M 4 -x 10"
JREPSVR SRVGRP=JREPGRP SRVID=4
RESTART=Y GRACE=0 MAXGEN=5
CLOPT="-A -- -W -P /tool/tuxedo/apps/jrepository"
tuxservice SRVGRP=GROUP1 SRVID=10
CLOPT="-A -r"
DMINIT SRVGRP=GROUP6 SRVID=61
CLOPT="-A -- -f /tool/tuxedo/apps/simpapp/dminit.scr"
DMADM SRVGRP=GROUP5 SRVID=51
GWADM SRVGRP=GROUP6 SRVID=62
REPLYQ=Y RESTART=N GRACE=0
GWSNAX SRVGRP=GROUP6 SRVID=63 RQADDR="SNADOM1"
REPLYQ=N RESTART=N GRACE=0
*SERVICES
TOUPPER
--------------------------
4. dmconf 파일
--------------------------
*DM_LOCAL_DOMAINS
simpsnad
GWGRP=GROUP6
TYPE=SNAX
DOMAINID="simpsnad"
BLOB_SHM_SIZE=1000000
# DMTLOGDEV=
#example DMTLOGDEV="/home/me/bin/DMTLOG"
*DM_REMOTE_DOMAINS
SIMPSNAG TYPE=SNAX DOMAINID="SIMPSNAG"
*DM_SNACRM
simpcrm SNACRMADDR="//hyundai:5100"
NWDEVICE="/dev/tcp"
LDOM="simpsnad"
*DM_SNASTACKS
simpstk
SNACRM="simpcrm"
STACKTYPE="SUN91"
LOCALLU="L5D2APVF"
LTPNAME="*"
STACKPARMS="hyundai"
*DM_SNALINKS
simplk1 STACKREF="simpstk"
RDOM="SIMPSNAG"
LSYSID="APVF"
RSYSID="CICT"
RLUNAME="CICSET"
MODENAME="IBMRDB"
SECURITY="LOCAL"
STARTTYPE="COLD"
MAXSESS=10
MINWIN=5
MAXSYNCLVL=1
#example LSYSID="BEA"
# RSYSID="TEST"
# RLUNAME="CICSTEST"
# MODENAME="SMSNA100"
# MAXSESS=10
# MINWIN=5
# MAXSYNCLVL=2
#*DM_LOCAL_SERVICES
#MIRROR LDOM="simpsnad"
#CONV=N
#RNAME="MIRRORSERV"
#INBUFTYPE="STRING"
#OUTBUFTYPE="STRING"
#DOUBLEMIRROR
#LDOM="simpsnad"
#CONV=N
#RNAME="MIRRDPLS"
#INBUFTYPE="STRING"
#OUTBUFTYPE="STRING"
*DM_REMOTE_SERVICES
ETDOWMS90 AUTOTRAN=N
LDOM="simpsnad"
RDOM=SIMPSNAG
CONV=N
RNAME="DOWMS90"
INBUFTYPE="CARRAY"
OUTBUFTYPE="CARRAY"
FUNCTION="DPL"
ETDOWMI01 AUTOTRAN=N
LDOM="simpsnad"
RDOM=SIMPSNAG
CONV=N
RNAME="DOWMI01"
INBUFTYPE="CARRAY"
OUTBUFTYPE="CARRAY"
FUNCTION="DPL"
ETBOAMI24 AUTOTRAN=N
LDOM="simpsnad"
RDOM=SIMPSNAG
CONV=N
RNAME="BOAMI24"
INBUFTYPE="CARRAY"
OUTBUFTYPE="CARRAY"
FUNCTION="DPL"
ETBOAMI25 AUTOTRAN=N
LDOM="simpsnad"
RDOM=SIMPSNAG
CONV=N
RNAME="BOAMI25"
INBUFTYPE="CARRAY"
OUTBUFTYPE="CARRAY"
FUNCTION="DPL"
ETBOAMI30 AUTOTRAN=N
LDOM="simpsnad"
RDOM=SIMPSNAG
CONV=N
RNAME="BOAMI30"
INBUFTYPE="CARRAY"
OUTBUFTYPE="CARRAY"
FUNCTION="DPL"
ETDOWMI02 AUTOTRAN=N
LDOM="simpsnad"
RDOM=SIMPSNAG
CONV=N
RNAME="DOWMI02"
INBUFTYPE="CARRAY"
OUTBUFTYPE="CARRAY"
FUNCTION="DPL"
*DM_ROUTING
|