Saving truncated data in the SPA
The SPA=STRUNC option on the TRANSACT macro applies to conversations that use program switches to other transactions that have different sized SPAs.
- If you use the SPA=STRUNC option, IMS preserves
all of the data in the SPA, even when a program switch is made to
a transaction that is defined with a smaller SPA. The transaction
with the smaller SPA does not see the truncated data. However, when
this transaction switches to a transaction with a larger SPA, the
truncated data is used. IMS tracks
the longest data that is inserted to the SPA to determine the truncated
data length.Example: If you have the three transactions:
TRANA SPA=100 TRANB SPA=50 TRANC SPA=150
If the application program for TRANA switches to TRANB, the last 50 bytes of the SPA for TRANA are not sent to TRANB. If the application program for TRANB subsequently switches to TRANC, the SPA that is received by TRANC contains the following 150 bytes:- The first 50 bytes from the SPA that was inserted by TRANB
- The second 50 bytes from the second 50 bytes that was inserted by TRANA
- The third 50 bytes are binary zeros.
- If you do not use the SPA=STRUNC option, the truncated data is lost. In the previous example, the second 50 bytes that is received by TRANC would be binary zeros.
Restriction: Truncated SPA data from a previous transaction
is lost if it is sent using MSC to an IMS 5.1
(or earlier) system.