Building the CSRYCMPS area

The CSRYCMPS area is mapped by the CSRYCMPS mapping macro and is specified in the CBLOCK parameter of the CSRCMPSC macro. The area consists of 7 words that should begin on a word boundary. Unused bits in the first word must be set to 0.
When the CSRCMPSC service returns, it has updated the input CSRYCMPS area as follows:

The target/source address and length fields are updated analogously to the corresponding operands of the MVCL instruction, so that you can tell upon completion of the operation how much data was processed and where you might want to resume if you wanted to continue the operation.

Suppose that you had compressed a large area but wanted to expand it back into a small area of 80-byte records. You might do the expansion as follows:
         LA   2,MYCBLOCK
         USING CMPSC,2
         XC   CMPSC(CMPSC_LEN),CMPSC
         OI   CMPSC_FLAGS_BYTE2,CMPSC_SYMSIZE_1
         OI   CMPSC_FLAGS_BYTE2,CMPSC_EXPAND
         L     3,EDICTADDR              Address of expansion dictionary
         ST    3,CMPSC_DICTADDR         Set dictionary address
         L     3,EXPADDR
         ST    3,CMPSC_SOURCEADDR       Set compression area
         L     3,EXPLEN
         ST    3,CMPSC_SOURCELEN        Set compression length
         LA    3,WORKAREA
         ST    3,CMPSC_WORKAREAADDR     Set work area address
MORE     DS    0H                       Label to continue
*
* Your code to allocate an 80-byte output area would go here
*
         ST   x,CMPSC_TARGETADDR       Save target expansion area
         LA   3,80                     Set its length
         ST   3,CMPSC_TARGETLEN        Set expansion length
         CSRCMPSC CBLOCK=CMPSC         Expand
         C    15,=AL4(CMPSC_RETCODE_TARGET) Not done, target used up
         BE   MORE                     Continue with operation
         DROP 2
 .
 .
         DS   0F        Align parameter on word boundary
MYCBLOCK DS   (CMPSC_LEN)CL1    CBLOCK Parameter
EXPADDR  DS   A         Input expansion area
EXPLEN   DS   F         Length of expansion area
EDICTADDR DS  A         Address of expansion dictionary
         DS   0D        Doubleword align work area
WORKAREA DS   CL192     Work area
         CSRYCMPS ,     Get mapping and equates

Note that this code loops while the operation is not complete, allocating a new 80-byte output record. It does not have to update the CMPSC_BITNUM, CMPSC_SOURCEADDR, or CMPSC_SOURCELEN fields, because the service sets them up for continuation of the original operation.

If running in AR mode, the example would also have set the CMPSC_TARGETALET and CMPSC_SOURCEALET fields. The XC instruction zeroed those fields as needed when running in primary ASC mode.