× 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.



Thanks for the example Rob. I don't get to play around with this stuff, but it's good to know about.

One more thing for your example - sign on as ROB and see if SSN contains "XXX-XX-7891" or "234-56-7891".

I think the latter would be preferable, but I still don't think I'd consider it "accessible".

--
*Peter Dow* /
Dow Software Services, Inc.
909 793-9050
petercdow@xxxxxxxxx <mailto:petercdow@xxxxxxxxx>
pdow@xxxxxxxxxxxxxx <mailto:pdow@xxxxxxxxxxxxxx> /

On 8/31/2018 4:53 AM, Rob Berendt wrote:
You're right. I think section 3.5 is full of excrement. From Run SQL
scripts

create table rob.employee (
Name char(30),
ssn char(11))
rcdfmt employeer
;
CREATE MASK SSN_MASK ON rob.EMPLOYEE
FOR COLUMN SSN RETURN
CASE
WHEN (current user = 'ROB')
THEN SSN
WHEN (current user = 'DUMMY1')
THEN 'XXX-XX-' || SUBSTR(SSN,8,4)
ELSE NULL
END
ENABLE;

ALTER TABLE ROB.EMPLOYEE
ACTIVATE COLUMN ACCESS CONTROL;

INSERT INTO ROB.EMPLOYEE
VALUES ('ROB', '123-45-6789');

SELECT * FROM ROB.EMPLOYEE;

CL: CRTUSRPRF DUMMY1 PASSWORD(DUMMY1);
COMMIT;

Now sign on to a 5250 session as DUMMY1

SELECT * FROM ROB.EMPLOYEE
....+....1....+....2....+....3....+....4...
NAME SSN
ROB XXX-XX-6789
******** End of data ********

UPDATE ROB.EMPLOYEE
SET SSN='234-56-7891'
WHERE NAME='ROB'
1 rows updated in EMPLOYEE in ROB.

SELECT * FROM ROB.EMPLOYEE
....+....1....+....2....+....3....+....4...
NAME SSN
ROB XXX-XX-7891
******** End of data ********



Rob Berendt


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.