Variable data taken from spooled file attributes

You can use text that is taken from three spooled file attributes to be used in an email’s subject and message text. This variable data can be used when PSF is obtaining subject and message text from either a PDF map object (segmented and non-segmented entries) or from the subject and message text that is specified with message PQT4133 in message file QPQMSGF.

Three variables can be specified in the subject and message text fields for which PSF substitutes the appropriate text. The following variables are supported.
  • &UD&. This variable references the User data spooled file attribute.
  • &FT&. This variable references the Form type spooled file attribute.
  • &RT&. This variable references either the routing tag that is contained within spooled file data or the Mail tag that is specified on the USRDFNDTA spool file attribute.
Here is more information on the use of these variables.
  • The variables must be specified in uppercase.
  • The variables can be specified for the Subject and Message text of an email.
  • If a variable is specified and the data to be used for that field is blank, the variable is removed. No data is substituted for the variable and the resulting string for the subject or message text is presented as if no variable was placed in it.
  • If the subject or message text becomes longer than allowed, the text is truncated. Emails that are sent by SMTP do not have a limit for the message text.
  • Trailing blanks are removed from the fields that provide the substitution text.
  • There are no limits as to the number of times a variable can be specified in either the subject or message fields.
  • When you specify a value for MAILTAG on spooled file attribute USRDFNDTA, the value for MAILTAG must not contain any blanks characters. If blanks are included, PSF does not use the MAILTAG value.

Example of using the variables

This example shows the use of the variables in a PDF map entry that specifies email distribution.

The email subject is: Your package to be delivered by &UD&

The Message text is: Your &RT& will be delivered within &FT& week(s).

The spooled file has the following values for the three attributes:
  • The value for User data is FastMove. Variable &UD& refers to User data.
  • The value for Form type is 1. Variable &FT& refers to Form type.
  • The value for the User defined data is washing machine. Variable &RT& refers to User defined data.
When the email arrives at its destination, it has the following values.
  • Subject of: Your package to be delivered by FastMove
  • Message text of: Your washing machine will be delivered in 1 week(s).