ALLOWNESTED

Use the ALLOWNESTED and NOALLOWNESTED commands to enable or disable the use of nested OBEY files. A nested OBEY file is one that contains another OBEY file, see OBEY.

Syntax

ALLOWNESTED | NOALLOWNESTED
ALLOWNESTED

Enables the use of nested OBEY files. There is no maximum of the number of nested files.

NOALLOWNESTED

This is the default setting. If you try to run a nested obey file, then it displays the following error

Nested OBEY scripts not allowed. Use ALLOWNESTED to allow nested scripts.

The following example illustrates a nested OBEY file. Assume an OBEY file named addcmds.txt. Inside this file, there is another OBEY command that calls the OBEY file named startcmds.txt, which executes another set of commands.

The following example creates an OBEY file (adder.oby) to add Extract, Replicat, and trail files and includes another obey file (startcmds.oby).

vi ADDER.oby
DBLOGIN USERIDALIAS ggeast
ADD EXTRACT exte, TRANLOG, BEGIN NOW 
ADD EXTTRAIL east/ea, EXTRACT exte 
ADD EXTRACT extw, TRANLOG, BEGIN NOW 
ADD REPLICAT repw, EXTTRAIL west/ew, BEGIN NOW
OBEY startcmds.oby

The startcmds.oby file contains the following:

START EXTRACT *
INFO EXTRACT *, DETAIL
START REPLICAT *
INFO REPLICAT *, DETAIL

To exectue these obey commands from the command line, you need to use the ALLOWNESTED command:

ALLOWNESTED
OBEY adder.oby