CR Toolkit™ Overview

Using the standard output dataset with the REPORTDS parameter

In version 3.0.0 of the CR Toolkit the parameter REPORTDS was added to macros AE1, AE2, AE3, DEMOG, DISP1, TABLE3, TABLE4, TABLE5 and SHIFT1. This enhancement generates an output dataset with a consistent structure with the intent of supporting post-processing to allow programmers to enhance and customize appearance of CR Toolkit tables as well as to support efficient programmatic verification.

The standard output dataset created when parameter REPORTDS= is assigned a value has variables ROWORDER and SKIPROW that indicate the order of rows on the table and where groups of data will be separated by a blank row. The variables COLC1..COLCn contain data displayed on the table, ordered as the displayed columns on the original table.

No work formats are if the dataset is subsequently used in proc report.

A DEMOG macro call like

%demog(in=adsl,
	dvars=sex,
	cvars=age,
	column=trt01an,
	dose=trt01an,
	dosefmt=trt01a,
	spltch=~,
	reportds=demtest1);

creates a table like shown below.



The assignment of reportds=demtest1 generates the demtest1 work dataset with the results shown on the table along with the ordering variables ROWORDER and SKIPROW.



The attributes of variables on demtest1 as shown below support easy reproduction the table with proc report.



Example proc report code to regenerate the table is shown below. This is basic report code for generating listing output. note that the variable labels in this case include the (N=xx) that appears in column headers in the original report. N=, split characters, datlbl assignments will be saved in variable labels based on report macro options used to generate the original table. The output from the proc report below will display each variable label as the column header.

Style elements may be added for ODS output to control cell spacing, value alignment, header alignment, etc. If the initial macro call (DEMOG in this case) has parameters ODS_DEST, ODS_CHARS and ODS_CUNIT specified then the style attributes in the proc report will be populated with appropriate cell width assignments.

proc report data = demtest1 nowindows list missing headline split='~';
	columns &columnlist;
	define skiprow / order order=internal noprint ;
	define roworder / order order=internal noprint ;
	define colc1 / id flow order left width=32 style(header)={asis=on just=left} style(column)={asis=on cellwidth=1};
	define colc2 / id flow order left width=34 style(header)={asis=on just=left} style(column)={asis=on cellwidth=1};
	define colc3 / flow order width=18 style(header)={asis=on just=center} style(column)={asis=on cellwidth=1};
	define colc4 / flow order width=18 style(header)={asis=on just=center} style(column)={asis=on cellwidth=1};
	define colc5 / flow order width=18 style(header)={asis=on just=center} style(column)={asis=on cellwidth=1};
	break after skiprow/skip;
run;