AS400 jobs (Batch job detailed) - skill-at/AS-400-Training GitHub Wiki
A ### job is a piece of work that is done on AS400. Job name is composed of Job Number/User/Job Name.
The Work with Job (WRKJOB) command allows you to work with or change the following information concerning a user job: Job status attributes. Job definition attributes. Job run attributes.
WRKJOB JOB(677342/SKUMAR/ORDPROC)
Interactive jobs in AS400?
It requires user to be always interactive/signed in till the time job runs. It doesn’t wait in line for system resources.
Batch job.
Batch job is a predefined group of processing actions submitted to the system to be performed with little or no interaction between the user and the system. Jobs that do not require user interaction to run can be processed as batch jobs. A batch job typically is a low priority job and can require a special system environment in which to run. Batch jobs run in the system background, freeing the user who submitted the job to do other work. Several batch jobs can be active at the same time.
Flow of a Batch Job
SBMJOB command is run to start the batch job. Goes to Job Queue and waits for its turn with status JOBQ Become ACTIVE when its turns come/enters subsystem Goes to Output Queue (OUTQ) after getting finished. Spool file Moves to Print Writer Prints out on Printer
Job description:
It is AS400 object of type *JOBD
Contains a specific set of job related attributes. Attributes determine how each job is run on the system. Values in the Job Description can be overridden during the run of commands SMBJOB • Can specify: Initial library list Job Queue Job Priority: of jobs using this job description. Output Queue
Job queue :Whenever a batch job is submitted it goes to the place so called Job Queue where it waits for its turn to get processed based on its priority. This priority is called as job priority.
Values for job priority are from 1 to 9 , 1 being highest and 9 being lowest
Output Queue
Output queue contains spool files waiting for its turn to get printed. This is based on output priority 1 being highest and 9 being lowest
Run priority
This is priority which job uses when it is active
Specifies the run priority for the job. Run priority is a value,
ranging from 1 (highest priority) through 99 (lowest priority), that represents the priority at which the job competes for the processing unit relative to other jobs that are active at the same time.
Subsystem :
The subsystem is the work place for jobs on your system. All user work is done by jobs running in the subsystem and it is important to monitor this area for slow work performance.
Object types :- *sbsd (subsystem description) command : WRKSBSD SUBSYSTEME NAME *jobq (Job queue) command : WRKJOBQ JOBQUEUE NAME *outq Command : wrkoutq outq name