Print Report for OnDemand (PRTRPTRDAR)

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

The Print Report for OnDemand (PRTRPTRDAR) command prints the specified report in its entirety.

Top

Parameters

Keyword Description Choices Notes
REPORT Report name Character value Required, Positional 1
VERSION Version 1-99 Required, Positional 2
RPTDATE Report date Character value Required, Positional 3
RPTSEQ Report sequence number 1-999 Required, Positional 4
PRINTER Printer Name, *OUTQ Required, Positional 5
OUTQ Output queue Single values: *JOB
Other values: Qualified object name
Optional
Qualifier 1: Output queue Name
Qualifier 2: Library Name, *LIBL, *CURLIB
COPIES Number of copies 1-255, 1 Optional
PAGERANGE Page range to print Single values: *ENDPAGE
Other values: Element list
Optional
Element 1: Starting page Integer, 1
Element 2: Ending page Integer, *END
SBMJOB Submit to batch *YES, *NO Optional
JOBD Job description Qualified object name Optional
Qualifier 1: Job description Name, QRDARS400
Qualifier 2: Library Name, *LIBL, *CURLIB
Top

Report name (REPORT)

Specifies the name of the report to print.

This is a required parameter.

Note: If you press the F4 key for this parameter while prompting the command, a list of all the valid entries is presented to you.

Top

Version (VERSION)

Specifies which version of the report should be printed. This value must be between 01 and 99.

This is a required parameter.

Top

Report date (RPTDATE)

The report date can be found in the QPRLRCDS printer file from STRCDSRDAR or on the OnDemand displays which show the report date for a given report.

Specify a date using the format YYYYMMDD where YYYY represents the year, MM the month, and DD the day. Do not use any type of special characters to separate year, month, and day values.

This is a required parameter.

Top

Sequence number (RPTSEQ)

Specifies the report sequence number for the report to be printed. This value must be between 001 and 999.

This is a required parameter.

Top

Printer (PRINTER)

Specifies where the report should be printed.

*OUTQ
The report is spooled to the output queue specified on the OUTQ parameter.
device-name
Specify the name of the device that is used to print the report.

This is a required parameter.

Top

Output queue (OUTQ)

Specify the qualified name of the output queue that is used to receive the spooled report.

Qualifier 1: Output queue

*JOB
The output queue associated with this job receives the spooled report.
output-queue-name
Specify the name of the output queue to use.

Qualifier 2: Library

*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 where the output queue is located. If no library is specified as the current library for the job, QGPL is used.
name
Specify the name of the library where the output queue is located.
Top

Number of copies (COPIES)

Specifies the number of copies to print or fax.

Top

Page range to print (PAGERANGE)

Specifies the starting and ending pages to print.

Element 1: Starting page

1
Start at page 1 of the report.
*ENDPAGE
Prints only the last page.
starting-page-number
Specify the starting page to print.

Element 2: Ending page

*END
Printing continues until the last page is printed.
ending-page-number
Specify the last page to print.
Top

Submit to batch (SBMJOB)

Specify if you want to print this report in this current job or in a batch job.

*YES
This command should be submitted to run in a different job.
*NO
This command should be run within the current job. If you are entering this command from a terminal, this will prevent you from doing any other work from this terminal session until this command completes.
Top

Job description (JOBD)

Specifies the name of the job description used for the submitted job.

Qualifier 1: Job description

QRDARS400
The QRDARS400 job description is used as the job description for the submitted job.
name
Specify the name of the job description used for the job.

Qualifier 2: Library

*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 used to locate the job description name. If no library is specified as the current library for the job, QGPL is used.
name
Specify the name of the library where the job description name is located.
Top

Examples

Example 1: Simple Example

PRTRPTRDAR REPORT(CHECKSTMTS) VERSION(01) RPTDATE(20020101)
             RPTSEQ(001)PRINTER(*OUTQ) OUTQ(QGPL/PRT01)

This command submits a job to batch to reprint a spooled file from the OnDemand Spool File Archive report definition called CHECKSTMTS with a Version, Date, and Sequence number as shown. The reprinted output is directed to the PRT01 output queue. Note that the output queue specified must be defined as a printer within the OnDemand instance.

Example 2: More Complex Example

PRTRPTRDAR REPORT(CHECKSTMTS) VERSION(01) RPTDATE(20020101)
             RPTSEQ(001)PRINTER(*OUTQ) OUTQ(QGPL/PRT01)
             SBMJOB(*NO)

This command is similar to Example 1 but runs interactively.

Top

Error messages

*ESCAPE Messages

RDR0168
Error was detected for Report &1/&2/&3.&4. The report was not printed.
Top