AS400 system contains several subsystems, each working independently and
performing some specific task.
The job is assigned to a subsystem according to the type of job e.g. one
subsystem may handle all interactive job; other may handle all batch job, some
other may handle communication jobs etc.
Subsystem may also handle different types of job.
Each subsystem has its own runtime attribute that is used by the job to
get itself executed under that environment.
Simple IBM supplied Subsystem configuration:
Interactive, Batch and communication jobs.
QSPL Spool subsystem that supports
QCTL Controlling Subsystem that starts up the
QBATCH Supports Batch jobs.
QCMN Supports all communication jobs.
QSPL Supports reader and writer jobs.
Work with System
% CPU used . .
. . . . . : .4 Auxiliary storage:
capability . . . . : .0
System ASP . . . . . . : 564.5
Elapsed time .
. . . . . : 00:00:01 % system ASP used . . :
Jobs in system
. . . . . : 7158 Total
. . . . . . . . : 564.5 G
addresses . . . . : .041 Current unprotect used : 4676 M
addresses . . . . : .459 Maximum unprotect . . :
(if allowed), press Enter.
Reserved Max -----DB-----
Pool Size (M)
Size (M) Active Fault
Pages Fault Pages
121.97 +++++ .0
.0 3.4 3.4
2 1169.36 3.07
76 .0 .0
3 24.95 .00
9 .0 .0
4 1034.97 .00
63 .0 .0
F5=Refresh F9=Retrieve F10=Restart
status F24=More keys
System pool: A logical division of main memory for
allocation of jobs.
Pool size: Amount of allocated memory to a job.
IBM supplied pools:
*Machine: No user jobs in this pool and is related to OS/400.
*Interact: Pool made for
*Spool: Pool made for printer
*Base: Contains whatever storage
is left. Usually used for Batch and
Related command è STRSBS, ENDSBS, WRKSBS
Ü Procedure to create subsystem
We can create our own subsystem to run our interactive/batch jobs.
We can start or end the subsystem whenever we need without disrupting our
other system jobs that may be running in QINTER/QBATCH.
To create our simple batch subsystem, we
need below elements:
Subsystem description: It describes
the working environment of the subsystem e.g. maximum no. of jobs in the subsystem at a time, storage
capability of the subsystem, pool identifier etc.
Job queue: From which the jobs will be feed to run
in the subsystem.
Class object: It describes the runtime attributes of
jobs entering this subsystem.
Routing entries: It tells the subsystem how to process
Ü Steps of creating the subsystem
ü Create Subsystem
First of all we create subsystem
description as below:
CRTSBSD SBSD (AMINEM/MYSBSD) POOLS ((2 *BASE)) MAXJOBS(2) TEXT('My subsystem description')
Here, the subsystem job will run in pool
2 and will use *BASE for main memory storage. There can maximum of 2 jobs
inside the subsystem at a time.
ü Create Job
Then we create a job queue as below:
CRTJOBQ JOBQ (AMINEM/MYJOBQ)
TEXT('My job queue')
ü Add Job
Queue Entry (ADDJOBQE)
Once the job queue is created, then we attach
the (ADDJOBQE) command, as follows:
ADDJOBQE SBSD (AMINEM/MYSBSD) JOBQ (AMINEM/MYJOBQ) MAXACT (1)
the number of the jobs that can be process at the same time.
ü Create Class
Class defines the run time attribute
e.g. Run priority, Time slice, Default wait time, Maximum temporary storage etc.
ü Add Routing
ADDRTGE SBSD(AMINEM/MYSBSD) SEQNBR(9999) CMPVAL(*ANY) PGM(SYS/QCMD)
Once the subsystem is started it can be
used to submit the job.