Print Report from OnDemand (PRTRPTOND)

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

The Print Report from OnDemand (PRTRPTOND) command prints the specified report in its entirety.

Top

Parameters

Keyword Description Choices Notes
APPGRP Application group Character value Required, Positional 1
RPTID Report ID Character value Required, Positional 2
PRINTER Printer Name, *OUTQ Required, Positional 3
OUTQ Output queue Single values: *JOB
Other values: Qualified object name
Optional
Qualifier 1: Output queue Name
Qualifier 2: Library Name, *LIBL, *CURLIB
INSTANCE Instance Character value, QUSROND Optional
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, QOND400
Qualifier 2: Library Name, QRDARS, *LIBL, *CURLIB
Top

Application group (APPGRP)

Specifies the name of the application group that contains the report to be printed.

This is a required parameter.

Note: If you press the F4 key for this parameter while prompting the command, a list of the valid entries is presented to you. The entries listed may not be valid if the parameter INSTANCE is not QUSROND.

If the value to be entered contains lower case letters, blanks, or special characters, it must be enclosed in apostrophes.

Top

Report ID (RPTID)

Specifies the report ID of the report to be printed.

The report ID is in the form of "1220-1-0-8FAA-9939-9345", where the "1220" is the internal application group identifier, "1" is the primary storage node, "0" is the secondary storage node, "8FAA" is a counter, "9339" is the first (internal) date in the report file and "9345" is the last (internal) date in the report file. The report ID is also known as the load ID.

Note: The report id can be found in the system log file.

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. This output queue must be defined as a printer within the OnDemand instance.

Single values

*JOB
The output queue associated with this job receives the spooled report.

Qualifier 1: 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

Instance (INSTANCE)

Specifies the name of the instance to use.

QUSROND
The default OnDemand instance is used.
instance-name
Specify the name of the instance that is to be used. By definition, the instance must be on the system that the command is run.
library-server-name
Specify the TCP/IP host name of the library server. The name can also be specified as a TCP/IP dotted decimal address in the form of nnn.nnn.nnn.nnn.

When a server name or TCP/IP address is entered, OnDemand uses the instance on that server that is using the default port. In most cases, this will also use the default instance.

Top

Number of copies (COPIES)

Specifies the number of copies to print.

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

QOND400
The QOND400 job description is used as the job description for the submitted job.
name
Specify the name (name/name) of the job description used for the job.

Qualifier 2: Library

QRDARS
Library QRDARS is used as the job description's 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

PRTRPTOND APPGRP(CHECKSTMTS) RPTID('1220-1-0-8FAA-9939-9345')
            PRINTER(*OUTQ) OUTQ(QGPL/PRT01)

This command submits a job to batch to reprint a spooled file from the OnDemand Common Server application group called CHECKSTMTS with a load id (also known as report id) as shown. The command assumes the archived data is stored in the QUSROND instance since no instance name was specified. The reprinted output is directed to the PRT01 output queue.

Example 2: More Complex Example

PRTRPTOND APPGRP(CHECKSTMTS) RPTID('1220-1-0-8FAA-9939-9345')
            PRINTER(*OUTQ)OUTQ(QGPL/PRT01) INSTANCE(ACCTING)
            SBMJOB(*NO)

This command is similar to Example 1 but runs interactively and specifies an instance name.

Top

Error messages

*ESCAPE Messages

CPF1338
Errors occurred on SBMJOB command.
OND0251
PRTRPTOND ended in error. The report was not printed.
Top