SET command
Sets a configurable Analytics option.
Note
The SET command sets an Analytics option for the duration of the Analytics session only. This behavior applies whether you use the SET command in the Analytics command line or in an Analytics script.
To set Analytics options so that they persist between Analytics sessions, you must use the Options dialog box. For more information, see Configuring ACL options.
Syntax
Syntax |
Examples and remarks |
||||
---|---|---|---|---|---|
SET BEEP value |
SET BEEP 2 Specifies the number of beeps to sound when command processing is completed. The value parameter must be between 1 and 255. |
||||
SET CENTURY value |
SET CENTURY 40 Specifies the start-of-century year for two-digit years. The value parameter must be from 0 to 99. Setting the start-of-century value to 40 means that two-digit years 40 to 99 are interpreted as 1940 to 1999, and two-digit years 00 to 39 are interpreted as 2000 to 2039. |
||||
SET CLEAN {ON | OFF} |
SET CLEAN ON When this option is turned on, Analytics replaces invalid character data with blanks and invalid numeric data with zeros. |
||||
SET DATE <TO> {0 | 1 | 2 | string} |
SET DATE "YYYY/MM/DD" Specifies how Analytics displays dates, and the date portion of datetimes, in views, reports, and exported files.
|
||||
SET DELETE_FILE ON Default setting: OFF Specify ON to automatically delete the associated data file when you delete a table layout. Specify OFF to prevent the associated data file from being deleted when you delete a table layout. You must include the underscore ( _ ) in DELETE_FILE. Specifying SET DELETE_FILE, without any parameter, in the command line displays whether DELETE_FILE is currently on or off. Caution Use caution when turning this option on. It may be an original data file that is deleted along with the table. Data files are deleted outright. They are not sent to the Windows Recycle Bin. |
|||||
SET DESIGNATION value |
SET DESIGNATION "Produced by ABC Corporation" The value parameter is a quoted string that specifies the label to display at the top of each printed page. |
||||
SET ECHO {ON | NONE} |
SET ECHO NONE COM Commands and results in scripts excluded from log. SET ECHO ON Specify NONE to stop writing commands and results in scripts to the Analytics command log. Specify ON to resume logging. The SET ECHO command applies only to the logging of commands and results in scripts. Commands performed through the user interface or issued from the command line, and any results they produce, are always logged, regardless of how ECHO is set. You can issue the SET ECHO NONE/ON command in a script or from the command line, but regardless of where you issue the command, it affects only the logging of commands and results in scripts. Specifying SET ECHO, without any parameter, in the command line displays whether the logging of commands and results in scripts is currently on or off. |
||||
SET EXACT {ON | OFF} |
SET EXACT ON Default setting: OFF Controls how Analytics compares character fields, expressions, or literal values. Note Blank spaces are treated like characters.
For more examples illustrating SET EXACT, see "Exact Character Comparisons" in Table tab (Options dialog box). You can use the ALLTRIM( ) function to remove leading and trailing blank spaces and ensure that only text characters and internal spaces are compared. For example: ALLTRIM(" AB") = ALLTRIM("AB") is True when the values are wrapped with ALLTRIM( ), but False otherwise. Some Analytics commands and functions are affected by SET EXACT and some are not:
|
||||
SET FILTER <TO> {test | filter_name} |
SET FILTER TO ProdNo = "070104347" SET FILTER TO ProdNoFilter Creates a global filter (view filter) on the open table, and specifies either a logical test, or the name of an existing saved filter. Specifying SET FILTER, without any parameter, removes any filter from the open table. |
||||
SET FOLDER folder path |
Specifies the Analytics project folder in the Overview tab for command output. The default output folder is the folder containing the active table. This a DOS-style path using the format /foldername/subfoldername, in which the initial slash (/) indicates the root level in the Overview tab. You must specify a full file path.
The output folder remains as whatever you set it – until you reset it, or close the project. Upon opening the project, the output folder reverts to the default of the active table folder. |
||||
SET FORMAT {ON | OFF} |
SET FORMAT ON Default setting: OFF If you use the ON parameter, Analytics automatically displays the current table layout and computed field definitions when you open a new table. The results appear in the command log. |
||||
SET FUZZYGROUPSIZE <TO> num |
SET FUZZYGROUPSIZE TO 10 Specifies the maximum number of items that can appear in a fuzzy duplicate group in the output results. The num parameter cannot be less than 2 or greater than 100. The default size is 20. The specified size remains in effect for the duration of the Analytics session. |
||||
SET GRAPH type |
SET GRAPH LINE Specifies the graph type to use for all subsequently generated graphs. The commands run must be compatible with the specified graph type. For example, the BENFORD command cannot produce a PIE2D or PIE3D chart. If an incompatible graph type is specified the default graph type is used (BAR3D). The type parameter must be one of the following:
|
||||
SET HISTORY <TO> value |
SET HISTORY TO 50 Specifies the maximum number of table history entries to retain. The value parameter must be between 1 and 100. |
||||
SET INDEX <TO> value |
SET INDEX TO "CustomerCode.INX" Specifies the index to apply to the active table. |
||||
SET LEARN <TO> script |
SET LEARN TO InventoryRec Specifies the name of the script file that the Script Recorder uses to record commands. |
||||
SET LOG <TO> {file | OFF} |
SET LOG TO "analysis.log" SET LOG OFF The first command switches logging to the specified log. If the specified log does not exist, it is created. The second command restores logging to the original Analytics command log. Note The maximum length of an Analytics project path and log name is 259 characters, which includes the file path, the log name, and the file extension (.log). |
||||
SET LOOP <TO> num |
SET LOOP TO 20 Specifies the maximum number of loops that can be executed by the LOOP command before the command is terminated. The num range is 0 to 32767, where 0 turns off loop testing. |
||||
SET MARGIN side <TO> value |
SET MARGIN TOP TO 100 Specify LEFT, RIGHT, TOP, or BOTTOM for the side parameter. If you want to change the margin on all sides, you need to specify each margin with a separate SET MARGIN command. Specifying a value of 100 creates a margin of 1 inch. |
||||
SET MATH TO MIN Default setting: MAX Specifies how decimal precision works when two operands are evaluated in a numeric expression.
In multi-operand expressions, the SET MATH setting works on a pairwise basis, applying the specified setting to each pair of operands, rounding as necessary, as they are evaluated in the standard mathematical order (BOMDAS). If the SET MATH setting reduces the number of decimal places in a result, the result is rounded, not truncated. For more information, see Controlling rounding and decimal precision in numeric expressions. Note You cannot use SET MATH while an Analytics table is open. |
|||||
SET MONTHS <TO> string |
Specifies the default three-character abbreviations for month names. The string parameter is the list of month abbreviations separated by commas. |
||||
SET NOTIFYFAILSTOP {ON | OFF} |
SET NOTIFYFAILSTOP ON Default setting: OFF
|
||||
SET NOTIFYRETRYATTEMPTS <TO> num |
SET NOTIFYRETRYATTEMPTS TO 10 Specifies the number of times the NOTIFY command will attempt to send an email if the initial attempt is unsuccessful. Enter a number from 0 to 255. If you enter 0, no additional attempts are made after an initial failure. The default is 5. One possible reason for the NOTIFY command failing to send an email is that the email server is unavailable. |
||||
SET NOTIFYRETRYINTERVAL <TO> seconds |
SET NOTIFYRETRYINTERVAL TO 30 Specifies the amount of time in seconds between NOTIFYRETRYATTEMPTS. Enter a number from 1 to 255. The default is 10 seconds. |
||||
SET ORDER <TO> values |
Specifies the sort sequence for character fields. The values parameter lists all of the character for the selected sort order. |
||||
SET OVERFLOW {ON | OFF} |
SET OVERFLOW OFF Default setting: ON If OFF is specified Analytics does not stop processing when an overflow error occurs. |
||||
SET PASSWORD 1 TO "password123" Used to create a password definition, and specify a password value, for unattended script execution. The num parameter uniquely identifies the password definition and must be a value from 1 to 10. Specify the password value as a quoted string. |
|||||
SET PERIODS <TO> value <,...n> |
SET PERIODS TO "0,30,90,180,10000" Specifies the default aging periods used by the AGE command. |
||||
SET PICTURE format |
SET PICTURE "(9,999,999.99)" Specifies the default formatting for numeric values. |
||||
SET READAHEAD <TO> size |
Specifies the size of the data block read. You should only change this setting if you are advised to do so by Support. |
||||
SET RETRY <TO> num SET RETRYIMPORT <TO> num |
SET RETRY TO 50 Specifies the number of times Analytics attempts to import or export data if the initial attempt is unsuccessful. Enter a number from 0 to 255. If you enter 0, no additional attempts are made after an initial failure. The default is 0. There is no waiting period between retry attempts. Each successive attempt is made immediately after a preceding failure. The ability to specify retry attempts is useful when connecting to databases or cloud data services, which can be temporarily unavailable. Applies to the following commands:
Note SET RETRYIMPORT is retained for backward compatibility. SET RETRYIMPORT and SET RETRY perform identical actions. |
||||
SET SAFETY {ON | OFF} |
SET SAFETY OFF Specify ON to display a confirmation dialog box when overwriting any of the following:
Specify OFF to prevent the dialog box from being displayed. Specifying SET SAFETY, without any parameter, in the command line displays whether SAFETY is currently on or off. |
||||
SET SEPARATORS <TO> values |
SET SEPARATORS TO ".,," Specifies the default decimal, thousands, and list separators used by Analytics. The SET SEPARATORS values must be three valid separator characters in the following order:
Among the three separators, the decimal separator must be unique. You must specify all three separators when you use the command. The list separator is used primarily to separate function parameters. |
||||
SET SESSION <session_name> |
SET SESSION SET SESSION "Analysis" Creates a new session in the Analytics command log. The session is identified by the current timestamp. The optional session_name allows you to add up to 30 characters of additional identifying information. Quotation marks are permitted but not required. |
||||
SET SORTMEMORY num |
SET SORTMEMORY 800 Specifies the maximum amount of memory allocated for sorting and indexing processes. The num parameter must be a value from 0 to 2000 megabytes (MB), to be entered in 20MB increments. If the sort memory is set to 0, Analytics uses the memory currently available. |
||||
SET SUPPRESSTIME ON Default setting: OFF Only for use when defining an Analytics table that uses an ODBC data source (IMPORT ODBC command), or direct database access (DEFINE TABLE DB command). If you use the ON parameter, when defining the table Analytics suppresses the time portion of datetime values. For example, 20141231 235959 is read, displayed in views, and subsequently processed as 20141231. Including this command in a pre-datetime Analytics script (pre v.10.0) that assumes the time portion of datetime data will be truncated allows the script to run in the datetime-enabled version of Analytics. Analytics suppresses the time portion by using only the date portion of the datetime format. The time data is still present in the .fil file or the database table. If required, you can redefine the field or define a new field to include the time portion of the data. If SET SUPPRESSTIME = OFF, Analytics tables defined using ODBC or direct database access include full datetime values. You can issue the SET SUPPRESSTIME ON/OFF command in a script or from the command line. Specifying SET SUPPRESSTIME, without any parameter, in the command line displays whether the suppression of the time portion of datetime data is currently on or off. |
|||||
SET SUPPRESSXML {ON | OFF} |
SET SUPPRESSXML ON Default setting: OFF Specifies that command output is in plain text rather than formatted text. |
||||
SET TEST {ON | OFF} |
SET TEST ON Specifies whether the results of IF, WHILE, FOR, and NEXT tests associated with GROUP commands should be recorded in the log. |
||||
SET TIME <TO> string |
SET TIME "hh:mm:ss PM" Specifies how Analytics displays the time portion of datetimes, and standalone time values, in views, reports, and exported files. When using the SET TIME command to specify time formats, you must use 'h' for Hour, 'm' for Minute, and 's' for Second, even if you have specified different time format characters in the Options dialog box. For example: SET TIME TO "hh:mm" |
||||
SET UTCZONE {ON | OFF} |
SET UTCZONE OFF Default setting: ON
For example:
Conversion of local time to UTC is for display purposes only, and does not affect the source data. You can change back and forth between the two different display modes whenever you want to. |
||||
SET VERIFY {ON | OFF | BLANK} |
SET VERIFY ON When ON is specified, Analytics automatically checks whether the contents of a data field correspond to the field's data type in the table layout whenever a table is opened. When BLANK is specified, Analytics replaces invalid character data with blanks and invalid numeric data with zeros, in addition to the verification described for the ON parameter. |
||||
SET WIDTH <TO> characters |
SET WIDTH TO 20 Specifies the default display width in characters for numeric computed fields or ad hoc numeric expressions when Analytics cannot determine the maximum width. |