z/OS Communications Server: CSM Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Copying data to or from a CSM buffer

z/OS Communications Server: CSM Guide
SC27-3647-00

Applications can use the IVTCSM REQUEST=COPY_DATA macroinstruction to copy data to or from a CSM buffer or a user data area. The authorized invoker can be in any key. This request might reduce the impact to the application by reducing storage key mismatches when CSM storage must be accessed. It also assists users of CSM data space buffers by isolating the application from the addressing method used to access a data space.

The IVTCSM REQUEST=COPY_DATA macroinstruction allows multiple source buffers to be copied to or from one or more target buffers. The source buffers are copied to the target buffers using the source and target buffer lengths to pack data or span data across the target buffers as required.

If the cumulative length of the source buffers is greater than the cumulative length of the target buffers, the source data is truncated. The application can specify a character on the PADCHAR input parameter to pad the target buffers when the cumulative length of the source buffers is less than the cumulative length of the target buffers.

The application must supply a source buffer list and a target buffer list on the COPY_DATA request. This is shown in Figure 1. The number of entries in each list does not have to be equal. Within each list, entries might or might not represent a CSM buffer. The value of the BUFL_SOURCE field dictates whether the entry represents a CSM buffer. For entries representing CSM buffers, the address that is the source or target of the copy is provided by the requester and is not required to be the actual start address of the CSM buffer. CSM validates that the specified address and length correspond to a storage area that is within the bounds of the CSM buffer. This validation is based on the size of the buffer as determined at the time the buffer pool was created.

Optionally, a user data area that is involved in the copy data operation can be access list entry token (ALET)-qualified to allow this area to reside in a data space.

Figure 1. Example of copy data buffer list and copy results
After the CSM copies data from buffer 1, 2, and 3 to buffer 4, 5, 6, and 7, the data was packed depending on the source and target buffer lengths with a PAD char.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014