*Copyright @ www.mycsg.in;


What is this lesson about

Create dummy rows for shells or layout templates

In reporting work we often need rows to exist even before real result values are joined in. The following examples show different ways to create those shell rows.

Using explicit output statements

Using DATALINES

Using PROC FORMAT with a DO loop

Using PROC SQL

Using DO loops to generate patterned rows

Check whether a subject has both pretreatment and post-treatment non-missing results

Create example data

Using PROC SQL with separate pre- and post-tables followed by an INNER JOIN

Using PROC SQL with INTERSECT

Using PROC SQL with a subquery

Select all records for subject-parameter combinations that satisfy the rule

Using PROC SORT NODUPKEY and MERGE

Carry a previous row value forward for comparison with the current row

Check whether the current start date equals the previous end date

Create sample data

Using the LAG function

Using RETAIN instead of LAG

Key points to remember