Troubleshooting
Problem
This document discusses how to specify more than 255-bytes of text text without using body files when using a PDF mapping program with Infoprint Server. This is particularly useful when Infoprint Server will be sending PDF files to e-mail clients
Resolving The Problem
This document discusses how to specify more than 255-bytes of text text without using body files when using a PDF mapping program with Infoprint Server. This is particularly useful when Infoprint Server will be sending PDF files to e-mail clients that require a Messaging Application Programming Interface (MAPI) interface, such as Microsoft Outlook.
This document was last updated on 3 June 2013.
The e-mail client application that receives the e-mail may not support the body text feature. For example, the Lotus Notes e-mail client supports the body text feature, but the Microsoft Outlook Express e-mail client does not. Outlook Express displays any body text as an attachment, not as included text.
E-mail clients that require a MAPI interface, such as Microsoft Outlook, do not display the text as part of the e-mail's body because the MAPI interface is not available on i5/OS. Instead, the text files are displayed as attachments.
One way around this issue would be to change to use message text instead of using body text.
Using Message Text instead of Body Text
The message text field is limited to 255 bytes when using a PDF mapping object. However, an enhancement was made to V5R2M0 OS/400, by way of PTFs, to allow customers who develop their own PDF mapping programs to have more than 255 bytes of message text inserted into the body of an e-mail.
This enhancement requires setting up Infoprint Server to send e-mails using an SMTP server. The new feature is not available for:
- Customers using *SNDDST as a PDF Mail Server.
- Customers using a PDF mapping object.
Note: If you are using any of the following e-mail clients you may not need to use this new support: Microsoft Outlook Express, Eudora, Thunderbird, Lotus Notes and Yahoo!. These e-mail clients display files placed into the body of an e-mail as expected.
The Mapping Program Output structure used by map programs has been updated to include a field called Offset to message text data at decimal offset 280. The size of the Mapping Program Output structure has not changed. Note that the reserved field following Offset to message text data has been changed from CHAR(7) to CHAR(3). Shown below is an update of the structure as documented in Infoprint Series for iSeries User's Guide (G544-5775-03).
| Decimal Offset | Hex Offset | Type | Description |
| 0 | 0 | CHAR(1) | Disposition of PDF e-mail |
| 1 | 1 | CHAR(1) | More processing |
| 2 | 2 | CHAR(2) | Reserved (set each byte to X'00') |
| 4 | 4 | BINARY(4) | Length of message text |
| 8 | 8 | BINARY(4) | Length of mail address |
| 12 | C | CHAR(255) | Message text |
| 267 | 10B | CHAR(1) | Reserved (set to X'00') |
| 268 | 10C | BINARY(4) | Offset to extension area |
| 272 | 110 | BINARY(4) | CCSID of message text and subject |
| 276 | 114 | CHAR(1) | Disposition of PDF Stream file |
| 277 | 115 | CHAR(1) | Disposition of PDF Spooled file |
| 278 | 116 | CHAR(1) | Disposition of PDF Error |
| 279 | 117 | CHAR(1) | Disposition of AFPDS Spooled file |
| 280 | 118 | BINARY(4) | Offset to message text data |
| 284 | 11C | CHAR(3) | Reserved (set each byte to X'00') |
| 287 | 11F | CHAR(*) | E-mail address |
Offset to message text data.
Offset from the beginning of this structure. The value must be a 4-byte multiple Use this field if you specify more than 255 bytes of message text data. If you are using the Message text data field, specify a value of zero for Offset to message text data.
The updated headers files used by map programs are provided with the V5R2M0 PTFs for APAR SE22574.
Programming tips
| 1 | New lines in the message text may be produced by writing the line feed and carriage control hexadecimal values, X'0D25', into the message text data. |
| 2 | If your current map program does not need to use this new function, there is no need to make any changes to the code or recompile the program. |
| 3 | Offset to message text data can be used irrespective of the value specified for Length of message text. In other words, Offset to message text data may be used for any length of message text, even when less than 255. |
| 4 | Offset to message text data is an optional field. If not being used, set its value to X'0000'. |
Notes:
| o | Message PQT4140 "Incorrect data was returned by mapping program (&1/&2)" reason code 43 or RC43 indicates that the PDF mapping program specified a value greater than 255 for Length of message text but specified a value of zero for Offset to message text. An offset greater than zero must be specified when a value greater than 255 is specified for Length of message text. |
| o | The diagnostic spooled file that can be produced when using a map program has been updated to display message text containing more than 255 characters. This data will be indicated by the string 'MSG TEXT'. The actual message text will be output on the lines following this string. |
| o | For more information on the diagnostic spooled file, please refer to the Trouble_Shoot_Map_Programs.htm file that is provided with this enhancement. The document can be found on your system at /qibm/proddata/os400/PrintServicesFacility/, but has also been attached to this document: |
References
For additional information and restrictions for this option, refer to Appendix B, PDF Mapping Program in the Infoprint Server for iSeries User's Guide, Version 5, Release 2.0, G544-5775-01 in the Extension Area Format section.
Infoprint Server for iSeries User's Guide (G544-5775-05):
Infoprint Server for iSeries Planning Guide (G544-5774-03):
Historical Number
534088869
Was this topic helpful?
Document Information
Modified date:
11 November 2019
UID
nas8N1012777