Startup Files and Restart Files

Startup files are ordinary text files that contain CANDE commands. They are identical to DO files, except that for startup files, CANDE invokes the DO command when a user logs on. Logging on in this case includes the initial log on, automatic log on via Transaction Server windows, and invocation of the HELLO command. Startup files are not invoked by commands that cause a new session to be created without a change of usercode, such as the SPLIT, CHARGE, and ACCESSCODE commands.

If the startup file facility is enabled, CANDE searches for a particular startup file when a user logs on. CANDE first searches for a file called <startup name>/<station name>. If this file is not available, CANDE then searches for a file called <startup name>. In both cases, the normal file search rules apply; that is, files are first searched for under the user's usercode, and then under the asterisk (*) usercode, on the user's primary family. If a file cannot be found on the user's primary family, an alternate family, if in effect, is searched. If CANDE cannot find a file, the search terminates.

Default files can be set up under the asterisk (*) usercode, including separate defaults for particular terminals and windows. These default files can then be overridden by user files of the same name. The user files can invoke the default files if a DO command is included in the user files.

The startup file is not processed when the work file from the previous session is recovered automatically. If the startup file facility is enabled and an automatic recovery of the work file is performed, CANDE searches for a file called <restart name>/<station name>. If this file is not available, CANDE searches for a file called <restart name>. In either case, the normal file search rules apply as with the startup file search. If CANDE cannot find a file, the search terminates. If the <restart name>/<station name> file or the <restart name> file exists, then the commands in the file are processed before the work file is recovered.

Like startup files, restart files are text files that contain CANDE commands. Unlike startup files, restart files can perform any conditioning requests that are not part of the recovered work file state. For example, the user's startup file might contain the command to run a mail facility program. The user must process any existing mail and then quit before the system can identify any recovery files. Although an active program does not prevent automatic recovery, it defers the automatic recovery until the program initiated by the startup file is terminated. Using a different restart file or using no restart file allows the recovery action to proceed.

Restart and startup files can also be used indirectly. For example, the restart file might include all commands that condition the session for the user, such as TERM specifications, or RO and SO commands that are not defined in the USERDATAFILE. The startup file could contain the command DO <restart file>, followed by commands that the user wants performed only upon initial log-on.

Example

If the <startup name> is CANDE/STARTUP, user FRED is logged on to station STA1, and the USERDATA-defined family substitution statement DISK=PRIM OTHERWISE ALT is in effect, then files are searched for in the following order:

  1. (FRED)CANDE/STARTUP/STA1 ON PRIM

  2. *CANDE/STARTUP/STA1 ON PRIM

  3. (FRED)CANDE/STARTUP/STA1 ON ALT

  4. *CANDE/STARTUP/STA1 ON ALT

  5. (FRED)CANDE/STARTUP ON PRIM

  6. *CANDE/STARTUP ON PRIM

  7. (FRED)CANDE/STARTUP ON ALT

  8. *CANDE/STARTUP ON ALT

The search for the restart file is similar to the search for the startup file.

Note: Transaction Server provides multiple logical connections between CANDE and a single physical station. CANDE treats each logical connection as an individual station (implemented as a data comm pseudostation). Transaction Server calls each connection a dialog of the CANDE window. Each pseudostation has a different name, for example, <physical station name>/CANDE/1.In a pseudostation environment a station name that is used in the file name must be the pseudostation name.