The LUWID is used to identify conversations that are part of a single Sync Point transaction. All conversations with the same LUWID are committed (or backed out) at the same time.
SNA Server assigns two LUWIDs to a transaction program when the TP is started. For locally started TP's, this is when the TP_STARTED verb is issued. (In previous versions of SNA Server 2.x only one LUWID was assigned.) The first LUWID is the TP's protected LUWID. It is used by SNA Server as the LUWID for all synclevel AP_SYNCPT conversations allocated by the TP. When the TP issues an ALLOCATE or MC_ALLOCATE verb with a synclevel of AP_SYNCPT, SNA Server generates an Attach containing the TP's current protected LUWID.
The second LUWID is the TP's unprotected LUWID. It is used on all conversations allocated by the TP with a synclevel other than AP_SYNCPT.
For remotely initiated TPs, the incoming Attach may contain an LUWID for the TP—it is mandatory if the conversation has a synclevel of AP_SYNCPT. For Sync Point conversations, SNA Server saves the LUWID as the TP's protected LUWID and generates a new unprotected LUWID for it. For conversations with a synclevel other than Sync Point (AP_SYNCPT), SNA Server saves the LUWID as the TP's unprotected LUWID and generates a new protected LUWID.
SNA Server generates LUWIDs by concatenating the following:
If the fully qualified LU name component of the LUWID is not 17 bytes long, SNA Server does not add any padding between it and the LUW instance number. The application can determine the length of the LUWID, and the offsets within it of the LUW instance number and LUW sequence number, by examining the first byte of the LUWID, which indicates the length of the fully qualified LU name.
When SNA Server generates both a protected and an unprotected LUWID for a TP, the unprotected LUWID is created by incrementing the protected LUWID's instance number.
The protected LUWID needs to be changed by a TP for one of four reasons:
To allow a TP to set or generate new LUWIDs, a new verb, SET_TP_PROPERTIES, is provided by the APPC API. This verb allows the TP to either set its LUWIDs to an existing value, by providing the LUWIDs, or generate new ones and use them from then on. When a new LUWID is generated by SNA Server, it is guaranteed to be unique.
Note that it is the responsibility of the application (the Sync Point system component) to transmit the new LUWID PS header to the partner Sync Point system when the protected LUWID is changed. Similarly, when a new LUWID PS header is received, the application must inform the LU by issuing SET_TP_PROPERTIES.