# USER EXIT 6 for ADACMP in COBOL

**URL:** <https://techcommunity.softwareag.com/t/user-exit-6-for-adacmp-in-cobol/95866>\
**Category:** Forum\
**Tags:** Adabas-Natural, Adabas, Adabas-on-Mainframes, Adabas-Utilities-on-Mainframes\
**Created:** [January 6, 2011, 8:48pm UTC](https://techcommunity.softwareag.com/t/user-exit-6-for-adacmp-in-cobol/95866 "2011-01-06T20:48:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nikolay\_Kuhta](https://avatars.discourse-cdn.com/v4/letter/n/35a633/32.png) [@Nikolay\_Kuhta](https://techcommunity.softwareag.com/u/Nikolay_Kuhta)\
**Post date:** [January 6, 2011, 8:48pm UTC](https://techcommunity.softwareag.com/t/user-exit-6-for-adacmp-in-cobol/95866/1 "2011-01-06T20:48:02Z")

</div>

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](http://techcommunity.softwareag.com/ecosystem/documentation/adabas/ada822mfr/adamf/exits/uex6.htm)

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

I`m 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, I`d 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

---

<div class="post-metadata">

**Author:** ![Douglas\_Kelly](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/douglas_kelly/32/102_2.png) [@Douglas\_Kelly](https://techcommunity.softwareag.com/u/Douglas_Kelly)\
**Post date:** [January 7, 2011, 5:10am UTC](https://techcommunity.softwareag.com/t/user-exit-6-for-adacmp-in-cobol/95866/2 "2011-01-07T05:10:23Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [April 2, 2021, 2:59pm UTC](https://techcommunity.softwareag.com/t/user-exit-6-for-adacmp-in-cobol/95866/3 "2021-04-02T14:59:37Z")

</div>


