Programming Blocks

Each DS2 module represents exactly one package, so the DS2 PACKAGE statement plays a major role in SAS Micro Analytic Service. A DS2 package contains one or more methods, and methods can contain a wide variety of DS2 language constructs. Package methods work well with rapid transaction processing because they can be called over and over again with little overhead, as transactions flow through the system. By contrast, the DS2 THREAD and TABLE statements are batch-oriented and are not supported.
The following code blocks are supported:
  • PACKAGE…ENDPACKAGE
  • METHOD…END
  • DO…END
The following code blocks are batch-processing oriented and are not supported:
  • TABLE…ENDTABLE
  • THREAD…ENDTHREAD
Similarly, the following statements are not supported: OUTPUT and SET
  • OUTPUT
  • SET