Copyright © TIBCO Software Inc. All rights reserved
Copyright © TIBCO Software Inc. All rights reserved


Chapter 4 Using the Adapter : Starting and Stopping the Adapter

Starting and Stopping the Adapter
This section describes how to start and stop FilePublisher and FileSubscriber.
Starting FilePublisher
Before starting FilePublisher, ensure the TIBCO Rendezvous daemon is running. For example:
SBMJOB CMD(CALL PGM(TIBRV/RVD)) ALWMLTTHD(*YES)
If using a remote daemon, ensure that it is started with the –permanent option. Normally if the TIBCO Rendezvous daemon is not running, execution of FilePublisher starts the daemon automatically.
The adapter, as well as the TIBCO Rendezvous daemon, require a multi-user threaded environment to run. The Command Entry interactive display does not provide this environment.
Using the SBMJOB Command
The FilePublisher program, SXF3RPUB, can be submitted to batch. Use the SBMJOB command to do this.
The following is an example of the SBMJOB command. Note that there are two parameters, JOBMSGQFL and ALWMLTTHD, that require a value other than the default.
ADDLIBLE TIBFALIB
 
SBMJOB CMD(call pgm(SXF3RPUB)
PARM('-config' 'TIBFASMPRV/INIFPUB(PUB005)'))
JOBMSGQFL(*PRTWRAP)
ALWMLTTHD(*YES)
 
Parameters in this SBMJOB command example were set as follows:
The FilePublisher program, SXF3RPUB, is assumed to be in the library TIBFALIB.
FilePublisher was submitted with the -config parameter. This causes FilePublisher to use configuration file member PUB005 in file INIFPUB. If you omit this parameter, FilePublisher uses the sample configuration file, TIBFALIB/INIFPUB(INIFPUB).
The JOBMSGQFL parameter was set to *PRTWRAP, in case a large number of messages issued to the job message queue.
The ALWMLTTHD parameter must be set to *YES. So that the job can run with multiple user threads.
Using a CL Program
One can fashion a CL program after the CL programs in TIBFASMPRV/QCLSRC to easily submit the FilePublisher to batch.
Using the QShell Environment
You can also start FilePublisher interactively in the QShell environment, as follows:
ADDLIBLE TIBFALIB
QSH
cd /usr/tibco/tibfa/TIBFALIB
sxf3rpub -config 'tibfalib/inifpub(pub003)'
 
or
sxf3rpub -service 7500 -daemon hawk400.na.tibco.com:7500 -config 'tibfalib/inifpub(pub003)'
 
Starting FileSubscriber
Before starting FileSubscriber, ensure the TIBCO Rendezvous daemon is running. For example:
SBMJOB CMD(CALL PGM(TIBRV/RVD)) ALWMLTTHD(*YES)
If using a remote daemon, ensure that it is started with the –permanent option. Normally if the TIBCO Rendezvous daemon is not running, execution of FileSubscriber starts the daemon automatically.
Using the SBMJOB Command
The FileSubscriber program, SXF3RSUB, can be submitted to batch. Use the SBMJOB command to do this.
The following is an example of the SBMJOB command. Note that there are two parameters, JOBMSGQFL and ALWMLTTHD, that require a value other than the default.
ADDLIBLE TIBFALIB
 
SBMJOB CMD(call pgm(SXF3RSUB)
PARM('-config' 'TIBFASMPRV/INIFSUB(SUB005)'))
JOBMSGQFL(*PRTWRAP)
ALWMLTTHD(*YES)
Parameters in this SBMJOB command example were set as follows:
The FileSubscriber program, SXF3RSUB, is assumed to be in the library TIBFALIB.
FileSubscriber was submitted with the -config parameter. This causes FileSubscriber to use the configuration file member SUB005 in file INIFSUB. If you omit the parm parameter, FileSubscriber uses the sample configuration file, TIBFALIB/INIFSUB(INIFSUB).
The JOBMSGQFL parameter was set to *PRTWRAP, in case a large number of messages issued to the job message queue.
The ALWMLTTHD parameter must be set to *YES. So that the job can run with multiple user threads.
Using a CL Program
One can fashion a CL program after the CL programs in TIBFASMPRV/QCLSRC to easily submit the FileSubscriber to batch.
Using the QShell Environment
You can also start FileSubscriber interactively in the QShell environment, as follows:
ADDLIBLE TIBFALIB
QSH
cd /usr/tibco/tibfa/TIBFALIB
sxf3rsub -config 'tibfalib/inifsub(sub003)'
 
or
sxf3rsub -service 7500 -daemon hawk400.na.tibco.com:7500 -config 'tibfalib/inifsub(sub003)'
Stopping FilePublisher
An active FilePublisher listens to the following terminate subject:
 
_FILEADAPTER.<adapterName>.TERMINATE
where <adapterName> is the name of the adapter instance as configured in the FilePublisher configuration file. You can stop FilePublisher by sending a terminate message to this terminate subject.
Using the SBMJOB Command
You can use the following SBMJOB command to stop FilePublisher:
 
SBMJOB CMD(CALL PGM(TIBFALIB/SXFTRIGR) PARM('-service' 7500 '-daemon' 'hawk400.na.tibco.com:7500' 'FILEADAPTER.TEST_FILE_PUB.TERMINATE' 'any message')) ALWMLTTHD(*YES)
Using the QShell Environment
You can also stop FilePublisher interactively in the QShell environment, as follows:
ADDLIBLE TIBFALIB
QSH
cd /usr/tibco/tibfa/TIBFALIB
sxftrigr -service 7500 -daemon hawk400.na.tibco.com:7500 _FILEADAPTER.TEST_FILE_PUB.TERMINATE 'any message'
 
 
Stopping FileSubscriber
An active FileSubscriber listens to the following terminate subject:
_FILEADAPTER.<adapterName>.TERMINATE
where <adapterName> is the name of the adapter instance as configured in the FileSubscriber configuration file. You can stop FileSubscriber by sending a terminate message to this subject.
Using the SBMJOB Command
You can use the following SBMJOB command to stop FileSubscriber:
SBMJOB CMD(CALL PGM(TIBFALIB/SXFTRIGR) PARM('-service' 7500 '-daemon' 'hawk400.na.tibco.com:7500' 'FILEADAPTER.TEST_FILE_SUB.TERMINATE' 'any message')) ALWMLTTHD(*YES)
Using the QShell Environment
You can also stop FileSubscriber interactively in the QShell environment, as follows:
ADDLIBLE TIBFALIB
QSH
cd /usr/tibco/tibfa/TIBFALIB
sxftrigr -service 7500 -daemon hawk400.na.tibco.com:7500 _FILEADAPTER.TEST_FILE_SUB.TERMINATE 'any message'

Copyright © TIBCO Software Inc. All rights reserved
Copyright © TIBCO Software Inc. All rights reserved