Here is an example of a security level definition.

Let's assume:

  • today's date is 11.11.2020
  • User info is set to 11


We will be using this query:

select MDS74.L_RESTRICTION from $mainDataset(78) PT JOIN $dataset(74) MDS74 ON (PT.L_EXTENDED=MDS74.L_ADDINFO) where (PT.L_MAIN = '$user(info)' AND PT.L_START<= '$date(now)')

This query will be used as an example of how to use JOIN or variables.

We will be applying our restriction to column L_PARTITION

From the last table where we applied our security level, the logged user will get only rows where Partition value is 1 (orange colour)