As the first step in the decommissioning of the site has been converted to read-only mode.

Here are some tips for How to share your SAS knowledge with your professional network.

In The Compute Block: Issues Associated with Using and Naming Variables

From sasCommunity
Jump to: navigation, search


In the compute block of the PROC REPORT step variables can be both created and used. They may be on the incoming data table, they may be computed in the REPORT step, they can be statistical summaries, and they may even be artificially created by the REPORT process. In the DATA step each variable has a name and that variable’s name is used whenever we want to address a particular value on the Program Data Vector. In the REPORT step things are not so simple. The origins and use of a variable will determine how it is to be named in a compute block.

If you do not know how to properly address a variable or report item in the compute block, the compute block will often fail. This paper will discuss the various variable types, how they are used, and how they are addressed in the compute block. Once introduced the rules are fairly easy, and a full understanding of the naming conventions and how they are applied - “use what name when”, will go a long way to allowing you to create more complex and successful compute blocks in PROC REPORT.

Online Materials

View the pdf for this paper.

Contact Info

Please check out my user page. You can also email me.