connect to sasspds
(dbq="path1"
server=host.port
user='anonymous');
/* queries comparing literal rows are */
/* only selected if the symbolic */
/* substitution evaluates as 'true' */
select *
from connection
to sasspds(
select *
from mytable
where "@SPDSUSR" = "SOMEUSER");
select *
from connection
to sasspds(
select *
from mytable
where "@SPDSGRP" = "SOMEGROUP");
select *
from connection
to sasspds(
select *
from mytable
where "@SPDSSPEC" = "TRUE");
/* queries based on column values will only */
/* select appropriate columns */
select *
from connection
to sasspds(
select *
from mytable
where usercol = "@SPDSUSR");
select *
from connection
to sasspds(
select *
from mytable
where grpcol = "@SPDSGRP");
/* Create a view to worktable that allows */
/* users FRED or BOB, groups BCD or ACD, or */
/* someone with ACLSPECIAL to read the table */
execute(create view workview as
select *
from worktable
where "@SPDSUSR" in ("FRED", "BOB") or
"@SPDSGRP" in ("BCD", "ACD") or
166 Chapter 14 • ACL Security Overview