How a batch job starts in AS400 |
How does a batch job start
When a user submits a batch job the job retrieves some information before getting placed in the Job queue (JOBQ).
- A user submits a job using the command SBMJOB.
- The Job looks for the job attributes. If the job attributes are not found on the SBMJOB command, the job looks that in the Job description (JOBD) specified on the SBMJOB command.
- Once the Job retrieves all the attributes of the job and placed it on the job queue (JOBQ) where the job resided and waiting for its turn to get processed.
- When the subsystem is ready to process a job, it looks for the jobs in the job queue (JOBQ) allocated to the subsystem.
- The subsystem then checks for the Job description (JOBD) for the routing data.
- The subsystem finds routing entries by using routing data.
- The routing program is run and it runs the command specified on the CMD or RQSDTA parameter.
The flow of a Batch Job
- SBMJOB command submits the batch job.
- The job goes to Job queue with status JOBQ and waits for its turn to be processed by the batch subsystem.
- Job picked from Job queue by the subsystem and becomes ACTIVE status means it's running.
- Once the job gets finished it goes to the output queue (OUTQ) and it moves to printer writer where the spool gets printed.
Related Post
AS400 Jobs :
- AS400 Jobs
- Work with Job (WRKJOB) in AS400
- Work with Spooled Files (WRKSPLF) in AS400
- Submit Job (SBMJOB) in AS400
- Job Log in AS400
- Work with Active Jobs (WRKACTJOB) in AS400
- Work with User Jobs (WRKUSRJOB) in AS400
- Work with Submitted Jobs (WRKSBMJOB) in AS400
- HLDJOB, RLSJOB and ENDJOB in AS400
- Display Job Log (DSPJOBLOG) in AS400
- Job Status in AS400
- Sign Off (SIGNOFF) in AS400