If you are working with RCAC, you need either a CHECK Constraint with an ON
INSERT VIOLATION and ON UPDATE VIOLATION, or a SECURED Before Insert/Update
Trigger for avoiding the "real" data gets overridden:
Example Check Constraint:
Alter Table YourSchema.YourTable
Add Check (Birthday <> '0001-01-01'
On Insert Violation Set BirthDay = Default
On Update Violation Preserve BirthDay;
Example Before Trigger
Create or Replace Trigger YourScchema.Replace_Mask_Birthday
Before Insert or Update On YourSchema.YourTable
Referencing New Row as N Old Row as O
For Each Row
Mode Db2Row
Secured
When (n.Birthday = '0001-01-01')
Begin
If Inserting Then Set N.Birthday = Default;
ElseIf Updating Tnen Set N.BirthDay = o.Birthday;
End If;
End;
In this way you will avoid that data gets inadverted overridden.
Mit freundlichen Grüßen / Best regards
Birgitta Hauser
"Shoot for the moon, even if you miss, you'll land among the stars." (Les
Brown)
"If you think education is expensive, try ignorance." (Derek Bok)
"What is worse than training your staff and losing them? Not training them
and keeping them!"
?Train people well enough so they can leave, treat them well enough so they
don't want to.? (Richard Branson)
-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxx> On Behalf Of James H. H.
Lampert
Sent: Donnerstag, 30. August 2018 19:08
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
Subject: Another FieldProc question
Ladies and Gentlemen:
Suppose a file has a FieldProc (we'll assume, for now, that it's from Crypto
Complete) on a field. And suppose some users are authorized to see the
complete field contents, others are authorized to see partially redacted
field contents, and others are not authorized to see the field at all.
Let's also assume that the FieldProc is not some total botch job.
Now suppose user JSMITH, who is not authorized to see the field at all,
changes a record in the file, and user JDOE, who is authorized to see
partially redacted contents, each change a record. In neither case do they
enter a new value for the field that has the FieldProc on it.
What happens to the value of that field?
And what happens to it if they DO enter new values for it?
--
JHHL
--
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:
https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at
https://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxx for any subscription related questions.
Help support midrange.com by shopping at amazon.com with our affiliate link:
http://amzn.to/2dEadiD
As an Amazon Associate we earn from qualifying purchases.