9.4. Types of Problems

The leading causes of SQL programming problems include misusing the language syntax; referencing data, especially column data, incorrectly; ignoring or incorrectly specifying system parameters, and constructing syntactically correct but illogical code that does not produce results as expected.

Usage errors can cause the SAS System to stop processing, produce warnings, or produce unexpected results. The following table illustrates the four types of usage errors and briefly describes each.

Types of Usage Errors

ProblemDescription
SyntaxSyntax problems are a result of one or more violations of the SQL procedure language constructs. These problems can prevent a program from processing until you make the required changes. For example, a variable that is referenced in a SELECT statement but not found in the referenced table causes the program to stop.
DataData problems are a result of an inconsistency between the data and the program specification. These problems can prevent a program from processing, but may allow processing to continue resulting in the assignment of missing, incomplete, or unreliable data. For example, missing values may be generated in a column when incorrectly referencing character data as numeric data.
System-relatedSystem-related problems frequently result from specifying incompatible system options or choosing the wrong system option values. These problems can prevent a program from processing, but most frequently permit processing to occur with unsatisfactory results. For example, forgetting to specify a title statement has little effect on the production of output but may force the program to be rerun after the addition of one or more titles.
LogicLogic problems are frequently the result of not specifying a coding condition correctly. For example, specifying an OR condition when an AND condition was needed may produce wrong results without any warnings, errors, or notes.

Other sources of problems can creep into a program for a variety of reasons. The following table illustrates these other problem sources and briefly describes each.

Other Types of Errors

ProblemDescription
Feature CreepAdditional features can creep into a program or application during the design, implementation, or testing phases. This can create a greater likelihood of problems.
Solution ComplexityMore complex or esoteric solutions can also translate into problems. Difficult-to-maintain programs can result.
RequirementsRequirements may be inadequately stated, misunderstood, or omitted. In these situations, programs may not meet the needs of the user community and be classified as bugs.
Testing EnvironmentInadequate testing environments, poor test plans, or insufficient test time often lead to bug-filled programs. In these situations, bugs can slip through the testing phase and into the production environment.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.119.106.237