SDA 4.1 Documentation for XCODEBK FORMATTING


NAME

xcodebk formatting - Summary of formatting instructions used by XCODEBK

DESCRIPTION

The formatting instructions listed below are recognized in templates and variable lists by the XCODEBK program. Full descriptions of their use are given in the main document for XCODEBK.


CONTENTS OF THIS DOCUMENT


ELEMENT OR OBJECT NAMES USED IN TEMPLATES FOR VARIABLE DESCRIPTIONS


A template for variable descriptions follows a line beginning:
*variable(y)
(where `y' is the name assigned to the template, if more than one template is to be referenced in the variable list).

The template consists of one or more of the object names given below; they may be given either in upper or lower case. Each object name inserts into the variable description the appropriate content. The position of each object name in the template indicates to XCODEBK where the corresponding content should be put when constructing the variable descriptions.

Depending on the input to XCODEBK (DDL file, or SDA dataset), some objects may be ignored. For example, if input is taken from a DDL file, instead of from an SDA dataset, objects which require the processing of the data file (such as STATISTICS) are ignored. Also, depending on the input, some elements of the actual content of some objects will be ignored if the corresponding information is not available.

The following list includes all of the object names used for basic codebooks plus all of the descriptive elements which each object inserts into a variable description.

VARNAME
Variable or item name AND long label

VAR
Variable or item name ONLY (no long label)

TEXT
Text for the item (text of the question)

CBTEXT

TEXT2
Same as CBTEXT (for backward compatibility)

CATEGORIES or CATEGORIES(ALL) or CATEGORIES(CASES)
Category codes and labels; also percentages, if requested and input is from an SDA dataset. If percentages are requested, they are placed to the left of the category codes.

The `ALL' or `CASES' specification (in parentheses) is optional. It can be used to control which categories with labels are displayed if the codebook input is taken from an SDA dataset. (If input is from a DDL file, all defined category labels are displayed.)

DATE
Date that the SDA variable was created (if input is from a an SDA dataset)

GROUP
Combines into one element the contents of PROPERTIES and SOURCE. Those two tags can be used separately, but the display is more compact if they are combined into a group with this keyword.

HLINK
A hypertext link to supplementary information, if an HLINK file was specified and an HTML codebook is being generated.

PROPERTIES
Instrument type, data type, allowable input codes, number of decimal places specified (if other than zero), missing-data codes( if any), and the minimum and maximum valid codes (if specified)

PARAMETERS
Same as PROPERTIES (for backward compatibility)

SOURCE
Either the input location in the data file or the instructions for creating the variable, if it is a recode or computed variable

SOURCEF
Same as SOURCE (for backward compatibility)

STATISTICS or STATISTICS(ndecimals)
Set of summary statistics for the variable (only available if input is from an SDA dataset). By default, 3 decimal places are shown for the mean, standard deviation, and variance. You can override this default by using the optional 'ndecimals' specification. Specify the desired number of decimal places in parentheses after `STATISTICS'.

TITLE
Title of the study

SYMBOLS USED IN VARIABLE LISTS


The (optional) list of variables contains the names of the variables or items in the order in which you want them to appear in the codebook. The following symbols can be included in the variable list to perform various functions. Each symbol should appear beginning in column 1 of a new line.

*abc
The text `abc' will appear in the table of contents as a heading

**abc
The text `abc' will ALSO appear at this point in the codebook, at the top of a page
(It is recommended always to use the two-asterisk version. For Word codebooks, a heading specified with a single asterisk will not produce anything.)

2*xyz
The text `xyz' will appear in the table of contents as a second-level heading

2**xyz
The text `xyz' will ALSO appear at this point in the codebook, at the top of a page
(It is recommended always to use the two-asterisk version. For Word codebooks, a heading specified with a single asterisk will not produce anything.)

[x
Insert the contents of the file `x' (located in the CBTEXT directory) into the codebook at this point, at the top of a new page

@y
Use the template named `y' for the variables which follow

@@
Use the default template for the variables which follow

#
The remainder of the line is a comment, not a list of variables

SYMBOLS USED ONLY FOR ASCII FILE OUTPUT


Symbols Used in Templates for Headers and Footers

(Used only for plain ASCII codebook files; ignored for HTML codebooks and those tagged for Word)

A template for a header or footer is a single line which follows a line beginning with one of the following:

*oheader
Header for ODD-numbered pages

*eheader
Header for EVEN-numbered pages

*header
Header for pages not otherwise specified

*ofooter
Footer for ODD-numbered pages

*efooter
Footer for EVEN-numbered pages

*footer
Footer for pages not otherwise specified

The header or footer template consists of a single line containing text and/or special symbols that have specific functions. The following symbols are replaced in the header or footer line by the appropriate information.

%d
Insert the current date (e.g., October 12, 2003)

%p
Insert the current page number

%t
Insert the title of the study

a | b | c
Left-justify `a'; center `b'; right-justify `c'

Symbols Used in Introductory and Appendix Files

(Used only for plain ASCII codebook files; ignored for HTML codebooks and those tagged for Word)

Within the text files used for introductory or appendix files, it is possible to include instructions about when to skip to a new page. Each of the following symbols must appear on a line by itself, beginning in the first column.

%P
Skip to a new page at this point

%EP
Skip to an EVEN-numbered page at this point

%OP
Skip to an ODD-numbered page at this point

SEE ALSO

xcodebk Basic information about XCODEBK


CSM, UC Berkeley/ISA
January 29, 2021