runoff.chain

Command/Runoff: Commands, Releases: AP and R83

Transfers control to another Runoff item.

Syntax

.chain {file.reference} item-id

Description

transfers control to the specified item-id.
If the file.reference is not specified, the current file is used. Control does not return to the source item.

This command is particularly useful for generating form letters. For example, it may be necessary to insert the name and address of each recipient of the letter from a separate file.

A 'sselect' statement is used to extract the relevant data from the file and save it in a list. A series of .'readnext' statements inserts the data into the text of the letter. At the end of the letter, a '.chain' command may be used to restart the next letter. When the list is exhausted, Runoff stops.

Example

.chain next.doc
The item 'next.doc' is processed at the end of the document which
called it.

See Also

Command Name Type Description
runoff.read Command Transfers to Runoff item, returns when finished.
runoff.commands Command List of Runoff commands.
runoff.options.c Option Suppresses '.chain' and '.read' commands.
runoff.readnext Command Gets next item-id from active list.

User Comments

What do you think?

Share your experience or ask a question by using the form below.

Login to leave your comments.