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.
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
Silly question - was it plugged in?
My real question is, anything in the job log?
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:
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
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?
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.
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,
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l