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! :?
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 ?
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.
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.
Thank you, Wolfgang. No hurry.
Hello Wolfgang… Have you had the time to come up with an UEX11 sample?
Afraid not, sorry
But not forgotten, I’ll hopefully get to it within the next couple of days.
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…?
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 …
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
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.
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.
Grand, if you run into issues or come up with more questions - please let me know.
And sorry again for the delay.