Print Document (PRTDOC)
The Print Document (PRTDOC) command permits the user to print a document using the word processing function of OfficeVision.
This command also permits the user to override all print option values that are currently stored with a document. When a document is created, a set of default print options is associated with that document. If the user wants to override one or more of the parameters in this print command, the user must select OPTIONS(*YES) so that the print options appear on the display. When the print options appear, any of the print parameters can be changed. The user can override one or all of the print option parameters with this command.
Restriction: To use this command, you must be signed on as QPGMR, QSYSOPR, QSRV, or QSRVBAS, or have *ALLOBJ authority.
Keyword |
Description |
Choices |
Notes |
DOC |
Document |
Character value, *PRV, *ALL |
Optional, Key, Positional 1 |
FLR |
Folder |
Character value, *PRV |
Optional, Key, Positional 2 |
OPTIONS |
Display print options |
*NO, *YES, *PRTFILE, *OUTFILE |
Optional, Key |
PRTFILE |
Printer file |
Qualified object name |
Optional |
Qualifier 1: Printer file |
Name, QSYSPRT |
Qualifier 2: Library |
Name, *LIBL, *CURLIB |
OUTFILE |
File to receive output |
Single values: *PRV Other values: Qualified object name |
Optional |
Qualifier 1: File to receive output |
Name |
Qualifier 2: Library |
Name, *LIBL, *CURLIB |
OUTMBR |
Output member options |
Element list |
Optional |
Element 1: Member to receive output |
Name, *FIRST, *PRV |
Element 2: Replace or add records |
*REPLACE, *ADD |
CURSTS |
Current status value |
Character value, *PRV, *NOCHK |
Optional |
NEWSTS |
New status value |
Character value, *PRV, *NOCHG |
Optional |
OUTDTATYP |
Type of data for output |
*PRV, *ALL, *IDP |
Optional |
DLTDOC |
Delete document |
*NO, *YES |
Optional |
OUTPUT |
Output device |
*SAME, *PRINT, * |
Optional |
DEV |
Print device |
Name, *SAME, *USRPRF, *SYSVAL, *WRKSTN |
Optional |
OUTQ |
Output queue |
Single values: *SAME, *FILE, *DEV, *WRKSTN Other values: Qualified object name |
Optional |
Qualifier 1: Output queue |
Name |
Qualifier 2: Library |
Name, *LIBL |
SPLFILE |
Output file |
Name, *SAME, *DOC, *FILE |
Optional |
FORMTYPE |
Form type |
Character value, *SAME, *STD |
Optional |
COVERPAGE |
Print separator page |
*SAME, *YES, *NO |
Optional |
PRTQLTY |
Print quality |
*SAME, *LETTER, *TEXT, *DRAFT |
Optional |
COPIES |
Number of copies |
1-99, *SAME |
Optional |
DUPLEX |
Print on both sides |
*SAME, *YES, *NO, *TUMBLE |
Optional |
AUTOBIND |
Automatic page binding |
*SAME, *YES, *NO |
Optional |
HOLD |
Delay printing |
*SAME, *YES, *NO |
Optional |
PRTERRLOG |
Print document error log |
*PRV, *YES, *NO |
Optional |
ERRFORM |
Error log form type |
Character value, *SAME, *STD |
Optional |
LARGEPRINT |
Large print |
*SAME, *YES, *NO |
Optional |
MRGTYPE |
Merge type |
*SAME, *QRY, *DOC, *FILE, *BLANK |
Optional |
QRYDFN |
Query |
Single values: *SAME Other values: Qualified object name |
Optional |
Qualifier 1: Query |
Name |
Qualifier 2: Library |
Name, *LIBL |
DTADOC |
Data document |
Character value, *SAME |
Optional |
DTAFLR |
Data folder |
Character value, *SAME |
Optional |
DTAFILE |
Data file |
Single values: *SAME Other values: Qualified object name |
Optional |
Qualifier 1: Data file |
Name |
Qualifier 2: Library |
Name, *LIBL, *CURLIB |
DTAMBR |
Data member |
Name, *SAME, *FIRST, *FILE, *LAST |
Optional |
MLTLINRPT |
Multiple line report |
*SAME, *YES, *NO |
Optional |
ADJLINES |
Adjust line endings |
*SAME, *YES, *NO |
Optional |
ADJPAGES |
Adjust page endings |
*SAME, *YES, *NO |
Optional |
ALWWIDOW |
Allow widow lines |
*SAME, *YES, *NO |
Optional |
RENUMBER |
Renumber system page numbers |
*SAME, *YES, *NO |
Optional |
PRTCHGSYM |
Print change symbols |
*SAME, *YES, *NO |
Optional |
SYMBOLS |
Change symbols to print |
Character value, *SAME |
Optional |
DRAFTSPACE |
Draft spacing |
*SAME, *YES, *NO |
Optional |
LINNBR |
Print line numbers |
*SAME, *YES, *NO |
Optional |
RESOLVE |
Resolve instructions |
*SAME, *YES, *NO |
Optional |
LEFTSPACES |
Additional spaces to left |
0-99, *SAME |
Optional |
CHRID |
Character identifier |
Element list |
Optional |
Element 1: Graphic character set |
1-9999, *SAME, *BLANK |
Element 2: Code page |
1-9999 |
SAVOUTPUT |
Save resolved output |
*SAME, *YES, *NO |
Optional |
SAVDOC |
Resolved output document |
Character value, *SAME, *BLANK |
Optional |
SAVFLR |
Resolved output folder |
Character value, *SAME, *BLANK |
Optional |
JOBQ |
Place on job queue |
*SAME, *YES, *NO |
Optional |
JOBD |
Job description |
Single values: *SAME Other values: Qualified object name |
Optional |
Qualifier 1: Job description |
Name |
Qualifier 2: Library |
Name, *LIBL |
SNDMSG |
Send completion message |
*SAME, *YES, *NO |
Optional |
CNLERR |
Cancel on error |
*SAME, *YES, *NO |
Optional |
STRPAGE |
Start page |
0.01-9999.99, *FIRST, *LAST, *PAGERANGE, *SAME |
Optional |
ENDPAGE |
End page |
0.01-9999.99, *FIRST, *LAST, *STRPAGE, *PAGERANGE, *SAME |
Optional |
PAGERANGE |
Page ranges |
Single values: *SAME Other values (up to 7 repetitions): Element list |
Optional |
Element 1: Start page |
0.01-9999.99, *FIRST, *LAST |
Element 2: End page |
0.01-9999.99, *FIRST, *LAST, *STRPAGE |
LBLACROSS |
Number of labels across page |
1-99, *SAME |
Optional |
LBLWIDTH |
Width of labels |
2-198, *SAME |
Optional |
SHEETFEED |
Sheet feed labels |
*SAME, *YES, *NO |
Optional |
LBLDOWN |
Number of rows per sheet |
1-99, *SAME |
Optional |
SHFLEFTMAR |
Shift left margin |
*SAME, *YES, *NO |
Optional |
Document (DOC)
Specifies the name of the document that is printed.
- *PRV
- The name used in the previous session is used.
- *ALL
- All documents to which the user is authorized are printed to a database file. This is valid only when the output is directed to an OUTFILE.
- document-name
- Specify the name of the document to be printed.
Folder (FLR)
Specifies the name of the folder that contains the document that is printed.
- *PRV
- The name used in the previous session is used.
- folder-name
- Specify the name of the folder that contains the document being printed.
Display print options (OPTIONS)
Specifies whether the print options for this document are displayed before the document is printed.
- *NO
- The print options are not displayed before the document is printed.
- *YES
- The print options are displayed before the document is printed.
- *PRTFILE
- The print options specified on the Printer file prompt (PRTFILE parameter) are used.
- *OUTFILE
- The document is printed to the database file specified on the File to receive output prompt (OUTFILE parameter).
Printer file (PRTFILE)
Specifies the printer file to use for the print options. This parameter is valid only if *PRTFILE is also specified on the Display print options prompt (OPTIONS parameter).
When *PRTFILE is specified, the following Print Options are overridden by the appropriate values in the printer file:
- DEV (Printer ID)
- PRTQLTY
- OUTQ
- FORM
- COPIES
- HOLD
- DUPLEX
- OUTPUT FILE
- QSYSPRT
- The document is printed using the system printer device file. This value overrides the printer name specified in the print options associated with the document.
- printer-device-file-name
- Specify the name and library of the printer device file that is used for the print document request. This value overrides the printer file name specified in the print options associated with the document.
The possible library values are:
- *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 printer device file. If no library is specified as the current library for the job, QGPL is used.
- library-name
- Specify the name of the library where the printer device file is located.
File to receive output (OUTFILE)
Specifies the name of the database file in which the displayed information is stored. If the specified file does not exist, this command creates a database file and file member. If the file is created, the public authority for the file is the same as the authority specified for the library in which the file is created. Use the Display Library Description (DSPLIBD) command to show the library's create authority. Output to OUTFILE is supported only if *OUTFILE is specified in the Display print options prompt (OPTIONS parameter).
- *PRV
- The library and database file used in the previous (last) PRTDOC request for this user is used.
- data-base-file-name
- Specify the qualified name of the database file in which the resolved document information is stored. If no file is found by that name, a file and member by that name are created and stored in the specified library, or in *CURLIB, if no library is specified.
The possible library values are:
- *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 library is specified as the current library for the job, QGPL is used.
- library-name
- Specify the name of the library where the file is located.
Output member options (OUTMBR)
Specifies the name of the database file member that receives the output of the display.
The possible member to receive output values are:
- *FIRST
- The first member in the file receives the output. If OUTMBR(*FIRST) is specified and the member does not exist, the system creates a member with the name of the file specified for the File to receive output (OUTFILE) parameter. If the member already exists, you have the option to add new records to the end of the existing member or clear the member and then add the new records.
- member-name
- Specify the name of the file member that is to receive the output. If a file member is specified that does not exist, the system creates it.
- *PRV
- The member used in the previous (last) PRTDOC request for this user is used for this request.
The possible replace or add records values are:
- *REPLACE
- The system clears the existing member and adds the new records.
- *ADD
- The system adds the new records to the end of the existing records.
Current status value (CURSTS)
Specifies the value the document Interchange Document Profile (IDP) status field must have before the document may be printed to the database file. This field is 20 characters long and is valid only if OUTFILE output is requested.
- *PRV
- The value used in the previous (last) PRTDOC request for this user is used.
- *NOCHK
- The status field is not checked before printing this document to the database file.
- value
- Specify the value that the status field must equal before the document is printed to the database file.
New status value (NEWSTS)
Specifies the value the document Interchange Document Profile (IDP) status field is set to after the document has been printed to the database file. If a value is specified on the New status value prompt (NEWSTS parameter), you must have at least *CHANGE authorization to the document. This field is 20 characters long and is valid only if OUTFILE output is requested.
- *PRV
- The value used in the previous (last) PRTDOC request for this user is used.
- *NOCHG
- The status field is not changed after printing this document to the database file.
- value
- Specify the value to which the status field is set after the document is printed to the database file.
Type of data for output (OUTDTATYP)
Specifies whether the entire document, or only the Interchange Document Profile (IDP) information, is printed to the database file.
- *PRV
- The value used in the previous (last) PRTDOC request for this user is used.
- *ALL
- The entire document is printed to a database file.
- *IDP
- Only the Interchange Document Profile (IDP) is printed to a database file.
Delete document (DLTDOC)
Specifies whether the document is deleted after it has been printed to the database file.
- *NO
- The document is not deleted after being printed to the database file.
- *YES
- The document is deleted after being printed to the database file.
Note: You must be the owner of the document or have *ALL authority to delete it.
Output device (OUTPUT)
Specifies whether the output from the command is displayed at the requesting work station or printed with the job's spooled output.
- *SAME
- The output device does not change.
- *PRINT
- The output is printed with the job's spooled output.
- *
- Your resolved document is shown on the display. A resolved document is a document with the text instructions processed.
Print device (DEV)
Specifies the name of the printer.
- *SAME
- The printer does not change.
- *USRPRF
- The printer ID specified in your user profile is used to print the document.
- *SYSVAL
- The system printer is used to print the document.
- *WRKSTN
- The printer assigned to the user's work station is used to print the document.
- printer-name
- Specify the name of the printer you want to use to print the document.
Output queue (OUTQ)
Specifies the name of the output queue. It must already exist.
- *SAME
- The output queue does not change.
- *DEV
- The output queue associated with the printer specified on the Print device prompt (DEV parameter) is used.
- *FILE
- The output queue and output queue library values are taken from one of the following:
- If the Printer file prompt (PRTFILE parameter). is specified, values from the specified printer device file are used.
- If the Printer file prompt (PRTFILE parameter). is not specified, values from the Printer File Prompt on the document print options are used.
- *WRKSTN
- The output queue assigned to the user's work station is used.
- output-queue-name
- Specify the name and library of the output queue that holds your output until it is ready to print.
The possible library values are:
- *LIBL
- All libraries in the library list for the current thread are searched until the first match is found.
- library-name
- Specify the name of the library where the output queue is located.
Output file (SPLFILE)
Specifies the name of the output file.
- *SAME
- The output file does not change.
- *FILE
- The output file name is the name of the printer file used.
- *DOC
- The document name is used for the spooled file name. However, if the document name is longer than 10 characters, or contains a period, then the spooled file name is QSYSPRT.
- spool-file-name
- Specify the name of the file in which you want the output stored while it is on the output queue.
Form type (FORMTYPE)
Specifies the type of forms used in the printer.
- *SAME
- The forms type does not change.
- *STD
- The standard printer form for your computer system is used.
- form-type
- Specify the forms type for the type of paper on which the output is printed.
- *BLANK
- No special form type is specified.
Print separator page (COVERPAGE)
Specifies whether a cover page is printed that includes such things as the document name, folder name, document description, subject, reference, and author name.
- *SAME
- The cover page value does not change.
- *YES
- A cover page is printed.
- *NO
- A cover page is not printed.
Print quality (PRTQLTY)
Specifies the type of print quality that is used to print your document.
- *SAME
- The print quality value does not change.
- *LETTER
- Your document is printed in letter quality type.
- *TEXT
- Your document is printed in text quality type. This is better quality than *DRAFT but not as good as *LETTER.
- *DRAFT
- Your document is printed in draft quality type.
Number of copies (COPIES)
Specifies the number of copies of your document you want to print.
- *SAME
- The copies value does not change.
- value
- Specify a number, ranging from 1 through 99, for the number of copies of your document you want to print.
Print on both sides (DUPLEX)
Specifies whether output is printed on one side or two sides of the paper.
- *SAME
- The value does not change.
- *YES
- The output is printed on both sides of the paper, with the top of each printed page at the same end of the sheet of paper.
- *TUMBLE
- The output is printed on both sides of the paper, with the top of one printed page at the opposite end from the top of the other printed page.
- *NO
- The output is printed on one side of the paper.
Automatic page binding (AUTOBIND)
Specifies whether the left and right margins of alternating pages are adjusted to allow for page binding.
- *SAME
- The autobind option does not change.
- *YES
- The margins are adjusted to allow for page binding.
- *NO
- The margins are not adjusted to allow for page binding.
Delay printing (HOLD)
Specifies whether the printing of your documents is put on hold. The documents are held on the output queue, where you can release them to print, or delete them if you do not want them to print. You can print a group of documents together by putting them on the output queue before releasing them to print.
- *SAME
- The hold value does not change.
- *YES
- The printing is delayed for the specified documents.
- *NO
- Your documents begin printing when the printer is ready.
Print document error log (PRTERRLOG)
Specifies whether to include the document error log as part of the information printed with the document.
- *PRV
- The value used in the previous (last) PRTDOC request for this user is used for this request.
- *YES
- The error log is printed to the output device.
- *NO
- The error log is not printed to the output device.
Error log form type (ERRFORM)
Specifies the forms type for the type of paper on which the error log is printed.
- *SAME
- The error form value does not change.
- *STD
- The error log is printed on the paper specified in the printer file for the printer you selected.
- error-form-name
- Specify the name of the forms on which the error log is printed.
- *BLANK
- No special error log form type is specified.
Large print (LARGEPRINT)
Specifies whether your document is printed using large print.
- *SAME
- The large print value does not change.
- *YES
- Your document is printed using large print.
- *NO
- Your document is not printed using large print.
Merge type (MRGTYPE)
Specifies where data being merged is stored.
- *SAME
- The merge source does not change.
- *QRY
- Data requested in a query is merged. A query is a request to select and copy one or more records from a file based on defined conditions.
- *DOC
- Data stored in a document is merged.
- *FILE
- Data stored in a file is merged.
- *BLANK
- No data will be merged.
Query (QRYDFN)
Specifies the name of the query that is run to pass the data being merged. A query is a request to select and copy one or more records from a file based on defined conditions. *QRY must be specified on the Merge type prompt (MRGTYPE parameter)..
- *SAME
- The query name does not change.
- query-definition-name
- Specify the name of the query that is used to move the data being merged.
The possible library values are:
- *LIBL
- All libraries in the library list for the current thread are searched until the first match is found.
- library-name
- Specify the name of the library where the query is located.
Data document (DTADOC)
Specifies the name of the document that contains the data being merged. *DOC must be specified on the Merge type prompt (MRGTYPE parameter).
- *SAME
- The document name does not change.
- document-name
- Specify the name of the document using 1 to 12 alphanumeric characters. If you use more than 8 characters, the ninth character must be a period (.) followed by a 1- to 3-character extension.
Data folder (DTAFLR)
Specifies the name of the folder that contains the document being merged. *DOC must be specified on the Merge type prompt (MRGTYPE parameter).
- *SAME
- The folder name does not change.
- folder-name
- Specify the name of the folder that contains the document being merged.
Data file (DTAFILE)
Specifies the name of the file in which the member that contains data to be merged is located. *FILE must be specified on the Merge type prompt (MRGTYPE parameter).
- *SAME
- The data file name does not change.
- file-name
- Specify the name of the file that contains the data to be merged.
The possible library values are:
- *LIBL
- All libraries in the library list for the current thread are searched until the first match is found.
- library-name
- Specify the name of the library where the file is located.
Data member (DTAMBR)
Specifies the name of the file member that contains the data to be merged. This parameter is valid only when MRGTYPE(*FILE) is specified.
- *SAME
- The file member does not change.
- *FIRST
- The first member in the file contains the data to be merged.
- *FILE
- The member with the same name as the file contains the data to be merged.
- *LAST
- The last member in the file contains the data to be merged.
- member-name
- Specify the name of the file member that contains the data being merged. A member is a set of data within a file.
Multiple line report (MLTLINRPT)
Specifies whether a multiple line report is created. A multiple line report is created by merging data field instructions. This creates a report in which each record of data produces several lines of output.
- *SAME
- The multiple line report option does not change.
- *YES
- A multiple line report is created.
- *NO
- A multiple line report is not created.
Adjust line endings (ADJLINES)
Specifies whether the line endings in the printed document are adjusted. The lines are adjusted according to what is specified on the Line Spacing/Justification display. This is useful when you print a document that has data merged into it, has instructions, has display attributes that do not print as spaces, or uses a proportionally spaced font.
- *SAME
- The line endings values do not change.
- *YES
- Adjusts line endings in the printed document.
- *NO
- Does not adjust the line endings in the printed document. This is useful if you have typed text exactly as you want it printed.
Adjust page endings (ADJPAGES)
Specifies whether the page endings in the printed document are adjusted. The pages are determined by what is specified for the first typing line and last typing line prompts on the Page Layout/Paper Options display.
- *SAME
- The page endings value does not change.
- *YES
- Page endings in the printed document are adjusted.
- *NO
- Page endings in the printed document are not adjusted.
Allow widow lines (ALWWIDOW)
Specifies whether the page endings are determined by the exact number of lines per page specified on the Page Layout/Paper Options display.
- *SAME
- The allow widow lines value specified in the print document options does not change.
- *YES
- Page endings are determined by the exact number of lines per page.
- *NO
- Page endings are not determined by the exact number of lines per page.
Renumber system page numbers (RENUMBER)
Specifies whether the page numbers are renumbered when the document is printed.
- *SAME
- The value does not change.
- *YES
- The page numbers are renumbered when the document is printed.
- *NO.
- The page numbers are not renumbered when the document is printed.
Print change symbols (PRTCHGSYM)
Specifies whether change symbols are printed in the left margin on your document. Change symbols are used to indicate lines that have been revised.
- *SAME
- Print change symbol value does not change.
- *YES
- Change symbols are printed in the left margin of your document.
- *NO
- The change symbols are not printed in the left margin of your document.
Change symbols to print (SYMBOLS)
Specifies that up to 5 change symbol characters may appear in the left margin of the printed document. If your document contains more than one change symbol character and you do not select which change symbol characters you want to print, all change symbol characters specified in your document are printed.
- *SAME
- The change symbol value does not change.
- value
- Specify up to 5 change symbol characters to appear in the left margin of the printed document.
Draft spacing (DRAFTSPACE)
Specifies whether the spacing value can be adjusted for your document. For example, if the Line spacing prompt is 3 (Triple), then the doubled spacing value is 6, and five blank lines are printed between each line of text in your document. The document is still paginated using the value in the Line spacing prompt; so, depending on the amount of text on a page, one page may print over two pages.
- *SAME
- The draft spacing value does not change.
- *YES
- The spacing value for your document is doubled.
- *NO
- The spacing value that exists in the Line spacing prompt on the Line Spacing/Justification display is used.
Print line numbers (LINNBR)
Specifies whether line numbers are printed in your document. The line numbers begin with 1 on the first page of your document. Line numbers are not printed in headers or footers.
- *SAME
- The line numbers value does not change.
- *YES
- Line numbers are printed in your document.
- *NO
- Line numbers are not printed in your document.
Resolve instructions (RESOLVE)
Specifies whether the instructions that you have placed in your document are processed. For example, the Date instruction (.date) is resolved to the actual date (04/03/62).
- *SAME
- The resolve value does not change.
- *YES
- The instructions you have placed in your document are processed.
- *NO
- The instructions you have placed in your document are not processed. For example, the Date instruction (.date) is printed as *date.
Additional spaces to left (LEFTSPACES)
Specifies whether the left margin is increased.
- *SAME
- The left spaces value does not change.
- value
- Specify a number, ranging from 0 through 99, for the number of spaces that are added to the left margin in your printed document.
Character identifier (CHRID)
Specifies the graphic character set ID that is used to print your job. A graphic character set ID is an identifier that is used to specify a set of graphic characters in a code page. The graphic character set ID selected overrides the automatic value set by the system for the specific printer.
- *SAME
- The character set code page value does not change.
- character-set
- Specify the character set that is used to print your job. Up to 4 digits can be specified for the character set.
- code-page
- A code page is a particular assignment of hexadecimal identifiers to graphic characters. Up to 4 digits can be specified for the code page.
- *BLANK
- No special character set code page is used.
Save resolved output (SAVOUTPUT)
Specifies whether the document you are printing is also saved as a final form document.
- *SAME
- The save resolved output value does not change.
- *YES
- The printed document is saved as a final form document.
- *NO
- The printed document is not saved as a final form document.
Resolved output document (SAVDOC)
Specifies the name of the document that contains the final form document.
- *SAME
- The save document name does not change.
- document-name
- Specify the name of the document that contains the final form document. The document name ranges from 1 through 12 alphanumeric characters. If you use more than 8 characters, the ninth character must be a period (.) followed by a 1- to 3-character extension. If the document name you specify does not already exist, the document is created for you.
- *BLANK
- A resolved output document is not specified.
Resolved output folder (SAVFLR)
Specifies the name of the folder that contains the document being saved in final form.
- *SAME
- The save folder value does not change.
- folder-name
- Specify the name of the folder that contains the document.
- *BLANK
- A resolved output folder is not specified.
Place on job queue (JOBQ)
Specifies whether the print request is put on the job queue.
- *SAME
- The job queue value does not change.
- *YES
- The printing of the document is placed on the job queue.
- *NO
- The printing of the document is not placed on the job queue.
Job description (JOBD)
Specifies the name of the job description that describes how the job is run.
- *SAME
- The job description value does not change.
- job-description-name
- Specify the name of the job description that describes how the job is run.
The possible library values are:
- *LIBL
- All libraries in the library list for the current thread are searched until the first match is found.
- library-name
- Specify the name of the library where the job description is located.
Send completion message (SNDMSG)
Specifies whether you are putting your print job on the job queue and want a message sent to you when the job has completed.
- *SAME
- The send message value does not change.
- *YES
- A message is sent to you when the print job has completed.
- *NO
- A message is not sent to you when the print job has completed.
Cancel on error (CNLERR)
Specifies whether printing is stopped on your document if an error is detected.
- *SAME
- The cancel error value does not change.
- *YES
- Printing is stopped on your document if an error is detected. The error is listed in the error log with an error message stating that the job is canceled.
- *NO
- Printing continues on your document even if an error is detected.
Start page (STRPAGE)
Specifies the page number on which you want printing to start.
Note: If the STRPAGE(page-number) value specified is larger than the ENDPAGE(page-number) value specified, the entire document is printed.
- *PAGERANGE
- The pages specified on the PAGERANGE parameter are printed.
- *SAME
- The start page value does not change.
- *FIRST
- Printing is started on the first page of the document.
- *LAST
- Printing is started on the last page of the document.
- page-number
- Specify the page on which to begin printing. Valid values range from 0.01 through 9999.99.
End page (ENDPAGE)
Specifies the page number on which you want printing to stop.
- *PAGERANGE
- The pages specified on the PAGERANGE parameter are printed.
- *SAME
- The end page value does not change.
- *FIRST
- Printing is ended after the first page of the document.
- *LAST
- Printing is ended after the last page of the document.
- *STRPAGE
- The end page value is the same as the start page value. Only one page is printed.
- page-number
- Specify the page on which to stop printing. Valid values range from 0.01 through 9999.99.
Page ranges (PAGERANGE)
Specifies the page ranges to print. A maximum of 7 ranges can be specified.
Note: If the STRPAGE(page-number) value specified is larger than the ENDPAGE(page-number) value specified, the entire document is printed.
- *SAME
- The page range specified on the document print options is printed.
The possible start page values are:
- *FIRST
- Printing is started on the first page of the document.
- *LAST
- Printing is started on the last page of the document.
- page-number
- Specify the page on which to begin printing. Valid values range from 0.01 through 9999.99.
The possible end page values are:
- *FIRST
- Printing is ended after the first page of the document.
- *LAST
- Printing is ended after the last page of the document.
- *STRPAGE
- The end page value is the same as the start page value. Only one page is printed.
- page-number
- Specify the page on which to stop printing. Valid values range from 0.01 through 9999.99.
Number of labels across page (LBLACROSS)
Specifies the number of labels that are printed across a page.
- *SAME
- The label across page value does not change.
- value
- Specify the number of labels you want printed across a page. Valid values range from 1 through 99.
Width of labels (LBLWIDTH)
Specifies the width (in number of characters) of the label. The width of a label is the number of characters from the left edge of the first label to the left edge of the next label, including the blank spaces between the labels. If the width you specify is larger than the margins for your document, the margins are used as the width.
- *SAME
- The label width value does not change.
- value
- Specify the width (in number of characters) that you want the label to be. Valid values range from 2 through 198.
Sheet feed labels (SHEETFEED)
Specifies, if you are sheet feed printing, whether you want more than one row of labels on a page. If you are using sheet feed paper, there is no other way to print more than one row of labels on a page.
- *SAME
- The sheet feed value does not change.
- *YES
- You are sheet feed printing and want more than one row of labels on a page.
- *NO
- You are not sheet feed printing, or you only want to print one row of labels on a page.
Number of rows per sheet (LBLDOWN)
Specifies, if *YES was selected for the Sheet feed labels prompt (SHEETFEED parameter), the number of rows of labels that you want printed on a page.
- *SAME
- The label down value does not change.
- value
- Specify the number of rows of labels that you want printed on a page. Valid values range from 1 through 99.
Shift left margin (SHFLEFTMAR)
Specifies whether to shift the left margin to prevent text from being truncated.
- *SAME
- The SHFLEFTMAR value does not change.
- *YES
- When the text exceeds the right margin or the paper edge, the left margin is shifted so that as much text as possible is printed. If the text does not exceed the right margin or the paper edge, the text is not shifted.
- *NO
- The left margin is not shifted when text exceeds the right margin. Any text exceeding the right margin is truncated.
Example 1: Printing to a File
PRTDOC DOC(MYDOC) FLR(MYFLR) OPTIONS(*OUTFILE)
OUTFILE(MYFILE/MYLIB) OUTMBR(MYMBR *REPLACE)
CURSTS(*PRV) NEWSTS(*PRV)
OUTDTATYP(*PRV) PRTERRLOG(*PRV) DLTDOC(*NO)
This command prints the document MYDOC in folder MYFLR to the database file MYFILE in library MYLIB in the database file member MYMBR. If the member already exists, it is replaced by the contents of MYDOC. The CURSTS, NEWSTS, OUTDTATYP, and PRTERRLOG are taken from the last PRTDOC request. The document is not deleted after it is printed to the database file MYFILE.
Example 2: Printing a Document
PRTDOC DOC(MYDOC) FLR(MYFLR) OPTIONS(*NO)
DEV(MYPRNTR) OUTQ(*DEV)
This command prints the document MYDOC in the folder MYFLR on a printer called MYPRNTR.
Example 3: Printing Document Error Log
PRTDOC DOC(MYDOC) FLR(MYFLR) OPTIONS(*NO) PRTERRLOG(*YES)
This command prints the document with a document error log attached to it.
Example 4: Increasing Margin
PRTDOC DOC(MYDOC) FLR(MYFLR) OPTIONS(*NO) LEFTSPACES(10)
This command prints the document and has 10 extra spaces inserted in the left margin.
Example 5: Printing a Cover Page
PRTDOC DOC(MYDOC) FLR(MYFLR) OPTIONS(*NO) COVERPAGE(*YES)
This command prints the document with a cover page.
Example 6: Printing One Page to a File
PRTDOC DOC(MYDOC) FLR(MYFLR)
OPTIONS(*OUTFILE) OUTFILE(MYLIB/MYFILE)
OUTMBR(*FIRST) PAGERANGE((5 5))
This command prints page 5 of the document to the database file MYFILE in library MYLIB in the first member.
*ESCAPE Messages
- CPF6C01
- Error occurred during data stream transformation.
- CPF6C03
- Error occurred during document conversion.
- CPF9012
- Start of document interchange session not successful for &1.
- CPF9801
- Object &2 in library &3 not found.
- CPF9810
- Library &1 not found.
- CPF9820
- Not authorized to use library &1.
- OFCFFFC
- User storage capacity exceeded.
- OFCFFFD
- Damaged object found.
- OFC8EA3
- OfficeVision for AS/400 editor is not available to resolve to a display.
- OFC8E01
- Printer ID selected is not correct.
- OFC8E1C
- Cannot delay output when spooling is not active.
- OFC8E1D
- Printer for large print is not correct.
- OFC8E2A
- Output file member is in use.
- OFC8E2B
- Not authorized to output disk file or library.
- OFC8E2C
- Output disk file member could not be opened.
- OFC8E30
- Incorrect character set ID specified.
- OFC8E38
- Member is not a document output file member.
- OFC8E4D
- Output file name &9 is incorrect.
- OFC8E50
- Job has been canceled because of error.
- OFC8E6B
- Not authorized to output disk file member.
- OFC8E6D
- Could not access the output disk file member.
- OFC80B5
- OfficeVision for OS/400 editor is not available on the system.
- OFC800A
- Folder is in use.
- OFC800B
- Document &1 is in use.
- OFC800E
- &1 already exists as document or folder.
- OFC800F
- Display does not support text.
- OFC8006
- Folder not found.
- OFC8007
- Document &1 not found in folder.
- OFC8008
- Request not allowed with folder.
- OFC8009
- Request not allowed with document &1.
- OFC801A
- Document has been saved to diskette, tape or save file.
- OFC8010
- Document &1 cannot be processed.
- OFC8011
- Document &1 needs to be recovered.
- OFC8016
- Document &1 is checked out.
- OFC8018
- Document &1 is empty.
- OFC802C
- Label option specified with non-label document.
- OFC802D
- Option not allowed for PC editor.
- OFC8029
- Cannot save resolved output when printing a resolved document
- OFC820D
- Library &4 was not found.
- OFC820F
- Member &3 is in use.
- OFC947E
- Fill-in document &1 could not be opened.
- OFC9486
- Printer file or printer file library was not found.
- OFC960A
- &1 key was pressed by the user to end the PRTDOC function.
- OFC9609
- &1 is the resolved output file name for the print options function.
- OFC980B
- &9 documents printed, &10 documents not processed.
- OFC980C
- Error printing document &1 to a file.
- OFC980D
- Error converting document &1.
- OFC980E
- Error converting document &1.
- OFC980F
- Could not delete document &1 from folder.
- OFC9801
- Document &1 could not be opened.
- OFC9802
- Folder could not be opened.
- OFC9806
- No documents were selected for printing.
- OFC9808
- Document &1 does not have selected status.
- OFC9809
- Error log incorrect with document descriptions only.
- OFC9810
- Could not update status for document &1.
- OFC9811
- Folder needs to be reclaimed.