You are here: Automating Analyzer > Using the Procedure Editor > Setting Preferences in Procedures

Setting Preferences in Procedures

Users are encouraged to set all necessary preferences required to ensure an accurate and intended result within their procedure.

To facilitate this process, and to make it as simple as possible, Analyzer offers a couple of useful features:

Prior to running a procedure, Analyzer stores the current settings (preferences). The stored settings are restored when the procedure completes running. This ensures that running a procedure and issuing SET commands only temporarily changes the users preferences.

Note: This explicitly means that running a procedure cannot permanently change any user set system preferences.

Using the SET DEFAULT command (the equivalent of the SET DEFAULT button in any of the Tools/Options tabs), users can have the procedure temporarily restore factory defaults (based on the language version of Analyzer being used) for the duration of the procedure being run. Normally followed by key SET commands that put the Analyzer environment into the correct state for achieving the intended procedure result without permanently changing the users own preferred settings.

These two features allow multiple users to run the same procedure and obtain the same intended results, using settings established within the procedure, without permanently changing their own preferred settings.

For example:

SET DEFAULT

SET SAFETY ON

SET EXACT ON

These commands would appear at the top of the calling procedure, setting default preferences (SET DEFAULT) and then specifying the correct preferences for overwriting files without prompting (SET SAFETY) and specifying that exact character comparisons are not required (SET EXACT ON).

For more information on setting preferences see Set with Preference Equivalents, and see Set with No Preference Equivalents.