Running the Listener in a dedicated subsystem
| Date: | Archived |
|---|---|
| Product/Release: | LANSA for Windows, LANSA Open, LANSA Client, using TCP/IP |
| Abstract: | By default, the listener job will run in the subsystems determined by the job description of the user starting the listener. You can, however, create a subsystem to run the listener(s) in. |
| Submitted By: | N/A |
Description:
The main advantage of running the listener in a dedicated subsystem is that you can configure it as a autostart job in the subsystem. If the subsystem is also added to the AS/400 startup program (OSTRUP by default), you don't have to worry about starting the listener before starting a communications session: if the AS/400 is up, the listener will be as well.
The following set of AS/400 commands show you exactly what needs to be done in order to have the listener running in its "own" subsystem (assuming TCP/IP has already been configured on the AS/400). The parameters specified in these commands are the minimum necessary. The libraries names, object names, etc. in italic are arbitrary, so please change as desired.
Create an OUTQ:
CRTOUTQ OUTQ(QGPL/LCO_OUTQ)
Create a JOBQ:
CRTJOBQ JOBQ(QGPL/LCO_JOBQ)
Create a class:
CRTCLS CLS(QGPL/LCO_CLS) RUNPTY(50)
Create a job description:
CRTJOBD JOBD(QGPL/STRLISTEN) JOBQ(QGPL/LCO_JOBQ) USER(QOTHPRDOWN)
RQSDTA('LANSA REQUEST(STRLISTEN)') INLLIBL(QTEMP QGPL DC@PGMLIB)
LOG(4 0 *SECLVL)
Create the new subsystem and add auto start, job queue and routing entries:
CRTSBSD SBSD(QGPL/LCO_SBS) POOLS((1 *BASE))
ADDAJE SBSD(QGPL/LCO_SBS) JOB(LCOLIST) JOBD(STRLISTEN)
ADDJOBQE SBSD(QGPL/LCO_SBS) JOBQ(QGPL/LCO_JOBQ) MAXACT(20)
ADDRTGE SBSD(QGPL/LCO_SBS) SEQNBR(10) CMPVAL(*ANY)
PGM(QSYS/QCMD)CLS(QGPL/LCO_CLS)Modify
the Initial startup program to start the new subsystem (please keep a copy of the original program before modifying it).