× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Vern,

Nothing.

I re-ran the whole thing from the beginning with the debugger off in a new job so I could get a clean joblog....still nothing.

Steve Needles


-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Vernon Hamberg
Sent: Wednesday, February 12, 2014 3:09 PM
To: Midrange Systems Technical Discussion
Subject: Re: FIELDPROC

Hi Steve

Silly question - was it plugged in?

My real question is, anything in the job log?

Vern

On 2/12/2014 2:58 PM, Needles,Stephen J wrote:
I'm trying to write my first FIELDPROC POC and I've not had the greatest success...

I created a table:

CREATE TABLE TESTFILE
(NORMALFIELD FOR COLUMN NORFLD CHAR (10 ) NOT NULL WITH DEFAULT,
FIELDWITHPROC FOR COLUMN FLDPRC CHAR (10 ) FIELDPROC
library/TESTFLDPR2 NOT NULL WITH DEFAULT)

So now I've registered TESTFLDPR2 as the program to run when values are written/read from the table.

I stole Kent Milligan's code from an article he wrote. Here is the
link to the article and code:
http://www.mcpressonline.com/database/db2/enable-transparent-encryptio
n-with-db2-field-procedures.html#sthash.BA9pIdAt.dpuf

Before creating the table, I put TESTFLDPR2 in debug. When I ran the CREATE, I watched the registration occur and then it went through the encode portion of the code. All seems good.

Then I INSERTED a row into the table, debug is still active, and there is no indication that the code was run...the debugger didn't show me the steps.

INSERT INTO TESTFILE VALUES('2345678901', 'abcdefgh23')

I looked at the data using a simple SELECT and the data was as I inserted it...presumably due to being decoded...but again...the debugger didn't show me.

SELECT * FROM TESTFILE

....+....1....+....2....+.
NORMALFIELD FIELDWITHPROC
2345678901 abcdefgh23

So I DROPped the FIELDPROC:

ALTER TABLE TESTFILE ALTER COLUMN FIELDWITHPROC DROP FIELDPROC

I reran the SELECT and expected to see encoded data, but got the same results as before.

To me, it seems that the data was never encoded in the first place and I can't understand why the FIELDPROC wasn't invoked on the INSERT of my test data.

Have I missed something? Done something wrong?

Steve Needles

________________________________
This communication, including attachments, is confidential, may be subject to legal privileges, and is intended for the sole use of the addressee. Any use, duplication, disclosure or dissemination of this communication, other than by the addressee, is prohibited. If you have received this communication in error, please notify the sender immediately and delete or destroy this communication and all copies.

TRVDiscDefault::1201

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.