The AS400 Agent can be started and stopped by commands STRUCAGENT or ENDUCAGENT. Documentation to the use of this instruction can be found here.Actually the STRUCAGENT is referencing the job description UC4AGENT which is an object belonging to the agent library.
WhenSTRUCAGENT submits the agent program as a job in batch mode withSBMJOB command,SBMJOB will refer to this job description (JOBD object).
SBMJOB CMD(***) JOB(UC4AGENT) JOBD([Agent LIBRARY]/UC4AGENT)
Per default the Job DescriptionLIBRARY/UC4AGENT points on the QBATCHjob queue from theQBATCH subsystem.
More details about use and syntax ofSBMJOB can be retrievedhere on the IPM portal.
the following attributes of that Job Description object you can assign a another Job Queue.
Job queue . . . . . . . . . . . ______ Name, *SAME
Library . . . . . . . . . . . _______ Name, *LIBL, *CURLIB
Please remember that subsystem (object type SBSD) always belong to a library. For instance,QBATCH subsystem is part of the system libraryQSYS, but the job description belongs toQGPL.
As job queues are always assigned to a sub system, the agent
can be started that way in any Subsystem according the system needs.Thus the agent will be controllable, that means startable or stoppable from any particular Subsystem of your choice.