Automic Workload Automation

Is it possible to assign a subsystem to the AS 400 Agent?

  • 1.  Is it possible to assign a subsystem to the AS 400 Agent?

    Posted Feb 27, 2017 05:48 AM

    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.


    dy2l7aahczf7.pnghttps://us.v-cdn.net/5019921/uploads/editor/n9/dy2l7aahczf7.png" width="578">


    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.

    xh70ebtnqmjw.pnghttps://us.v-cdn.net/5019921/uploads/editor/5a/xh70ebtnqmjw.png" width="575">


    More details about use and syntax ofSBMJOB can be retrievedhere on the IPM portal.

     

    By changing 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.

    9py0mzbf26vw.pnghttps://us.v-cdn.net/5019921/uploads/editor/qu/9py0mzbf26vw.png" width="571">


    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.