SBMDBJOB (Submit Database Jobs)
SBMDBJOB Command syntax diagram
Purpose
The Submit Database Jobs (SBMDBJOB) command allows a job that is running to submit other jobs to job queues to be run as batch jobs. The input stream is read either from a physical database file or from a logical database file in single-record format. This command specifies the name of the database file and member from which the jobs are read, the name of the job queue to be used if the Batch Job (BCHJOB) command has JOBQ(*RDR) specified, and whether jobs being submitted can be displayed by the Work with Submitted Jobs (WRKSBMJOB) command.
A Submit Database Jobs operation reads the file once and ends when the end-of-file is read or when an End Input (ENDINP) command (a delimiter) is encountered. The ENDINP command (a delimiter) is not recognized if it is within an inline file that ends with characters that are not default ending characters (as specified in the ENDCHAR parameter of the Data (DATA) command). The SBMDBJOB operation can be canceled either by canceling the request from the system request menu or by canceling the job in which the process is running.
In contrast to a spool reader started with the Start Database Reader (STRDBRDR) command, the SBMDBJOB command operates in the same process as the requesting function and does not do syntax checking on the input stream.
Restriction: The specified database file either must consist of single-field records and must have an arrival sequence access path, or it must be a standard database source file.
Required Parameters
- FILE
- Specifies the name of the database file from which the input stream is read.
The name of the file can be qualified by one of the following library values:
*LIBL: All libraries in the job's library list are searched until the first match is found.
*CURLIB: The current library for the job is searched. If no library is specified as the current library for the job, the QGPL library is used.
library-name: Specify the name of the library to be searched.
database-file-name: Specify the name of the database file.
Optional Parameters
- MBR
- Specifies the name of the member in the specified file that contains the input stream being read.
*FIRST: The first member in the database file is used.
file-member-name: Specify the name of the member that contains the input stream being read.
- JOBQ
- Specifies the job queue on which the job entries are placed. A job entry is placed on this queue for each job in the input stream that has JOBQ(*RDR) specified on the Batch Job (BCHJOB) command. If *RDR is not specified on the BCHJOB command, the job queue specified on the BCHJOB command or in the job description is used. (The job queue for each job in the input stream can be different.) This parameter is valid only if ACTION(*SUBMIT) is specified on this command, in the existing network job entry, or in a subsequent Change Network Job Entry (CHGNETJOBE) command.
Note: If both the user identified in the job description of the job being read and the user processing the Submit Database Job (SBMDBJOB) command are not authorized to the job queue on which the job should be placed, the job ends and a diagnostic message is placed in the job log. The input stream, continues to be processed, starting with the next job. If either user is authorized to the job queue, the job runs without error. The name of the job queue can be qualified by one of the following library values:
*LIBL: All libraries in the job's library list are searched until the first match is found.
*CURLIB: The current library for the job is searched. If no library is specified as the current library for the job, the QGPL library is used.
library-name: Specify the name of the library to be searched.
QBATCH: The job entry is placed on the QBATCH job queue, which is the default job queue, if JOBQ(*RDR) is specified on the BCHJOB command.
job-queue-name: Specify the name of the job queue to which each job in the job stream is sent if JOBQ(*RDR) is specified on the BCHJOB command.
- DSPSBMJOB
- Specifies whether the jobs being submitted can be displayed on the submitted jobs display. Any submitted job of the type specified by the SBMFROM parameter of the WRKSBMJOB command can be displayed if *YES is specified on this parameter.
*YES: This job can be displayed by the WRKSBMJOB command.
*NO: This job is not displayed on any display produced by the WRKSBMJOB command.
Example for SBMDBJOB
SBMDBJOB FILE(QGPL/BILLING)This command submits jobs using input from the database file named BILLING, which is in the QGPL library. The first member in the BILLING file contains the input stream to be processed. The default system-supplied job queue QBATCH is used.
Error messages for SBMDBJOB
*ESCAPE Messages
- CPF1751
- Error while processing job &3/&2/&1.
- CPF1754
- File &1 in library &2 not database file or DDM file.
- CPF1760
- Submit jobs command not allowed.
- CPF2207
- Not authorized to use object &1 in library &3 type *&2.
- CPF3307
- Job queue &1 in &2 not found.
- CPF3330
- Necessary resource not available.
- CPF3363
- Message queue &1 in library &2 not found.
- CPF9802
- Not authorized to object &2 in &3.
- CPF9812
- File &1 in library &2 not found.
- CPF9815
- Member &5 file &2 in library &3 not found.
- CPF9845
- Error occurred while opening file &1.
- CPF9846
- Error while processing file &1 in library &2.