Submit Job (SBMJOB) in AS400

Submit Job (SBMJOB) in AS400
Submit Job (SBMJOB) in AS400, Job related commands,SBMJOB, Job in as400, job, batch job, submitted jobs in as400, ibmi, introduction, about, what
Submit Job (SBMJOB) in AS400

SBMJOB

The Submit Job (SBMJOB) command allows an already running job to submit another job to a batch job queue (JOBQ) to be run later as a batch job

We need to specify JOB description (JOBD), CL command or request data, routing data to run a program.

To run single CL command in a batch job using the CMD parameter on SBMJOB and it also does syntax checking and allows prompting.

Submitting a Batch Job

Below command submits the batch job named TESTJOB, Most of the attributes of the job would be taken from the Job description (JOBD) named EASYCLASS in library EASYCLASS1, Output queue (OUTQ) used would be EASYCLASS, and message queue (MSGQ) used would be EASYCLASS.

The Job will be submitted to the JOBDs job queue and JOBDs associated with JOBQ is EASYCLASS.

SBMJOB CMD(CALL PGM(TESTPGM1))      
       JOB(TESTJOB)                 
       JOBD(EASYCLASS1/EASYCLASS)   
       JOBQ(*JOBD)                  
       OUTQ(EASYCLASS)              
       MSGQ(EASYCLASS)              

DSPJOBD EASYCLASS

                           Display Job Description              
                                                            Syst
Job description:   EASYCLASS      Library:   QGPL               
                                                                
User profile . . . . . . . . . . . . . . . . . . :   *RQD       
CL syntax check  . . . . . . . . . . . . . . . . :   20         
Hold on job queue  . . . . . . . . . . . . . . . :   *NO        
End severity . . . . . . . . . . . . . . . . . . :   30         
Job date . . . . . . . . . . . . . . . . . . . . :   *SYSVAL    
Job switches . . . . . . . . . . . . . . . . . . :   00000000   
Inquiry message reply  . . . . . . . . . . . . . :   *RQD       
Job priority (on job queue)  . . . . . . . . . . :   5          
Job queue  . . . . . . . . . . . . . . . . . . . :   EASYCLASS  
  Library  . . . . . . . . . . . . . . . . . . . :     QGPL     
Output priority (on output queue)  . . . . . . . :   5          
Printer device . . . . . . . . . . . . . . . . . :   *USRPRF    
Output queue . . . . . . . . . . . . . . . . . . :   *USRPRF    
  Library  . . . . . . . . . . . . . . . . . . . :              
                                                                

Submitting a Batch Job to a Job Queue (JOBQ)

The below command submits the batch job named TESTJOB to a Job queue named EASYCLASS.

SBMJOB CMD(CALL PGM(TESTPGM1))      
       JOB(TESTJOB)                 
       JOBD(EASYCLASS1/EASYCLASS)   
       JOBQ(EASYCLASS)                  
       OUTQ(EASYCLASS)              
       MSGQ(EASYCLASS)              

Related Post

Post a Comment

© AS400 and SQL Tricks. All rights reserved. Developed by Jago Desain