Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Row permissions control for ZDA access
--
-- description: This row permission can be used to disallow specific jobnames from selecting
-- data over a specific file
--
cl:CHGFCNUSG FCNID(QIBM_DB_SECADM) USER(SCOTTF) USAGE(*ALLOWED); -- repeat this on the target (not yet mirrored)
set schema star1g ;
set path star1g ;
create table RowPermRules (
jobname varchar(10),
fetch_not_permitted integer
);
insert into RowPermRules
values('QZDASOINIT', 1), ('QZDASSINIT', 1);
create or replace permission SlowDownOdbc on Item_Fact
for rows where 0 = (select count(*) from RowPermRules
where jobname = right(qsys2.job_name,10)
and fetch_not_permitted = 1)
enforced for all access
enable;
alter table Item_Fact activate row access control;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.