# UEX1 or UEX11 sample?

**URL:** <https://techcommunity.softwareag.com/t/uex1-or-uex11-sample/102361>\
**Category:** Forum\
**Tags:** Adabas-Natural, Adabas, Adabas-on-Mainframes, Adabas-Basics-on-Mainframes\
**Created:** [February 13, 2013, 3:44pm UTC](https://techcommunity.softwareag.com/t/uex1-or-uex11-sample/102361 "2013-02-13T15:44:33Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![STomsko](https://avatars.discourse-cdn.com/v4/letter/s/848f3c/32.png) [@STomsko](https://techcommunity.softwareag.com/u/STomsko)\
**Post date:** [February 13, 2013, 3:44pm UTC](https://techcommunity.softwareag.com/t/uex1-or-uex11-sample/102361/1 "2013-02-13T15:44:33Z")

</div>

Hello all… Can anyone provide a “working” sample of UEX11 (preferred) or UEX1 that does anything at all. I am looking to add a cipher code to a file in order to put encryption into effect (haven’t done this before), but I just need to see anything at all that works as a starting point. Thanks! :?

---

<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:** [February 14, 2013, 6:07pm UTC](https://techcommunity.softwareag.com/t/uex1-or-uex11-sample/102361/2 "2013-02-14T18:07:20Z")

</div>

Well, the sample UEX11\* in Adabas’ SRCE dataset should be working fine,  
you’d just need to add a few lines of code to set the cipher code.

Did you try that and it didn’t work ?

---

<div class="post-metadata">

**Author:** ![STomsko](https://avatars.discourse-cdn.com/v4/letter/s/848f3c/32.png) [@STomsko](https://techcommunity.softwareag.com/u/STomsko)\
**Post date:** [February 14, 2013, 6:42pm UTC](https://techcommunity.softwareag.com/t/uex1-or-uex11-sample/102361/3 "2013-02-14T18:42:31Z")

</div>

No, I haven’t tried anything yet. I’d like to see how the file number is queried and how the cipher code is plugged into the control block. I haven’t seen any such thing in YEARS and want to have an example to compare my code to.

---

<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:** [February 14, 2013, 7:23pm UTC](https://techcommunity.softwareag.com/t/uex1-or-uex11-sample/102361/4 "2013-02-14T19:23:52Z")

</div>

Ok, let me see if I can create a sample for you, but I’ll only get to it over the weekend, I’m afraid.

---

<div class="post-metadata">

**Author:** ![STomsko](https://avatars.discourse-cdn.com/v4/letter/s/848f3c/32.png) [@STomsko](https://techcommunity.softwareag.com/u/STomsko)\
**Post date:** [February 14, 2013, 7:25pm UTC](https://techcommunity.softwareag.com/t/uex1-or-uex11-sample/102361/5 "2013-02-14T19:25:49Z")

</div>

Thank you, Wolfgang. No hurry.

---

<div class="post-metadata">

**Author:** ![STomsko](https://avatars.discourse-cdn.com/v4/letter/s/848f3c/32.png) [@STomsko](https://techcommunity.softwareag.com/u/STomsko)\
**Post date:** [February 26, 2013, 3:28pm UTC](https://techcommunity.softwareag.com/t/uex1-or-uex11-sample/102361/6 "2013-02-26T15:28:39Z")

</div>

Hello Wolfgang… Have you had the time to come up with an UEX11 sample?

---

<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:** [February 26, 2013, 10:55pm UTC](https://techcommunity.softwareag.com/t/uex1-or-uex11-sample/102361/7 "2013-02-26T22:55:23Z")

</div>

Afraid not, sorry 😢

But not forgotten, I’ll hopefully get to it within the next couple of days.

---

<div class="post-metadata">

**Author:** ![STomsko](https://avatars.discourse-cdn.com/v4/letter/s/848f3c/32.png) [@STomsko](https://techcommunity.softwareag.com/u/STomsko)\
**Post date:** [April 18, 2013, 7:08pm UTC](https://techcommunity.softwareag.com/t/uex1-or-uex11-sample/102361/8 "2013-04-18T19:08:54Z")

</div>

Hi, Wolfgang… I’ve been off doing other things on other projects and have just returned to this. I could still use a basic, working UEX11 sample to get me started. Any chance you have one…?

---

<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 18, 2013, 8:03pm UTC](https://techcommunity.softwareag.com/t/uex1-or-uex11-sample/102361/9 "2013-04-18T20:03:47Z")

</div>

Afraid not yet, sorry for that, I’m on the road as we speak, I’ll finally get around to it next weekend, this time for real …

---

<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 22, 2013, 12:06am UTC](https://techcommunity.softwareag.com/t/uex1-or-uex11-sample/102361/10 "2013-04-22T00:06:13Z")

</div>

I won’t post the whole thing here, but a simple implementation which checks for two different file numbers (11 and 12) and sets specific cipher codes for each one would be like this

```auto
UEx11E DS 0H                                                 
* Begin functional code here                               
         XC WRetCode,WRetCode Default to RC=0                
         CLC ACBXFnr,=F'11' File 11 ?                      
         BE UEx11E11 Yes, set Ciphercode            
         CLC ACBXFnr,=F'12' File 12 ?                      
         BE UEx11E12 Yes, set Ciphercode            
         B UEx11X Not a file we are interested in
*----------------------------------*                              
UEx11E11 DS 0H Set cipher code for file 11    
         MVC ACBXAdd4,=CL8'cipher11'                            
         B UEx11X Done, back to caller           
*----------------------------------*                              
UEx11E12 DS 0H Set cipher code for file 11    
         MVC ACBXAdd4,=CL8'cipher12'                            
         B UEx11X Done, back to caller           
         Eject                                                    
```

So you simply insert your code after label UEx11E.

If this doesn’t meet your requirements (check file number, set cipher code) or still doesn’t give you enough of a hint please let me know and we can tackle it offline.

---

<div class="post-metadata">

**Author:** ![STomsko](https://avatars.discourse-cdn.com/v4/letter/s/848f3c/32.png) [@STomsko](https://techcommunity.softwareag.com/u/STomsko)\
**Post date:** [April 22, 2013, 4:00pm UTC](https://techcommunity.softwareag.com/t/uex1-or-uex11-sample/102361/11 "2013-04-22T16:00:22Z")

</div>

Thank you, Wolfgang! This is exactly what I needed. Many thanks! What was confusing me was the fact that UEX11 is working with a ‘copy’ of the control block; but I was on the right track. It seems I may ultimately have 25 or 30 files that I must cipher, and that will entail a search of tables within the exit (one for the file #, one for the ciper code), but this example is where the work is done and is very helpful.

---

<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 22, 2013, 8:21pm UTC](https://techcommunity.softwareag.com/t/uex1-or-uex11-sample/102361/12 "2013-04-22T20:21:29Z")

</div>

Grand, if you run into issues or come up with more questions - please let me know.

And sorry again for the delay.

---

<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, 3:02pm UTC](https://techcommunity.softwareag.com/t/uex1-or-uex11-sample/102361/13 "2021-04-02T15:02:53Z")

</div>


