Start Data Base Reader (STRDBRDR)

Where allowed to run: All environments (*ALL)
Threadsafe: No
Parameters
Examples
Error messages

The Start Database Reader (STRDBRDR) command starts a spooling reader using a database file; the reader reads a batch input stream from the database and places the jobs onto one or more job queues. This command specifies the name of the database file and member from which the input stream is read, the name of the reader, and the names of the job queue and message queue that are used.

More than one reader can be active at the same time (as determined by the spooled subsystem description). Each database reader must have a unique reader name, and the specified file or member must be available. The reader can also be held or canceled by using the Hold Reader (HLDRDR) command or End Reader (ENDRDR) command.

Because each reader runs independently of the job that started it, the user can continue doing other work on the system after he has started a reader.

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.

Top

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
Qualifier 1: Job queue Name, QBATCH
Qualifier 2: Library Name, *LIBL, *CURLIB
MSGQ Queue for reader messages Single values: *REQUESTER
Other values: Qualified object name
Optional
Qualifier 1: Queue for reader messages Name, QSYSOPR
Qualifier 2: Library Name, *LIBL, *CURLIB
RDR Reader Name, *FILE Optional
Top

Data base file (FILE)

Specifies the database file from which the input stream is to be read. The file must be available for allocation to the spooling reader before the reader can be started.

This is a required parameter.

Qualifier 1: Data base file

name
Specify the name of the file that contains the input stream read by the reader.

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.
name
Specify the name of the library where the file is located.
Top

Member (MBR)

Specifies the member in the specified file that contains the input stream.

*FIRST
The first member in the file is used.
name
Specify the name of the member that contains the input stream to be read.
Top

Job queue (JOBQ)

Specifies the job queue where the spooling reader will place entries. This value is used if *RDR is specified on the Job queue (JOBQ) parameter of the Batch Job (BCHJOB) command. (Note that the job queue for each job within this input stream can be different.)

Qualifier 1: Job queue

QBATCH
The job entry is placed on the QBATCH job queue.
name
Specify the name of the job queue to be used by this reader.

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

Queue for reader messages (MSGQ)

Specifies the message queue that will receive any messages that are created by the reader.

Single values

*REQUESTER
The messages are to be sent to the workstation message queue of the workstation of the user who started this reader. If this value is used in a batch job, the message is changed to the system operator's message queue (QSYSOPR).

Qualifier 1: Queue for reader messages

QSYSOPR
The messages are sent to the system operator's message queue (QSYSOPR).
name
Specify the name of the message queue that you want to receive any messages.

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 message queue. If no current library entry exists in the library list, QGPL is used.
name
Specify the name of the library where the message queue is located.
Top

Reader (RDR)

Specifies the reader to be started. Each reader name must be unique.

*FILE
The name of the reader is the same as the name of the database file that is specified on the Data base file (FILE) parameter.
name
Specify the name that identifies the reader to be started.
Top

Examples

STRDBRDR   FILE(QGPL/BILLING)

This command starts a spooled reader that reads its input from the database file named BILLING, which is in the QGPL library. The reader name is also BILLING because the RDR parameter was not specified. The first member in the BILLING file contains the input stream to be processed. The default job queue QBATCH and the system-supplied system operator's message queue QSYSOPR are used by the database reader.

Top

Error messages

*ESCAPE Messages

CPF1338
Errors occurred on SBMJOB command.
CPF2207
Not authorized to use object &1 in library &3 type *&2.
CPF3301
Reader &1 already started.
CPF3307
Job queue &1 in &2 not found.
CPF3330
Necessary resource not available.
CPF3362
Objects in QTEMP not valid for parameter values.
CPF3363
Message queue &1 in library &2 not found.
CPF3364
File &1 in library &2 not database file or DDM file.
CPF9812
File &1 in library &2 not found.
CPF9815
Member &5 file &2 in library &3 not found.
Top