Query Templates Description

Q&R Workstation provides a selection of templates. The templates are categorized as simple or complex.

Following are the template choices in the pull-down menu:

Complex Data Extract

Builds a typical complex query using the following step options:

Each step contains required and optional tasks, such as data filters, data derivation, and user code that allow further data manipulation within each step. This template does not provide SAS Code steps for your own independent SAS Data steps.

Complex Data Manipulation

Builds a complex query using multiple input files that are merged, summarized, and sorted prior to building a Data Extract file. You may add your own SAS code in between steps to further manipulate the data. The template consists of the following step selections:

Each step also contains required and optional tasks, such as data filters, data derivation, and user code, allowing further data manipulation.

Complex Data Merge

Builds a complex query that merges files directly from CA MICS or SAS databases without using File Selection. The merged file is sorted, further manipulated using your own SAS code, and summarized prior to building a Data Extract file. The template consists of the following step selections:

Each step also contains required and optional tasks, such as data filters, data derivation, and user code, allowing further data manipulation within each step.

Complex Query

Builds a complex query using every available query step and task supported by this product, including the following:

Use this template as a model for customizing or creating your own templates, or when you need to build a very complex query but are unsure of the steps and tasks available.

Complex Statistics

Builds a complex query that involves statistical calculations, such as sum, mean, variance, and standard deviation. The template consists of the following:

Each step contains required and optional tasks. The statistics calculations are computed by PROC MEANS.

Simple Concatenation

Builds a simple query using two or more input files directly from CA MICS or SAS database(s). The template consists of the following step selections:

The concatenation step joins two or more files from the databases. The Data Extract step converts the data for use on the workstation. You have the option during concatenation to select the file join method, which either appends the file one after another, or interleaves the files using keys.

Simple Data Extract

Builds a simple query using one database file and converts it for use on the workstation. The template consists of the Data Extract step and its required tasks. Simply specify the input file from either CA MICS or SAS database, and the Data Extract step converts the data for use on the workstation.

Simple File Selection

Builds a simple query using files from CA MICS or SAS database(s) while providing limited data manipulation capabilities. The template consists of the following step selections:

The File Selection step creates a work file from a CA MICS file (1-99 cycles) or a single SAS file, and the Data Extract step converts the data for use on the workstation. You can manipulate the data during the File Selection step by defining data filters and deriving additional data elements.

Simple Merge

Builds a simple query using two or more input files directly from CA MICS or SAS databases. The template consists of two step selections:

The Merge step creates a work file by merging two or more files from the databases, and the Data Extract step converts the data for use on the workstation. You can merge CA MICS files with SAS files during the Merge step. You can specify the files be sorted and summarized before the merge.

Simple Sort

Builds a simple query using one database file. The template consists of two step selections:

The Sort step sorts an input file from either CA MICS or a SAS database, and the Data Extract step converts the data for use on the workstation. You can use any data elements in the input file as the sort keys, and each key may be sorted in either descending or ascending order.

Simple Summarization

Summarizes and builds a CSV file. The template consists of two step selections:

The Summarization step summarizes either a CA MICS file using the CA MICS summarization macros, or a SAS file using PROC MEANS or PROC SUMMARY. You can specify in the summarization step whether or not the file must be sorted prior to summarization. The Data Extract step converts the data for use on the workstation from the work file created by the Summarization step.