Amadeus cookies policy - you'll see this message only once.

Amadeus use cookies on this website. They help us to know a little bit about you and how you use our website, which improves the browsing experience and marketing - both for you and for others. They are stored locally on your computer or mobile device. To accept cookies, continue browsing as normal. Or, go to the privacy policy for more information.

Automatic Filtering of User Data

In some situations data might be user sensitive and locked down such that only the owner can view it. There is a quick method of automatically setting this up by using Data Step Views and capturing the user logging details.

By creating a view using PROC SQL we can pre-filter the data so that only data related to the owner (userid) present in the table is matched against the user logging details. The SQL procedure contains a USER literal word to achieve this, but otherwise using the &SYSUSERID macro variable can also produce the required results.

data sales;
  length userid $20;
  if region='Africa' then userid='John Smith';
  else if region='Asia' then userid='Elena.Muriel';
  else if region='Canada' then userid='';
  else if region='Pacific' then userid='';

proc sql;
create view mysales as
select * from sales
where upcase(userid)=upcase(user);

Automatic filtering will occur when accessing the view created.