SECURITY

Syntax

SECURITY [SET=(sid [,sid]...)] [APPEND=(sid [,sid]...)] [REMOVE=(sid [,sid]...)] [MODE=mode]

Description

Enables you to mark sections of a report for security purposes.

The SECURITY command can be repeated as many times as desired for the current report. After the SECURITY command is carried out, all subsequent commands for the current report are constrained by the designated sids until the report ends or another SECURITY command executes.

You can use the SECURITY command wherever you use the PRINT command.

Parameters

Parameter Description

SET

Sets the list of security IDs for subsequent commands. The previous list of security IDs is replaced by the specified security IDs. This argument is optional and can be used only once.

sid

Can be any string literal, column, or variable. The value is case-sensitive.

APPEND

Appends the specified security IDS to the current list. This argument is optional and can be used multiple times.

REMOVE

Removes the specified security IDS from the current list. This argument is optional and can be used multiple times.

MODE

Used to enable (reactivate) or disable (suspend) the security feature for the current report. This argument is optional and can be used only once.

mode

Can be any string literal, column, or variable. The value is not case-sensitive and can be either ON or OFF.

Example

The following example shows the SECURITY command:

Begin-Report
   Security Set=('Directors', 'Vice-Presidents')
      .               
      .         ! Only Directors and VPS can see this.
   Security Remove=('Directors').   
      .         ! Only VPS can see this.   
   Security Mode='Off'.   
      .         ! Anybody can see this.   
   Security Mode='On' Append=('Managers').   
      .         ! Only VPs and Managers can see this.
   Security Append=('Engineers').
      .         ! Only VPs, Managers, and Engineers can see this.
End-report