Learn how to execute commands in batch using SBMJOB in this excerpt from the MC Press book Control Language Programming for IBM i.
Written by Jim Buck, Bryan Myers, and Dan Riehl
The SBMJOB (Submit Job) CL command lets you submit a batch job to a job queue. This command has many parameters, but in its simplest form it is expressed as follows:
SBMJOB CMD(CL-command)
Once you have submitted a batch job, you are allowed little or no interaction with the job. For example, a batch job normally does not display a screen on your workstation and wait for your input. You can, however, monitor the progress of your batch job using the WRKSBMJOB (Work with Submitted Jobs) command. Batch processing typically is used for long-running jobs that require no workstation input, such as those that produce printed reports or process many transactions. A batch job is entirely separate from the job that submitted it, with its own call stack and its own main storage requirements.