In the #SECRTT TYPE=OCCURRENCE macro for RESTYPE=DB the RESNAME must be a DBNAME or SEGMENT name that would be set as the current DBNAME/DICTNAME at runtime.
This can be set by CONNECT TO dbname command for SQL or the current DBNAME/DICTNAME can be set by DCUF command or by a USER or SYSTEM PROFILE processed at signon time.
For SQL the CONNECT TO dbname must include the CATALOG segment where the Schema and Tables are defined as well as the data segment.
In the example SRTT macros shown above RESNAME was a segment that users will never set as current Dbname/Dictname at runtime. In fact there is a DBNAME defined in the DBTABLE called DB12 that contains the SQL catalog segment and the data segment. This is the DBNAME that users will have set by DCUF, PROFILE or the CONNECT command. Example: CONNECT TO DB12; SELECT * FROM INFOSQL.EMPLOYEE;
In order for IDMS to do database level security checks for this command, the SRTT must either have RESTYPE=DB on for all databases, or specifically for the DB12 database name;