Sending Data
Use a basic conversation when you need to optimize your program's performance by sending the data from a buffer that contains more than one logical record or a partial logical record. Basic conversations can improve your program's execution efficiency by enabling your program to send several logical records with one request.
- The last 15 bits of the LL field contain a binary value equal to the length
of the logical record, including the 2-byte length field. The 15-bit limit
restricts the value to a maximum of 32,767 (32,765 bytes of user data plus
the 2-byte length field). If you use a value larger than 32,767, LU 6.2
cannot detect the error and uses the last 15 bits of the LL field anyway.
The smallest value possible is 2 (the LL field followed by no data). If you use a value that is less than 2, LU 6.2 indicates an error.
- LU 6.2 ignores the first bit of the LL field. This bit is a concatenation indicator. If the concatenation indicator is set, the transaction program must append the data from the following logical record to the data received up to that point. This concatenation process should continue until the transaction program receives a record in which the concatenation indicator is not set. This definition allows you to use higher level records (GDS variables) that are longer than 32,767 bytes.
- You must manage the reversal of byte values in your PC.
The PC stores all numeric 16- or 32-bit values with the low-order (least significant) byte stored in the lower numbered address. Therefore, if a transaction program computes the length of a logical message and stores that value as the LL field, the 2 bytes appear in memory with the low-order byte first, and your PC will send the bytes in this order (incorrectly) over the communication line.
The transaction program is responsible for putting all transaction-level data, including LL fields, in the correct order (high-order byte first).
Use a mapped conversation if you do not need to send partial logical records or more than one logical record. When you send data with the mapped conversation verbs, LU 6.2 assumes that the buffer contains exactly one complete higher level record (GDS variable). The mapped conversation support automatically provides length fields in the correct byte-reversed order and uses concatenated logical records as needed.