z/OS Infoprint Server User's Guide
Previous topic | Next topic | Contents | Index | Contact z/OS | Library | PDF


Sending output to an email destination

z/OS Infoprint Server User's Guide
SA38-0695-00

Sending output to an email destination

When you submit a print request, you can send the output to an email destination instead of to a printer.

You can specify email addresses of the primary and secondary recipients in one of these ways:

  • In the to, cc, and bcc fields in an email header (line data only). For information, see Creating an email header.
  • In the MAILTO, MAILCC, and MAILBCC parameters on the OUTPUT JCL statement.
  • In the printer definition in the Printer Inventory.

The email has these characteristics:

  • If the output contains text or line data, the output can be sent inline in the body of the email or as an email attachment. To send the output inline, specify the mail-inline-text job attribute. Or, the administrator can select the Inline text and line data field in the printer definition.
  • If the output is not text or line data, it is sent as an attachment. The name of the attachment is one of these:
    1. MAILFILE parameter on the OUTPUT statement
    2. DSNAME parameter on the DD statement
    3. Job name
  • If your job creates multiple output data sets in the same output group, IP PrintWay™ can send the output data sets as attachments in the same email. To obtain this function:
    • IP PrintWay basic mode: In the printer definition, the administrator selects the Concatenate job option in the Dataset grouping field.

      JES output grouping is not supported when either the resubmit for filtering function or the Print Interface subsystem is used. In these situations, each output data set is sent in a separate email.

    • IP PrintWay extended mode: In the printer definition, the administrator selects the Automatic dataset grouping field, or selects the Concatenate job option in the Dataset grouping field.

      JES output grouping is not supported when the Print Interface subsystem is used.

  • The subject of the email is one of these:
    1. Subject field in the email header
    2. TITLE parameter on the OUTPUT JCL statement
    3. Title field in the printer definition
    4. Job name
    The title in the printer definition is used only if you use IP PrintWay basic mode resubmit for filtering or the Print Interface subsystem.
  • The sender is the user ID of the user who ran the job. You can add a descriptive name of the sender in one of these ways:
    1. From field in the email header
    2. MAILFROM parameter on the OUTPUT JCL statement
    3. From name field in the printer definition
  • To receive replies at an email address other than your user ID at your z/OS® system, specify a reply email address in one of these ways:
    1. Reply-to field in the email header
    2. REPLYTO parameter on the OUTPUT JCL statement
    3. Reply address field in the printer definition
    You can receive replies from an email unless a firewall prevents the z/OS system from receiving replies from the sending system. Use the z/OS UNIX mail or mailx command to view your mail. To use these commands, your ID must be a valid z/OS UNIX user ID. For more information about these commands, see z/OS UNIX System Services Command Reference.

Table 3 shows the tasks related to sending output to an email destination. Required tasks are required by all installations. Optional tasks are required only if the listed condition applies.

Table 3. Sending output to an email destination
TaskConditionSee topic
Modifying JCL to send output to an email destinationRequiredModifying JCL to send output to an email destination
Specifying the email address list in an alias fileOptional: If a z/OS UNIX sendmail alias name is specified in the printer definitionSpecifying the email address list in an alias file

Modifying JCL to send output to an email destination

If you currently use JCL to print output using IP PrintWay, in most cases you need to make only minimal changes to the JCL. You might need to modify these JCL parameters:

  • Specify the name of the printer definition for the email destination in the FSSDATA parameter on the OUTPUT statement, or specify the DEST, CLASS, and FORMS parameters that your administrator associated with the printer definition.
  • If you currently specify the IP address of the printer in the DEST=IP: parameter on the OUTPUT statement, remove the DEST=IP: parameter.
  • Remove the RETRYL and RETRYT parameters from the OUTPUT statement, or specify values of 0, because retries are not suggested when you send output to email destinations.

You can specify these optional JCL parameters to customize your emails:

Use this parameter:
To specify:
MAILBCC
The email addresses for the blind copy (bcc) recipients of an email. A bcc means that other recipients of the email do not see the bcc recipient listed.
MAILCC
The email addresses for the copy (cc) recipients of an email. A cc means that other recipients of the email can see the cc recipient listed.
MAILFILE
The file name of the attachment to an email.
MAILFROM
The descriptive name or other identifier of the sender of an email.
MAILTO
The email addresses for the recipients of an email.
REPLYTO
The email address that recipients of an email can reply to.
TITLE
The subject of the email.

To send output data sets that contain either AFP data or line data that requires AFP resources, all AFP resources must be included inline in the data set so that the file can be viewed with the AFP Viewer. If the required AFP resources are not already inline, you can use the IBM® AFP Conversion and Indexing Facility (ACIF) program, a feature of PSF, to create a file that contains the AFP resources. Then, you can concatenate that resource file to the data file.

Related information: For examples of JCL to use when you send output to an email destination, see JCL examples.

Specifying the email address list in an alias file

Your administrator can specify one or more alias names in the printer definition, and you can specify alias names in some JCL parameters. An alias name is a name defined to z/OS UNIX sendmail that represents one or more actual email addresses. For example, alias name dept123 might represent the email addresses of all employees in department 123.

The actual email address list can be defined in any UNIX file. If the file is one that you can edit, the administrator does not need to change the printer definition whenever you need to change the address list and you do not need to change your JCL. For example, your administrator can specify that the actual email address list for alias dept123 is in file /u/user1/dept123.list.

Before you begin: For each address list, your administrator must do these tasks:

  • Create a printer definition and specify a sendmail alias name in the definition.
  • In the sendmail aliases file /etc/aliases, specify the same alias name and specify the name of a file to contain the actual email address list. Ask your administrator for the name of this file so that you can create it.

Steps for creating an alias file:

  1. Create a file using the name defined by your administrator. For example, create file /u/user1/dept123.list using your preferred editor:
    oedit /u/user1/dept123.list

    _______________________________________________________

  2. Specify the email addresses in this file:
    user1@xyz.com,user2@xyz.com,user3@xyz.com,user4@xyz.com,
    user5@xyz.com

    _______________________________________________________

  3. Change the permissions of the file so that the file is readable by everyone but writeable only by the owner:
    chmod 644 /u/user1/dept123.list

    _______________________________________________________

  4. Change the permissions of the directory so that it is readable and executable by everyone but writeable only by the owner:
    chmod 755 /u/user1

    _______________________________________________________

For more information about the z/OS UNIX commands used in this example, see z/OS UNIX System Services Command Reference.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014