USER EXIT 6 for ADACMP in COBOL

Hi,

I`m trying to unload/decompress/reformat some large volume of data using Adabas utilities, and I came to an issue (in my view) regarding the mentioned above topic .

The idea is to unload data into a seq. file; then, to decompress/reformat them (data) using ADACMP together with its USER EXIT 6.

This is a link to the source:
http://techcommunity.softwareag.com/ecosystem/documentation/adabas/ada822mfr/adamf/exits/uex6.htm

and Im not sure that this is true (I quote): "The user exit program can be written in Assembler language [b]or COBOL[/b]" (Im working in mainframe env.)

Im not a COBOL expert, but I can hardly understand how to pass (in COBOL, I stress it) 2 additional params on output [b]while on the input 8(R1) and 12(R1) contain BINARY ZEROS (why?). [/b]So far (to solve the problem) I wrote a very little (tiny) Assembler program to fix the issue; this module gets the control from ADACMP and passes 2 addit. params on input (in place of binary zeros); then, the COBOL routine does formatting. Ideally, of course, Id rather prefer to EVERYTHING in COBOL (I expect some concerns and objections regarding “maintenance of that Assembler routine”) and I`d really appreciate any help as for how to do it properly in COBOL.

Many thanks in advance,
NK

The user exit needs 5 parameters to be defined in your linkage section. You have to supply the address of the output data (SET ADDRESS OF…) in the two output pointers before the RETURN.