This particular CSL routine does not provide any data buffering for the hardware Compression instruction. It does obtain/release a 144byte savearea for the Compression instruction. It passes the address of the CBLOCK to the instruction and lets the addresses in there be sufficient for the Compression instruction. I knew I would have to provide an input and output area of the maximum size that the data could be. I was thinking of initializing each to the first value of the data. After that I would simply get data into the input value, get its address, adjust the CBLOCK for the input address and length, call the CSL, remove the data from the output area based on the output length updated by the Compression instruction.
Now if I do my own function, I would have the input data, its length, output area variable name, and output area length variable name as some of the arguments. I would obtain an estimated maximum size buffer and use that address as the target area for the Compression instruction and use proper REXX function processes to move that output data and its new length into the variables passed to me. I have this odd feeling that no one has really trying using that Data Compression Services CSL from REXX, and maybe not from any thing but assembler. Understandably, HCPDDR does not use the CSL because of his standalone potential and he uses the hardware instruction directly. /Tom Kern Alan Ackerman wrote: > On Mon, 22 Dec 2008 19:49:13 -0500, Thomas Kern <[email protected]> wrote: > >> The other program IS a CSL. I am revisiting the use of the DMSCPR >> routine. It wants a CBLOCK passed to it. The CBLOCK is a 36byte control >> block that include the 4byte addresses of the target area, the source >> area and a 192byte work area. >> >> My other approach to this is to write my own REXX function where I can >> manipulate that control block in assembler language before invoking the >> hardware instruction. > > REXX variables do not have a fixed address. If you append data to a REXX > variable, it will move. So > it would not make much sense to have an ADDR function. REXX variables are not > declared, either, > and have no fixed length. REXX is a very different from compiled languages. > > I think the CSL routine call copies the value of REXX variables into > buffers, and copies the output > values back from buffers back into the REXX variables. I have never tried to > write a CSL routine, > but it must be documented somewhere. > > Alan Ackerman > Alan (dot) Ackerman (at) Bank of America (dot) com >
