#ACCEPT

The #ACCEPT compiler command causes the compiler to suppress one or more warnings generated by the next line of PSL source code. Use this command to validate legal conditions that may cause run-time problems and require supervisory review, such as:

The #ACCEPT command appears on the source code line immediately preceding the warning. Do not use the #ACCEPT command to mask a source code condition where the source code should be changed (e.g., unscoped variable).

The #ACCEPT command does not suppress errors.

Syntax

#ACCEPT Date=date;PGM=pgm;CR=crnumber;GROUP=warngrouplist

Parameters

Date

The date the #ACCEPT command was added. Although a date format is not enforced, MM/DD/YYYY is recommended for consistency.

PGM

The name of the programmer (e.g., PGM=John Miller).

CR

The CR number under which the #ACCEPT is added. This parameter is required for v7.0 and higher, and is optional for earlier versions.

GROUP

A PSL List (comma separated) of #WARN groups for which the warning must be suppressed.

If this group list is absent or empty, warnings from all groups are suppressed. If groups are specified in the list, warnings from these specified groups are suppressed.

Although this parameter is optional, it is strongly recommended to list the #ACCEPTed warning groups explicitly. This prevents that constructs that result in a warning to be suppressed unintentionally.

When Became Available

Profile v6.3

Example

TAG(select,from) //

 

  //Suppresses ‘Dynamic SQL statement’ warning

  #ACCEPT date = 08/04/2002; PGM=FSCW

  type ResultSet rs = Db.select(select,from)

     while rs.next() do {

        set data = rs.getRow()

     }

quit