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. Only a subset of options are available in the Options dialog box. For more information, see Configuring Analytics options.
Syntax
Syntax |
Examples and remarks |
||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
SET BEEP 2 Default setting: 0 Specifies the number of beeps to sound when command processing is completed. The value parameter must be between 0 and 255. Specifying 0 turns off the beep. Options dialog box: Interface options |
|||||||||||||||||||||||||||||||||||||||||
SET CENTURY 40 Default setting: 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. Options dialog box: Date and Time options |
|||||||||||||||||||||||||||||||||||||||||
SET CLEAN ON When this option is turned on, Analytics replaces invalid character data with blanks and invalid numeric data with zeros. |
|||||||||||||||||||||||||||||||||||||||||
SET DATE "YYYY/MM/DD" Default setting: MM/DD/YYYY Specifies the display format for dates, and the date portion of datetimes, in views, reports, and exported files.
Options dialog box: Date and Time options |
|||||||||||||||||||||||||||||||||||||||||
SET DELETE_FILE ON Default setting: OFF Controls whether the data file (*.fil) associated with a table layout is automatically deleted when you delete the table layout.
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. 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. Options dialog box: Table options |
|||||||||||||||||||||||||||||||||||||||||
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. Options dialog box: View options |
|||||||||||||||||||||||||||||||||||||||||
SET ECHO NONE Controls whether commands and results in scripts are saved to the Analytics command log.
Note The SET ECHO command applies only to the logging of commands and results in scripts. Commands performed through the Analytics user interface or issued from the command line, and any results they produce, are always logged, regardless of how ECHO is set. 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 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 options. 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:
Options dialog box: Table options |
|||||||||||||||||||||||||||||||||||||||||
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 /Tables/Results 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 Default setting: OFF Controls whether Analytics automatically displays the current table layout and computed field definitions when you open a new table.
Options dialog box: Table options |
|||||||||||||||||||||||||||||||||||||||||
SET FUZZYGROUPSIZE TO 10 Default setting: 20 items 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 specified size remains in effect for the duration of the Analytics session. |
|||||||||||||||||||||||||||||||||||||||||
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 50 Specifies the maximum number of table history entries to retain. The value parameter must be between 1 and 100. |
|||||||||||||||||||||||||||||||||||||||||
SET INDEX TO "CustomerCode.INX" Specifies the index to apply to the active table. |
|||||||||||||||||||||||||||||||||||||||||
SET LEARN TO InventoryRec Specifies the name of the script file that the Script Recorder uses to record commands. |
|||||||||||||||||||||||||||||||||||||||||
SET LOCKAUTOSAVEFILE ON Default setting: OFF Specifies the mechanism for saving data to the Analytics log file (*.LOG).
|
|||||||||||||||||||||||||||||||||||||||||
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 100 For records processed by the LOOP command, specifies the maximum number of commands that can be executed for any single record. The num range is 0 to 32767. Specifying 0 turns off the limit on command executions per record. Caution If you specify 0 you risk a script entering an infinite loop. A best practice is to always specify a SET LOOP limit. How command executions per record are calculated For a specific record, the number used to compare against the SET LOOP maximum is the total of all commands in the GROUP-LOOP block that processes the record. The command breakdown is shown below. Tip To understand how the total number of commands for a record are calculated, you can manually count the commands, line by line, in a GROUP-LOOP block. Start with the GROUP command and finish with the END command that terminates the GROUP command. When you get to the LOOP command, you need to account for the number of times that the loop iterates for a particular record. See the command breakdown below for details. Remember that variable assignments are commands. The optional ASSIGN command keyword is often omitted. Comments are also commands (COMMENT).
|
|||||||||||||||||||||||||||||||||||||||||
SET MARGIN TOP TO 100 Default setting: 51 (51/100 of an inch) 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. Options dialog box: Print options |
|||||||||||||||||||||||||||||||||||||||||
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 "Ene,Feb,Mar,Abr,May,Jun,Jul,Ago,Set,Oct,Nov,Dic" Specifies the default three-character abbreviations for month names. The string parameter is the list of month abbreviations separated by commas. Options dialog box: Date and Time options |
|||||||||||||||||||||||||||||||||||||||||
SET NOTIFYFAILSTOP ON Default setting: OFF Controls script behavior if the NOTIFY command fails.
Options dialog box: Command options |
|||||||||||||||||||||||||||||||||||||||||
SET NOTIFYRETRYATTEMPTS TO 10 Default setting: 5 attempts 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. One possible reason for the NOTIFY command failing to send an email is that the email server is unavailable. Options dialog box: Command options |
|||||||||||||||||||||||||||||||||||||||||
SET NOTIFYRETRYINTERVAL TO 30 Default setting: 10 seconds Specifies the amount of time in seconds between NOTIFYRETRYATTEMPTS. Enter a number from 1 to 255. Options dialog box: Command options |
|||||||||||||||||||||||||||||||||||||||||
SET ORDER TO aAbBcC... SET ORDER Default setting: system default Specifies the sort sequence for character fields. The values parameter lists all the characters for the specified sort order. The second command returns the sort sequence to its system default setting. For more information, see The Sort Order option and sort sequences . |
|||||||||||||||||||||||||||||||||||||||||
SET OVERFLOW OFF Default setting: ON Controls script behavior if a numeric overflow occurs.
Options dialog box: Numeric options |
|||||||||||||||||||||||||||||||||||||||||
SET PASSWORD 1 TO "password123" Creates a password definition, and specifies 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. Caution The SET PASSWORD command exposes an actual password in clear text in a script, which may not be appropriate for your situation. As a more secure alternative, you can use the PASSWORD command to prompt for a password at the beginning of script execution, and temporarily and securely stored the password value in memory. |
|||||||||||||||||||||||||||||||||||||||||
SET PERIODS TO "0,30,90,180,10000" Default setting: 0,30,60,90,120,10000 Specifies the default aging periods used by the AGE command. Options dialog box: Date and Time options |
|||||||||||||||||||||||||||||||||||||||||
SET PICTURE "(9,999,999.99)" Default setting: -999999.99 Specifies the default formatting for numeric values. Options dialog box: Numeric options |
|||||||||||||||||||||||||||||||||||||||||
SET READAHEAD TO 100 Default setting: 33 kilobytes Specifies the size of the data block read (data buffer) in kilobytes. Enter a number from 5 to 255. You should only change this setting if you are advised to do so by Support. Options dialog box: Table options |
|||||||||||||||||||||||||||||||||||||||||
SET RETRYIMPORT <TO> num |
SET RETRY TO 20 Default setting: 0 attempts Specifies the number of times Analytics attempts to execute a command 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. There is a 1 second waiting period between retry attempts. The ability to specify retry attempts is useful when connecting to databases or cloud data services, which can be temporarily unavailable. Retrying a command can also help if you encounter issues with writing data to disk, or reading data from disk. SET RETRY applies to the following commands:
Note SET RETRYIMPORT is retained for backward compatibility. SET RETRYIMPORT and SET RETRY perform identical actions. Options dialog box: Command options |
||||||||||||||||||||||||||||||||||||||||
SET SAFETY OFF Default: ON Controls whether a confirmation dialog box appears before overwriting any of the following items:
Specifying SET SAFETY, without any parameter, in the command line displays whether SAFETY is currently on or off. Options dialog box: Interface options |
|||||||||||||||||||||||||||||||||||||||||
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. Options dialog box: Numeric options |
|||||||||||||||||||||||||||||||||||||||||
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 800 Default setting: 0 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. Options dialog box: Table options |
|||||||||||||||||||||||||||||||||||||||||
SET SUPPRESSTIME ON Default setting: OFF Controls whether Analytics suppresses the time portion of datetime source data. Note This setting is 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).
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 Default setting: OFF Controls whether command output to screen appears as plain text or formatted text.
Specifying SET SUPPRESSXML, without any parameter, in the command line displays whether the setting is currently on or off. Options dialog box: Command options |
|||||||||||||||||||||||||||||||||||||||||
SET TEST ON Default setting: ON Controls whether the results of IF, WHILE, FOR, and NEXT tests associated with GROUP commands are recorded in the log.
Options dialog box: Command options |
|||||||||||||||||||||||||||||||||||||||||
SET TIME "hh:mm:ss PM" Default setting: hh:mm:ss PM Specifies the display format for 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" Options dialog box: Date and Time options |
|||||||||||||||||||||||||||||||||||||||||
SET UTCZONE OFF Default setting: ON Controls the display of time data that includes a UTC offset. UTC is Coordinated Universal Time, the time at zero degrees longitude.
For example:
Note Conversion of times 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. Options dialog box: Date and Time options |
|||||||||||||||||||||||||||||||||||||||||
SET VERIFY BLANK Default setting: OFF Controls automatic verification of data whenever a table is opened, or a field in the table is processed by a command.
Options dialog box: Numeric options |
|||||||||||||||||||||||||||||||||||||||||
SET WIDTH TO 20 Default setting: 12 Specifies the default display width in characters for numeric computed fields or ad hoc numeric expressions when Analytics cannot determine the maximum width. Options dialog box: Numeric options |