Print AFP Data (PRTAFPDTA)

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

The Print Advanced Function Printer Data (PRTAFPDTA) command prints output received from a System/370 host. This command allows the user to specify the file being printed and the parameters used to control the print operation.

Top

Parameters

Keyword Description Choices Notes
FILE File Qualified object name Required, Positional 1
Qualifier 1: File Name
Qualifier 2: Library Name, *LIBL, *CURLIB
MBR Member Name, *FIRST Optional
DEV Print device Name, *JOB, *SYSVAL Optional
FORMDF Form definition Single values: *DEVD, *INLINE
Other values: Qualified object name
Optional
Qualifier 1: Form definition Name
Qualifier 2: Library Name, *LIBL, *CURLIB
COPIES Number of copies 1-255, 1 Optional
STRPAGE Starting page Integer, 1 Optional
ENDPAGE Ending page Integer, *END Optional
FIDELITY Print fidelity *ABSOLUTE, *CONTENT Optional
Top

File (FILE)

Specifies the Advanced Function Printing Data Stream (AFPDS) file to be printed. Only physical files are supported for this command. If you use the Override with Printer File (OVRPRTF) command with PRTAFPDTA, do not override the device type (DEVTYPE parameter).

This is a required parameter.

Qualifier 1: File

name
Specify the name of the AFPDS to be printed.

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 file. If no library is specified as the current library for the job, the QGPL library is used.
name
Specify the name of the library to be searched.
Top

Member (MBR)

Specifies the member that contains the data to be printed.

*FIRST
The first member in the database file is used.
name
Specify the name of the file member that contains the data to be printed.
Top

Print device (DEV)

Specifies the printer that prints the file.

*JOB
The printer device specified in the job description is used.
*SYSVAL
The value specified in the system value QPRTDEV is used.
name
Specify the name of the printer device.
Top

Form definition (FORMDF)

Specifies the form definition to use when printing the file. A form definition is a resource object that defines the characteristics of the form such as: overlays, position of page data on the form, number of copies of pages, and modification to pages. The form definition is located inline with the file being printed, or in a library.

Single values

*DEVD
The device description obtains the name of the form definition being used. If no value is specified, *DEVD is assumed.
*INLINE
The form definition that is inline with the printer file is used.

Qualifier 1: Form definition

name
Specify the name of the form definition that must exist in the library named. A maximum of 8 characters can be used.

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 searched. If no library is specified as the current library for the job, the QGPL library is used.
name
Specify the name of the library to be searched.
Top

Number of copies (COPIES)

Specifies, for spooled files, the number of copies being printed.

1
One copy of the output is printed.
1-255
Specify the number of copies that are to be printed.
Top

Starting page (STRPAGE)

Specifies the page on which printing starts. This parameter is used for partial printing of a file.

1
Printing starts on page 1. If the start page is not specified, 1 is assumed.
integer
Specify the page number on which printing starts.
Top

Ending page (ENDPAGE)

Specifies the page on which printing ends. This parameter is used for partial printing of a file ending at a specified page number. If both the start page and the end page are specified, the end page must be greater than or equal to the start page. Specifying an end page beyond the end of the actual file does not create an error condition.

*END
Printing concludes at the end of the file.
integer
Specify the page number on which printing ends.
Top

Print fidelity (FIDELITY)

Specifies the degree of exactness required when printing the file.

*ABSOLUTE
The job is printed only if the file can be printed exactly as specified by the data stream and external controls.
*CONTENT
Prints the file using all available exception handling.
Top

Examples

Example 1: Printing Specific Pages

PRTAFPDTA   FILE(MYLIB/MYFILE)  STRPAGE(2)  ENDPAGE(6)

This command prints the first member in file MYFILE in library MYLIB starting with page 2 and ending on page 6.

Example 2: Printing Using All Available Exception Handling

PRTAFPDTA   FILE(MYLIB/MYFILE)  FORMDF(F10101)  FIDELITY(*CONTENT)

This command prints the first member in file MYFILE in library MYLIB using a form definition of F10101 and all available exception handling.

Top

Error messages

*ESCAPE Messages

CPF511B
Data stream not correct for record &2 in file &1.
PQT4001
Data stream not valid in structured field &2 in file &1.
PQT4003
Form definition &2 not found in library.
PQT4004
Starting page number &1 greater than ending page number &2.
PQT4006
Unable to process file &1 because of variable length fields.
PQT4007
Data stream not valid in file &1.
Top