Skip directly to searchSkip directly to the site navigationSkip directly to the page's main content

IBIS-Q System Documentation - Creating Dynamic Variables

Dynamic Variables

Dynamic variables are dynamically defined by the CGI application based on the group file. This means that the groupings for the variable do not exist in the SAS dataset. The groupings, such as 2000-2003, are defined in the group file. Dynamic variables accomplish three main purposes:
  1. Code does not need to be replicated in SAS.
  2. Size of SAS data is decreased because a new variable does not need to be created.
  3. Updates are easier to manage when categories are changed.

For CGI to be able to define a dynamic variable, the following data conditions must be met:

Setting Up Conditions for Dynamic Variables

To establish conditions for the CGI to define a dynamic variable:

Syntax

File name: data_set.cfg (last section, variable list)
value name_sas name_html name_saspop variable&label type1 type2 note 

Note: For Dynamic Variables type2 = 3. (See Configuration File for more information.)

File name: namehtml.grp (See Group File.)
1 (range in data)
2 (range in data)
3 (range in data)

Example

File name: mort.cfg file. (See Configuration File.)
2 age AgeGrp4 age Age&of&Death num 3 4
3 age AgeGrp7 age Age&of&Death num 3 4
4 age AgeGrp8 age Age&of&Death num 3 4
5 age AgeGrp11 age Age&of&Death num 3 4
6 age AgeGrp18 age Age&of&Death num 3 4
7 age AgeGrp9 age Age&of&Death num 3 4

File name: AgeGrp4.grp.
1 0-14
2 15-44
3 45-64
4 65+

Note: There are no spaces after 14, 44, 64, 65+.