TDI can be started as a service on i5/OS (OS400) by defining it as a custom TCP/IP server. The server can then either be auto started when TCP/IP is started or manually started via the STRTCPSVR command. To define a TCP/IP server, the ADDTCPSVR (Add TCP Server) command is used which requires a program to be registered that is called by the STR/ENDTCPSVR command.
The following are the steps to manually start a TDI service which start an AssemblyLine "AL" in Config file rs.xml .
CRTLIB (TDILIB) TYPE(*TEST) TEXT('TDI Library')
CRTSRCPF FILE(TDILIB/TDISRC)
PGM PARM(&P) /* START TDI Service Program */ DCL VAR(&P) TYPE(*CHAR) LEN(10) SBMJOB CMD(STRQSH CMD('<TDI_ INSTALLATION>/ibmdisrv -c + <TDI_INSTALLATION>/configs/rs.xml -r AssemblyLine ')) + JOB(TDIService) ALWMLTTHD(*YES) ENDPGMThe program is saved as TDIPGM in TDILIB.
ADDTCPSVR SVRSPCVAL(*TDISERVER) PGM(TDILIB/TDIPGM) SVRNAME(TDISERVER) SVRTYPE(TDISERVER) AUTOSTART(*NO)
STRTCPSVR SERVER(*TDISERVER)
For more information on the i5/OS (OS400) (V5R4) and commands that have been demonstrated above, see: http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp?topic=/clfinder/finder.htm
The graceful shutdown option is not supported on i5/OS systems.