|
The OPTION command sets, clears or displays configurable options.
To ease application portability, options that are not meaningful on a particular QM platform are ignored.
Format
OPTION {option.name... {ON | OFF | DISPLAY | LPTR {unit}} }
OPTION Xhex.string
OPTION ALL OFF
The OPTION command, normally only used in the LOGIN or MASTER.LOGIN paragraphs, sets options that determine how the system behaves for that user session. Beware that setting options in the MASTER.LOGIN paragraph will affect users of the QMSYS account and may cause some administrative commands to fail.
The ON keyword is used to set an option and is the default action if no keyword is present. The OFF keyword is used to clear an option. The DISPLAY keyword is used to display the current setting of an option.
The OPTION command with no qualifying information displays the settings of all options. The LPTR keyword directs this report to the specified print unit, printer zero if unit is omitted. When displaying all options, the final line is of the form
Encoded: X1141E0EOEO4
where the hexadecimal value can be used as the hex.string element in an OPTION command to set the options to the same state as at the time of display. This can be of use in the LOGIN paragraph to set all options to the required state in a single operation.
A single command may contain multiple option names. The ON, OFF or DISPLAY keyword, if present, may appear at any position within the list of option names.
The OPTION ALL OFF syntax turns off all options. It is useful in LOGIN paragraphs to ensure that all options are off before turning on those that are required in applications that may use LOGTO to move between accounts.
Option settings are not automatically inherited by phantom processes unless the INHERIT option described below is active.
The available options are:
| AMPM.UPCASE | Causes the am/pm suffix displayed by some time conversions to appear in uppercase instead of the default lowercase. |
| ASSOC.ALL | Causes the query processor to ignore any definitions of associations in the dictionary, treating all fields as being in the same association. Use of this option is not recommended but it may be of use when migrating applications in which the associations are not properly defined. The preferred action in this case is to correct the dictionaries. |
| ASSOC.UNASSOC.MV | Treats all multivalued fields for which no association is defined in the dictionary as being associated together. This provides close compatibility with Pick style systems but may lead to unintentional association of unrelated fields. |
| BACKSLASH.NOT.QUOTE | Causes the command processor to treat backslashes as data characters instead of being recognised as string quotes. |
| CATALOGUE.LOCAL | Use local mode cataloguing by default. If this option is not set, the default is to use private cataloguing. |
| CHAIN.KEEP.COMMON | Retains the unnamed common block and command processor level on use of CHAIN. |
| CLEAR.SELECT | Clear the default select list on return to the command processor except for commands that intentionally leave an active select list. See the QMBasic KEEP.SELECT statement. |
| COMMAND.LEVEL.LOCKS | The default behaviour of QM is that, if a file is opened to a local variable in a subroutine, any locks acquired by the subroutine are released when the subroutine returns, discarding the file variable. Use of this option associates record and file locks with the command processor level, releasing the locks at that level on completion of a command. |
| CORRELATIVE.NOCASE | Causes string operations in correlative expressions to be performed in a case insensitive manner. This option is applied when the correlative is executed, not when it is compiled. |
| CORRELATIVE.REUSE | Causes all operators in correlative expressions to behave as though the reuse (R) flag was present. This option is applied when the correlative is executed, not when it is compiled. |
| CRDB.UPCASE | Causes the cr/db suffix displayed by some decimal conversions to appear in uppercase instead of the default lowercase. |
| CREATE.DICT.NO.CASE | Causes CREATE.FILE to create file dictionaries with case insensitive record ids by default. |
| CREATE.FILE.NO.CASE | Causes CREATE.FILE to create files with case insensitive record ids by default. |
| DEBUG.REBIND.KEYS | Causes the QMBasic debugger to rebind the function keys on entry, replacing any user defined bindings with those specified in the terminfo entry for the current terminal type. |
| DEFAULT.MV | Causes C, D or I-type dictionary items in which the single/multivalue flag is blank to be treated as multivalued instead of defaulting to single valued. |
| DIR.DTM | If enabled, writes to a directory file or closing a sequential file that has been written will update the date/time modified of the directory. (Not available on Windows) |
| DIR.SEL.OMIT.HIDDEN | Omit hidden files when building a select list of items in a directory file. |
| DIV.ZERO.WARNING | Causes attempts to divide by zero in QMBasic programs to report a warning rather than a fatal error. The division will return a zero result. This option should only be used during application development as it may cause faulty applications to appear to work correctly. |
| DUMP.ON.ERROR | Causes generation of a process dump file at a process abort such as a run time fatal error. |
| ED.NO.QUERY.FD | Suppresses the confirmation prompt in the ED editor when using the FD command or its synonym DELETE. |
| FORCE.RELOAD | Forces reload of QMBasic object code at compilation or catalogue. See the QMBasic CALL statement for more information. |
| GIT | Causes .gitattributes and .gitignore to be treated as special cases in directory files, suppressing the id mapping that would otherwise substitute the leading period with %D. |
| INHERIT | Causes phantom processes to inherit the option settings of the parent process. Use of an OPTION command in the MASTER.LOGIN or LOGIN paragraphs of the phantom process may modify the inherited settings. |
| INHERIT.MFILE.PATH | Causes CREATE.FILE to create new multifile subfiles in the same directory as the default subfile unless the PATHNAME or IN option is used. |
| INHERIT.OWNERSHIP | Causes CREATE.FILE to inherit ownership (user id and group id) from the account unless overridden by command options. This option has no effect on Windows systems. |
| KEEP.FILENAME.CASE | Causes CREATE.FILE to preserve the casing of the QM name of the file when creating the operating system directories that represent this file. |
| KEEP.OLD.OBJECT | Causes the QMBasic compiler to retain any previous version of the compiled object code if a compilation fails. |
| LOCAL.CAT.RELATIVE | Changes the default behaviour of local cataloguing to store the relative pathname of the program in the VOC entry. |
| LOCK.BEEP | Emits a beep at the terminal once per second while waiting for a record or file lock. |
| NO.DATE.WRAPPING | Suppresses rolling of dates with over-large day numbers into the following month on input conversion. |
| NO.ECHO.DATA | Suppresses echoing of data read by applications from the DATA queue. Equivalent to compiling all programs with the NO.ECHO.DATA option of the $MODE compiler directive. |
| NO.PHANTOM.NOTIFY | Used in a phantom process, this option suppresses the message normally sent to the parent process when the phantom terminates. |
| NO.SEL.LIST.QUERY | Suppresses display of the confirmation prompt in commands that take an optional select list of records to process. This is equivalent to use of the NO.QUERY option to those commands. |
| NO.SEL.WHEN.FILTER | Omit WHEN clause filtering in SELECT for compatibility with releases prior to 3.3-0. |
| NO.USER.ABORTS | Suppresses all options that allow a user to generate an abort event. These are: the "Press return to continue" prompt, the pagination prompt when using the SCROLL keyword of the query processor, and the break key options. |
| NON.NUMERIC.WARNING | Causes QMBasic programs that attempt to use a non-numeric value where a number is required to use zero and report a warning rather than a fatal error. The operation will return a zero result. This option should only be used during application development as it may cause faulty applications to appear to work correctly. |
| NUMERIC.EXPONENT | When enabled, data of the form 123.45E-2 will be accepted as numeric. |
| PAGINATE.ON.HEADING | When used with the RUN.NO.PAGE option, setting a page heading or page footing will cause output pagination to be enabled. The NO.PAGE option to the RUN command can be used to override this. |
| PICK.BREAKPOINT | Causes the query processor to recognise Pick style syntax for the BREAK.ON and BREAK.SUP keywords where the optional text qualifier follows the field name rather than appearing before it. |
| PICK.BREAKPOINT.U | Causes the query processor to handle the U breakpoint option differently. See the BREAK.ON and BREAK.SUP keywords for further details. |
| PICK.EXPLODE | When using BY.EXP, if an associated field has only one value, do not explode this field. |
| PICK.GRAND.TOTAL | Causes the query processor to display the text of the GRAND.TOTAL keyword on the same line as the total values instead of the the preceding line. |
| PICK.IMPLIED.EQ | Causes the query processor to handle a selection clause that has no operator between the field name and a literal value enclosed in double quotes as though there was an EQ operator. |
| PICK.ML.CONV.MASK | Allows parenthesised format masks in the ML and MR conversion codes, disabling recognition of a left parenthesis as requesting negative values to be output in round brackets. |
| PICK.NULL | Causes the ML and MR conversion codes and format expressions that use options applicable to numeric data to return a null string for null data instead of zero. |
| PICK.PROC | D3 compatibility for PQ style Procs. Use of this option implies the PROC.A option. Note that the features covered by this option may change in future releases. |
| PICK.WILDCARD | Causes the query processor to recognise Pick style wildcards in equality tests as an alternative to the LIKE operator. |
| PROC.A | Causes the Proc A(n,m) command not to terminate copying data at the end of the field. |
| PROC.IF.NO.CASE | Makes the Proc IF command case insensitive. |
| QUALIFIED.DISPLAY | Causes the query processor to recognise Pick style qualified display clauses. |
| QUERY.FOOTER.PAUSE | Pause for user confirmation before continuing at the end of a query that uses a page footer. This option is ignored in query commands that use the NO.PAGE qualifier. |
| QUERY.MERGE.PRINT | Causes a query report directed to a printer to merge the output as continuation of the active print job if the printer is already active, leaving it active on completion of the report. Without this option, the printer is closed at the end of the report. |
| QUERY.NO.CASE | Causes the query processor to perform selection operations and sorting in a case insensitive manner. |
| QUERY.PRIORITY.AND | Causes the AND operator to take priority over the OR operator in query processor commands. This does not affect the behaviour of these operators in QMBasic programs. |
| QUERY.SORT.NO.CASE | Causes all sort operations in the query processor to be case insensitive. |
| QUERY.STRING.COMP | Forces all EQ and NE operator comparisons in query processor selection clauses to be performed as string comparisons regardless of the data type. See also the QUERY.STR.COMP.ALL option. |
| QUERY.STR.COMP.ALL | Forces all relational operator comparisons in query processor selection clauses to be performed as string comparisons regardless of the data type. See also the QUERY.STRING.COMP option. |
| RUN.NO.PAGE | Causes the RUN and DEBUG commands to start the program with screen pagination disabled. This option also affects user catalogued programs. If the PAGINATE.ON.HEADING option is set, pagination will be enabled if the application sets a page heading or page footing unless the NO.PAGE option has been used when starting the program. |
| SELECT.KEEP.CASE | Causes QM to preserve the case of record ids when building a select list from a directory file on an operating system that uses case insensitive file names. This currently only affects Windows systems. |
| SHOW.STACK.ON.ERROR | Displays the call stack at a fatal program error, showing the program name, line number (where available), and object code address. |
| SILENT.TANDEM | Allow TANDEM monitoring without a confirmation prompt. |
| SPACE.MCT | Modifies the behaviour of the MCT conversion code such that only the first character and letters immediately after a space are converted to uppercase. |
| SPOOL.COMMAND | Displays the operating system command used to perform printing (Diagnostic aid, not Windows). |
| STACKED.ACCOUNT | Causes a QMBasic EXECUTE statement that switches accounts to revert to the previous account on return to the calling program. |
| SUPPRESS.ABORT.MSG | Suppresses display of program location diagnostic information when a QMBasic ABORT statement is executed. |
| UNASS.WARNING | Unassigned variables in QMBasic programs should report a warning rather than a fatal error. This option should only be used during application development as it may cause faulty applications to appear to work correctly. |
| WITH.IMPLIES.OR | In a query containing multiple WITH clauses, there is an implied OR rather than the default implied AND between these clauses. |
Special short form options
The OPTION command allows use of shortcut names to enable multiple options in a single step. Other options that were already set when these are used will not be cleared. These names cannot be used with ON, OFF or DISPLAY. The shortcuts that give closest compatibility when migrating an application to QM are described under "Migrating to QM". The four shortcut names below are retained from QM version 3.4-17 and earlier.
| D3 | This option gives closer compatibility with D3. The options included are ASSOC.UNASSOC.MV, BACKSLASH.NOT.QUOTE, CATALOGUE.LOCAL, CHAINED.SELECT, DEFAULT.MV, DIV.ZERO.WARNING, KEEP.OLD.OBJECT, LOCK.BEEP, NO.DATE.WRAPPING, NON.NUMERIC.WARNING, PAGINATE.ON.HEADING, PICK.BREAKPOINT, PICK.BREAKPOINT.U, PICK.EXPLODE, PICK.GRAND.TOTAL, PICK.IMPLIED.EQ, PICK.ML.CONV.MASK, PICK.NULL, PICK.PROC, PICK.WILDCARD, PROC.A, QUALIFIED.DISPLAY, QUERY.NO.CASE, QUERY.PRIORITY.AND, RUN.NO.PAGE, UNASS.WARNING and WITH.IMPLIES.OR but may change in future releases. |
| MVBASE | This option gives closer compatibility with mvBase. The options included are AMPM.UPCASE, ASSOC.UNASSOC.MV, BACKSLASH.NOT.QUOTE, CATALOGUE.LOCAL, CHAINED.SELECT, CRDB.UPCASE. DEFAULT.MV, KEEP.OLD.OBJECT. LOCK.BEEP, NO.DATE.WRAPPING, PAGINATE.ON.HEADING, PICK.BREAKPOINT, PICK.EXPLODE, PICK.GRAND.TOTAL, PICK.IMPLIED.EQ, PICK.ML.CONV.MASK, PICK.NULL, PICK.PROC, PICK.WILDCARD, PROC.A, QUALIFIED.DISPLAY, QUERY.PRIORITY.AND, RUN.NO.PAGE and SELECT.KEEP.CASE but may change in future releases. |
| PICK | This option gives closer compatibility with generic Pick systems. The options included are ASSOC.UNASSOC.MV, PICK.BREAKPOINT, PICK.BREAKPOINT.U, PICK.EXPLODE, PICK.GRAND.TOTAL, PICK.NULL, PICK.WILDCARD, QUALIFIED.DISPLAY and WITH.IMPLIES.OR and these will not change in future releases. |
| QMBASIC.WARNINGS | This option sets DIV.ZERO.WARNING, NON.NUMERIC.WARNING and UNASS.WARNING options. |
See also:
OPTION(), $MODE
|