Overview (ADD DOCUMENT command)
ADD DOCUMENT saves a block of text of any length in the active dataset. The result
is equivalent to the DOCUMENT command. The documentation can be displayed with the DISPLAY DOCUMENT command.
When GET retrieves
a data file, or APPLY DICTIONARY is used to apply documents from another data file, or ADD FILES, MATCH
FILES, or UPDATE is
used to combine data files, all documents from each specified file
are copied into the working file. DROP DOCUMENTS can be used to drop those documents from the working file.
Basic Specification
The
basic specification is ADD DOCUMENT followed by one or more optional lines of quoted text. The text
is stored in the file dictionary when the data file is saved in IBM® SPSS® Statistics format.
Syntax Rules
- Each line must be enclosed in single or double quotation marks, following the standard rules for quoted strings.
- Each line can be up to 80 bytes long (typically 80 characters in single-byte languages), including the command name but not including the quotation marks used to enclose the text. If any line exceeds 80 bytes, an error will result and the command will not be executed.
- The text can be entered on as many lines as needed.
- Multiple
ADD DOCUMENTcommands can be specified for the same data file.
- The text from
each
ADD DOCUMENTcommand is appended to the end of the list of documentation, followed by the date in parentheses. - An
ADD DOCUMENTcommand with no quoted text string appends a date in parentheses to the documentation. -
DISPLAY DOCUMENTSwill display all documentation for the data file specified on theADD DOCUMENTand/orDOCUMENTcommands. Documentation is displayed exactly as entered; each line of theADD DOCUMENTcommand is displayed as a separate line, and there is no line wrapping. -
DROP DOCUMENTSdeletes all documentation created by bothADD DOCUMENTandDOCUMENT.
Example
If the command name and the quoted text string are specified on the same line, the command name counts toward the 80-byte line limit, so it’s a good idea to put the command name on a separate line, as in:
ADD DOCUMENT
"This is some text that describes this file.". Example
To insert blank lines between blocks of text, enter a null string, as in:
ADD DOCUMENT
"This is some text that describes this file."
""
"This is some more text preceded by a blank line.".