Version 4.2.6
 —  Parameter-Referenz  —

PRINT - Print File Assignments

This Natural profile parameter specifies the print files to be used during the session. Within a session, up to 31 logical print files (numbered 1 to 31) and the hardcopy print file (Number 0) can be used.

The old dynamic parameter PRINTER can be used as a synonym for PRINT.

PRINT corresponds to the NTPRINT macro in the parameter module NATPARM. To provide different print file definitions, PRINT or NTPRINT can be specified multiple times.

Possible settings See Keyword Subparameters below.  
Default setting See below.  
Dynamic specification yes The parameter PRINT can only be specified dynamically. In NATPARM, the macro NTPRINT must be used.
Specification within session no  

The software components for accessing print files in different environments are called access methods. For the duration of a Natural session, each logical print file can be assigned to one access method only. The access method for a print file is determined by the keyword subparameter AM (see below).

In z/OS under TSO and in batch mode, print files need not be predefined in the JCL. Provided they are defined by subparameter AM=STD, they can be allocated dynamically during the session by a Natural program using the DEFINE PRINTER statement or the application programming interface USR2021 (in library SYSEXT).

This document covers the following topics:

See also Print and Work File Handling with External Datasets in a Server Environment in the Operations documentation.


PRINT Parameter Syntax

With the PRINT parameter, you first specify one or more logical print file numbers, and then several keyword subparameters, which define the characteristics for these print files:

PRINT=((print-file-numbers),keyword-subparameters,...)

print-file-numbers

The file numbers must be specified first and enclosed in parentheses. The numbers can be from 0 to 31. They can be specified in any sequence. Multiple numbers must be separated from one another by commas or blanks. To specify a range of numbers, you can use a hyphen (-).

keyword-subparameters

The various types of keyword subparameters are described below.

For print files with different characteristics, you specify different PRINT parameters. If any previous definition (or default) for the same print file exists, only the values for the specified keyword subparameters are overwritten, all other values remain unchanged.

Examples:

PRINT=((2,12,18),AM=STD,DEST='PRINT**',OPEN=INITOBJ,CLOSE=CMD)
PRINT=((1,3,6-11,15),AM=NAF)
PRINT=((0),AM=STD,DEST=HARDCOPX)

Seitenanfang

NTPRINT Macro Syntax

With an NTPRINT macro, you first specify one or more logical print file numbers, and then several keyword subparameters which define the characteristics that are to apply to these print files:

NTPRINT (print-file-numbers),keyword-subparameters,...

print-file-numbers

The file numbers must be specified first and enclosed in parentheses. The numbers can be from 0 to 31. They can be specified in any sequence. Multiple numbers must be separated from one another by commas. To specify a range of numbers, you can use a hyphen (-).

keyword-subparameters

The various types of keyword subparameters are described below.

For print files with different characteristics, you specify different NTPRINT macros. If any previous definition (or default) for the same print file exists, only the values for the specified keyword subparameters are overwritten, all other values remain unchanged.

Examples:

NTPRINT (2,12,18),AM=STD,DEST='PRINT**',OPEN=INITOBJ,CLOSE=CMD 
NTPRINT (1,3,6-11,15),AM=NAF

NTPRINT (0),AM=STD,DEST=HARDCOPX

Seitenanfang

Keyword Subparameters for All Environments

The following keyword subparameters are available: AM | DEST | OPEN | CLOSE | ROUTE | CP

AM - Type of Access Method

AM=xxx specifies the type of access method to be used.

For an online session, all print files to be used have to be assigned to a specific access method.

For a batch session, any print files not assigned to a specific access method will be automatically detected and assigned by the standard batch access method (AM=STD), provided that they have been predefined in the JCL. See also profile parameter FAMSTD (overwriting of print and work file access method assignments).

Value Meaning
STD Standard sequential batch files (batch, TSO, TIAM, VM/CMS OS simulation).
CMS CMS disk and SFS files.
COMP Com-plete print files.
CICS CICS transient data or temporary storage.
NAF Natural Advanced Facilities.
IMS IMS/TM destinations.
PC Entire Connection.
USER Third-party vendor print interface.
SMARTS SMARTS print file.
ESS Entire System Server.
NOM Entire Output Management. Prints to an Entire Output Management container file without using the spool of the operating system. Refer to the Entire Output Management documentation for details.
OFF Unassigned. No automatic assignments if FAMSTD=OFF is set.
0 Unassigned. Automatic assignments if FAMSTD=OFF is set. This is the default value.

Anmerkung:
PRINT=OFF is equivalent to: PRINT=((1-31)), AM=OFF). It does not affect any of the other keyword subparameter specifications. PRINT=((0),AM=xxx) or NTPRINT (0),AM=xxx determines the hardcopy print access method and is equivalent to the profile parameter HCAM=xxx.

DEST - External Dataset Name

DEST=name specifies the print destination (1 - 8 characters).

This corresponds to the OUTPUT value of the DEFINE PRINTER statement (and can be overwritten by a DEFINE PRINTER OUTPUT specification).

The meaning of this keyword subparameter depends on the access method.

Access Method Meaning of DEST
AM=STD

DEST is the logical dataset name (DDNAME, LINK name, DTF name).

If the destination is to be for multiple files, two asterisks (**) have to be specified for the file number. These will be replaced by the corresponding logical file number for each print file. A DEST value including two asterisks must be enclosed in apostrophes when it is used as a dynamic parameter.

The default value is DEST='CMPRT**' for IBM and DEST='P**' for SIEMENS environments.

Under z/VSE, only 7-character names are supported.

AM=CICS

There is no default value for print files under CICS. Here, the DEST subparameter is mandatory, that is, CICS print files defined without a valid DEST specification are ignored.

The Natural CICS interface also supports a variable (see TERMVAR parameter in the NCIPARM generation macro; &TID is the default) as part of the DEST value which, when being specified, is replaced by the actual CICS terminal ID. See also Natural Print and Work Files under CICS in the TP Monitor Interfaces documentation.

AM=CMS For usage of DEST under CMS, refer to Natural under VM/CMS in the Operations documentation.
AM=IMS Specifies the IMS/TM destination.

Anmerkung:
PRINT=((0),DEST=xxx) or NTPRINT (0),DEST=xxx determines the hardcopy print destination and is equivalent to the Natural profile parameter HCDEST=xxx.

OPEN - Time of File Opening

OPEN=xxx determines when the file is to be opened:

Value The file is opened
INIT for output at session initialization.
OBF according to the default OPEN value for the different environments (batch, CICS, Com-plete, TSO).
OBJ when the execution of the first object which accesses the file starts. This is the general default, except for AM=COMP and AM=IMS.
OBJ1 when the execution of the first object on Level 1 that accesses the file starts. Otherwise, it is opened when it is first accessed.
ACC when it is first accessed by a statement. This is the default for AM=COMP and AM=IMS.
INITOBF for output at session initialization. Any subsequent re-opening of the file sets the default OPEN value for the different environments (batch, CICS, Com-plete, TSO).
INITOBJ for output at session initialization. Any subsequent re-opening of the file will be performed when the execution of the first object which accesses the file starts.
INITOBJ1 when the execution of the first object on Level 1 that accesses the file starts. Otherwise, it is opened when it is first accessed.
INITACC for output at session initialization. Any subsequent re-opening of the file will be performed when it is first accessed by a statement.

CLOSE - Time of File Closure

CLOSE=xxx determines when the file is to be closed:

Value The file is closed
OBJ either when processing of the object in which it was first accessed is finished or when command mode, NEXT mode or MAINMENU is reached.
CMD when command mode, NEXT mode or MAINMENU is reached. This is the default for AM=NAF, AM=COMP and AM=IMS.
FIN at session end (this is the default for AM=STD). With CLOSE=FIN, a DEFINE PRINTER statement causes an error if the printer was opened already. A CLOSE PRINTER statement for the printer is ignored.
USER only if the file is open and one of the following conditions is true:
  • a CLOSE PRINTER statement is issued,

  • a DEFINE PRINTER statement is issued,

  • the session terminates.

ROUTE - Logical Print File Routing

ROUTE=xxx determines whether logical print file routing is done according to the OUTPUT clause of the DEFINE PRINTER statement.

ON Print file routing is done. The target print file can be any available print file except PC. This is the default value.
OFF No print file routing is done.
am Print file routing is done to printers of the specified access method am only. Possible value is any valid print file access method (see description of subparameter AM above). PC is not allowed for am.

Print file routing means that, if the name defined in the OUTPUT clause of a DEFINE PRINTER statement denotes a print file destination which is defined by a different logical printer, all print output is routed to this print file. If no printer with the specified name is found, the print output can be routed to any free printer.

CP - Code Page for Print Output

This keyword subparameter defines the code page for the print output. It is assumed that all code page data, for example, Natural sources, contents of A-format fields, etc., are stored in this code page. If no code page is specified with the keyword subparameter CP, the code page resulting from the evaluation of the profile parameter CP is used.

If Natural code page support is disabled (for example, by parameter CP=OFF), any value specified for this parameter is ignored.

See also profile parameter CP and Profile Parameters in the Unicode and Code Page Support documentation.

Value Meaning
1 - 64 characters

The name of the desired code page.

Any character string is possible, but must be predefined by one of the code page parameters CCSID, CCSN, IANA or ALIAS of the macro NTCPAGE in the source module NATCONFG.

Seitenanfang

Keyword Subparameters for AM=STD in All Environments

The following keyword subparameters are available: RECFM | BLKSIZE | LRECL | TRUNC | PAD | PADCHRO | ASA | STRIP

RECFM - Default Record Format of Dataset

RECFM=xxxx determines the default record format of the dataset.

The following formats are supported:

F Fixed
V Variable
U Undefined
B Blocked
S Spanned
A ASA
M Machine control characters

The following values and also combinations of values are possible:

Possible value: F, FA, FM, FB, FBA, FBM, V, VA, VM, VB, VBA, VBM, VBS, VBSA, VBSM, U, UA, UM
Default value: RECFM=VBA (variable blocked with ASA).

The RECFM specification only applies if no record format is predefined in the JCL or (z/OS only) in the dataset DCB.

BLKSIZE - Default Block Size of Dataset

BLKSIZE=nnnnn determines the default block size (in bytes) of the dataset.

Possible values: 0 or 8 to 32767
Default value: 1016

The BLKSIZE specification only applies if no block size is predefined in the JCL or (z/OS only) in the dataset DCB.

LRECL - Default Record Length of Dataset

LRECL=nnn determines the default record length (in bytes) of the dataset.

Possible values: 0 or 5 - 254
Default value: 0

This subparameter is used particularly to check for truncation and padding.

For RECFM=V (B) the LRECL value includes a 4-byte record descriptor word.

If LRECL=0 is defined, the following applies:

The LRECL specification only applies if no record length is predefined in the JCL or (z/OS only) in the dataset DCB.

TRUNC - Truncation of Output Records

TRUNC=xxx determines whether the output records are truncated:

ON Output records that are longer than the record length (LRECL) of the dataset will be truncated. This is the default value.
OFF Error NAT1512 will be issued if an output record is longer than the dataset record length.

PAD - Padding of Output Records

PAD=xxx determines whether the output records are padded or not (applies only to datasets of fixed record length):

ON Output records that are shorter than the record length (LRECL) of the dataset will be padded with padding characters defined by keyword subparameter PADCHRO. This is the default value.
OFF Error NAT1510 will be issued if an output record is shorter than the dataset record length.

PADCHRO - Padding Character of Output Records

This subparameter defines the character which is used for padding if PAD=ON is defined for the print file.

Possible values: 'x' (one character x within single quotes)
x'xx' (one hex character xx)
Default value: ' ' (blank or x'40')

ASA - Use of ASA Record Format

ASA=xxx determines whether the ASA record format is used.

ON An ASA character is included in the output print records. Under z/OS, this enforces ASA record format, regardless of the RECFM setting in the DCB or the RECFM subparameter. This is the default value.
OFF No ASA character is included in the output print records. Under z/VSE batch access method (AM=STD), a valid ASA character must be supplied in column one of the output record if the output file is a spool file, otherwise error NAT1530 will be issued.

STRIP - Inhibit Removal of Trailing Blanks

Trailing blanks are stripped off for batch sequential print files (AM=STD) if the dataset is defined with variable record format (RECFM=VB) to reduce disk space. This may cause problems with subsequent applications accessing this dataset due to the missing blanks. These problems can be avoided by setting STRIP=OFF.

ON Trailing blanks are stripped off. This is the default value.
OFF Trailing blanks are not stripped off.

Seitenanfang

Keyword Subparameters for AM=STD in z/OS Environments

The following keyword subparameters are available:

REREAD | FREE | BUFNO | DISP | VMAX

REREAD - Closing of Tape File Datasets

REREAD=xxx sets the REREAD option for the closing of the tape file:

ON The REREAD option is set for the CLOSE SVC. This causes the volume to be repositioned to reprocess the dataset . This is the default value.
OFF The REREAD option is not set for the CLOSE SVC.

FREE - Dataset De-allocation at File Closure

FREE=xxx determines whether the dataset is de-allocated when the file is closed:

ON The FREE option is set for the CLOSE SVC, which means that the dataset is de-allocated when it is closed (and not at step termination).
OFF The FREE option is not set for the CLOSE SVC. This is the default value.

BUFNO - Default Number of z/OS I/O Buffers of Dataset

BUFNO=nnn defines the default number of z/OS I/O buffers of the dataset.

Possible values 0 - 255
Default value 0

In this case, z/OS allocates five I/O buffers per default.

The number of I/O buffers can improve the performance of print file access dramatically. Note that the storage for I/O buffers is allocated below the 16 MB line.

The BUFNO specification applies only if the BUFNO parameter is not specified in the JCL for the dataset.

DISP - Open Print File for Modification

DISP=xxx determines whether the print file is opened for modification.

This corresponds to the JCL DD statement subparameter DISP=MOD.

MOD New records are added at the end of the file.
NOMOD The print file is rewritten from the start. This is the default value.

VMAX - Control LRECL for Variable Record Format

VMAX=xxx controls the LRECL setting for an output file with variable record format (RECFM=V).

ON Providing a nonzero BLKSIZE value exists for the file, VMAX=ON sets LRECL=BLKSIZE-4 for variable record format, regardless of the LRECL setting in the DCB or the LRECL subparameter.
NAT LRECL is set to the length +4 of the largest record in the application program if this value is less than LRECL in the DCB for the dataset.
OFF LRECL from the DCB for the dataset or the LRECL subparameter is used. This is the default value.

Seitenanfang

Keyword Subparameters for AM=STD in z/VSE Environments

The following keyword subparameters are available:

SYSNR | LABEL | REWIND

SYSNR - Logical VSE SYS Number

SYSNR=nn determines the logical VSE SYS number.

Possible values: 1 - 99
Default value: By default, the SYS number is print file number plus 40 for print files 1 - 31; for print file 0, that is the hardcopy printer, the default is SYSLST.

Example:

The z/VSE default SYS number for print file 11 is 11 + 40 >= SYS051.

LABEL - Tape Label Processing

LABEL=xxx determines the tape label processing:

ON The tape is in standard label format. This is the default value.
OFF The tape is unlabeled with front tape mark.
NOTM The tape is unlabeled without front tape mark.

REWIND - Action at File Closure

REWIND=xxx determines the action to be taken when a tape file is closed:

ON The tape is rewound when the file is closed. This is the default value.
OFF The tape is not rewound when the file is closed.
UNLOAD The tape is unloaded when the file is closed.

Seitenanfang

Keyword Subparameters for AM=STD in BS2000/OSD Environments

The following keyword subparameter is available: DISP | FREE

DISP - File Open Mode

DISP=xxx determines the open mode of the file:

EXT The open mode is set to EXTEND.
NOEXT The open mode is set to the default value OUTPUT. This is the default value.

FREE - Release Linkname at File Closure

FREE=xxx determines whether the linkname of the file is released when the destination file is switched over to another one.

ON The linkname is released.
OFF The linkname is kept.

Example:

DEFINE PRINTER (1) OUTPUT 'P01' 
WRITE (1) 'TEST' 
CLOSE (1)
DEFINE PRINTER (1) OUTPUT 'FILE=REPORT01.NEW,LINK=LINKP01

If FREE is set to ON, the linkname is released; with FREE=OFF, it is kept.

Seitenanfang

Keyword Subparameters for AM=CICS

The following keyword subparameters are available:

TYPE | DISP

TYPE - Type of CICS Storage Medium

TYPE=xxxx specifies the type of CICS storage medium to be used:

MAIN Temporary main storage.
AUX Temporary auxiliary storage.
TD Transient data.

The default value used depends on the DEST parameter setting. If the DEST subparameter value matches a valid CICS transient data queue, the TYPE subparameter defaults to TD, otherwise MAIN will be taken as the default value.

DISP - CICS Temporary Storage Queue Disposition

DISP=(xxx,xxx) specifies the CICS temporary storage queue disposition.

Possible value pairs are:

(NEW,KEEP) The storage queue is deleted when the file is opened. This is the default value.
(NEW,DELETE) The storage queue is deleted when the file is opened and when it is closed.
(OLD,DELETE) The storage queue is deleted when the file is closed.
(OLD,KEEP) The storage queue is not deleted.

Anmerkung:
The DISP specification does not apply to CICS extra-partition transient data queues.

Seitenanfang

Keyword Subparameters for AM=COMP (Com-plete)

The following keyword subparameter is available: DRIVER

DRIVER - Name of Com-plete Print Driver

DRIVER=name specifies the name of the Com-plete print driver to be used.

Seitenanfang

Keyword Subparameters for AM=SMARTS (Com-plete)

The following keyword subparameter is available: DEST

DEST - Logical Printer

DEST=print-server-queue

The environment variable SAG_APS_LPD_xyz defines a logical printer under complete, where xyz is the name of the print server queue.

If the environment variable SAG_APS_LPD_xyz exists for the specified DEST, the output is directly routed to that line printer. For more information, see the Complete Initialization and Startup Manual, section Defining Terminals and Printers.

DEST=printer-file-name

If no print server queue for that printer is available, DEST specifies a printer file name. It specifies the location of the output file in the file system. The name of the output file is generated from the userId and a sequence number.

Since the DEST clause is restricted to an 8 character maximum, it is useless to define a file with absolute PFS path specification. The name specified in the DEST clause is relative to the print file root directory. The print file root directory is specified with the environment variable NAT_PRINT_ROOT.

Example:

NAT_PRINT_ROOT=/nat/printer
DEST=printer1
UserId=xyz

The first output will be written to file /nat/printer/printer1/xyz1.

To specify a file with absolute path definition, the OUTPUT clause of the DEFINE PRINTER statement must be used.

Seitenanfang

Keyword Subparameters for AM=IMS

The following keyword subparameters are available:

BLKSIZE | DRIVER

BLKSIZE - Size of the Print Buffer

BLKSIZE=nnnnn specifies the size of the print buffer sent to the IMS/TM destination.

DRIVER - Name of Natural IMS Print Driver

DRIVER=name specifies the name of the Natural IMS print driver to be used.

For possible values, see NIMPARM Macro Parameters and Support of the Natural WRITE (n) Statement in the section Natural under IMS/TM in the TP Monitor Interfaces documentation.

Seitenanfang

Keyword Subparameters for DEFINE PRINTER Statement

With the following keyword subparameters, you can set default values for the DEFINE PRINTER statement options of the same names (see the Statements documentation). When a printer is closed, all DEFINE PRINTER statement options are reset to their default values.

The following keyword subparameters are available:

PROFILE | NAME | FORMS | DISP | COPIES | CLASS | PRTY

PROFILE - Name of Printer Control Characters Table

PROFILE=name specifies the name of printer control characters table (NTCCTAB macro).

NAME - Name of Listing

NAME=name specifies the listing name.

FORMS - Name of Listing Forms

FORMS=name specifies the listing forms name.

DISP - Listing Disposition

DISP=disposition specifies the listing disposition (HOLD, KEEP, DELETE or LEAVE).

COPIES - Number of Copies

COPIES=nnn specifies the number of copies to be printed (1 - 255).

CLASS - Spool Class

CLASS=class specifies the spool class (1 byte).

PRTY - Listing Priority

PRTY=nnn specifies the listing priority (1 - 255).

Seitenanfang