Submit Data Base Jobs (SBMDBJOB)

The Submit Database Jobs (SBMDBJOB) command allows you to submit jobs to job queues so they can be run as batch jobs. The input stream is read either from a physical database file or from a logical database file that has a single-record format. This command allows you to specify the name of this database file and its member, the name of the job queue to be used, and to decide 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 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.

Parameters

Keyword Description Choices Notes
FILE Data base file Qualified object name Required, Positional 1
Qualifier 1: Data base file Name
Qualifier 2: Library Name, *LIBL, *CURLIB
MBR Member Name, *FIRST Optional, Positional 2
JOBQ Job queue Qualified object name Optional, Positional 3
Qualifier 1: Job queue Name, QBATCH
Qualifier 2: Library Name, *LIBL, *CURLIB
DSPSBMJOB Show on submitted job list *YES, *NO Optional

Data base file (FILE)

Specifies the database file from which the input stream is read.

This is a required parameter.

Qualifier 1: Data base file

name
Specify the name of the database file that contains the input stream that you want to read.

Qualifier 2: Library

*LIBL
All libraries in the library list for the current thread are searched until the first match is found.
*CURLIB
The current library for the job is used to locate the file. If no current library entry exists in the library list, QGPL is used.
name
Specify the name of the library where the file is located.

Member (MBR)

Specifies the member in the specified file that contains the input stream to be read.

*FIRST
No member name is specified; the first member in the file is used.
name
Specify the name of the member that contains the input stream to read.

Job queue (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 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.

Qualifier 1: Job queue

QBATCH
The job entry is to be placed on the QBATCH job queue, which is the default job queue. This will happen if *RDR is specified on the Job queue (JOBQ) parameter of the Batch Job (BCHJOB) command. The Batch Job (BCHJOB) command is contained in the input stream itself.
name
Specify the name of the job queue to which each job in the input stream will be sent. This will happen if *RDR is specified on the JOBQ parameter of the Batch Job (BCHJOB) command.

Qualifier 2: Library

*LIBL
All libraries in the library list for the current thread are searched until the first match is found.
*CURLIB
The current library for the job is used to locate the job queue.
name
Specify the name of the library where the job queue is located.

Show on submitted job list (DSPSBMJOB)

Specifies whether the jobs being submitted are displayed on the submitted jobs display. If *YES is specified here, these submitted jobs can be displayed when the Work with Submitted Jobs (WRKSBMJOB) command is used.

*YES
This job can be displayed by the Work with Submitted Jobs (WRKSBMJOB) command.
*NO
This job is not displayed on any display produced by the Work with Submitted Jobs (WRKSBMJOB) command.

Examples

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

*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.

*STATUS Messages

CPF1762
Reading job &3/&2/&1.