OPTION

OPTION

Top  Previous  Next

 

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.UPCASECauses the am/pm suffix displayed by some time conversions to appear in uppercase instead of the default lowercase.
ASSOC.ALLCauses 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.MVTreats 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.QUOTECauses the command processor to treat backslashes as data characters instead of being recognised as string quotes.
CATALOGUE.LOCALUse local mode cataloguing by default.
CHAIN.KEEP.COMMONRetains the unnamed common block and command processor level on use of CHAIN.
CHAINED.SELECTIf set, a query processor select operation that selects at least one record will execute any command in the DATA queue on completion. If no records are selected, the data queue is cleared.
CLEAR.SELECTClear 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.LOCKSAssociates record and file locks with the command processor level, releasing the locks at that level on completion of a command.
CORRELATIVE.NOCASECauses 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.REUSECauses 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.UPCASECauses the cr/db suffix displayed by some decimal conversions to appear in uppercase instead of the default lowercase.
CREATE.DICT.NO.CASECauses CREATE.FILE to create file dictionaries with case insensitive record ids by default.
CREATE.FILE.NO.CASECauses CREATE.FILE to create files with case insensitive record ids by default.
DEBUG.REBIND.KEYSCauses 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.MVCauses 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.DTMIf 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 Windows)
DIR.SEL.OMIT.HIDDENOmit hidden files when building a select list of items in a directory file.
DIV.ZERO.WARNINGAttempts to divide by zero in QMBasic programs should 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.ERRORCauses generation of a process dump file at a process abort such as a run time fatal error.
ED.NO.QUERY.FDSuppresses the confirmation prompt in the ED editor when using the FD command or its synonym DELETE.
FORCE.RELOADForce reload of QMBasic object code at compilation or catalogue. See the QMBasic CALL statement for more information.
INHERITPhantom processes will 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 these settings.
INHERIT.MFILE.PATHCauses CREATE.FILE to create new multifile subfiles in the same directory as the default subfile unless the PATHNAME or IN option is used.
INHERIT.OWNERSHIPCauses 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.CASECauses 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.OBJECTCauses the QMBasic compiler to retain any previous version of the compiled object code if a compilation fails.
LOCAL.CAT.RELATIVEChanges the default behaviour of local cataloguing to store the relative pathname of the program in the VOC entry.
LOCK.BEEPEmits a beep at the terminal once per second while waiting for a record or file lock.
NO.DATE.WRAPPINGSuppresses rolling of dates with over-large day numbers into the following month on input conversion.
NO.ECHO.DATASuppresses 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.NOTIFYUsed in a phantom process, this option suppresses the message normally sent to the parent process when the phantom terminates.
NO.SEL.LIST.QUERYSuppresses 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.FILTEROmit WHEN clause filtering in SELECT for compatibility with releases prior to 3.3-0.
NO.USER.ABORTSSuppresses 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.WARNINGQMBasic programs attempting to use a non-numeric value where a number is required should 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.EXPONENTWhen enabled, data of the form 123.45E-2 will be accepted as numeric.
PAGINATE.ON.HEADINGWhen 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.BREAKPOINTCauses 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.UCauses the query processor to handle the U breakpoint option differently. See the BREAK.ON and BREAK.SUP keywords for further details.
PICK.EXPLODEWhen using BY.EXP, if an associated field has only one value, do not explode this field.
PICK.GRAND.TOTALCauses the query processor to display the text of the GRAND.TOTAL keyword on the same line as the total values.
PICK.IMPLIED.EQCauses 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.MASKAllows 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.NULLCauses 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.PROCD3 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.WILDCARDCauses the query processor to recognise Pick style wildcards in equality tests as an alternative to the LIKE operator.
PROC.ACauses the Proc A(n,m) command not to terminate copying data at the end of the field.
PROC.IF.NO.CASEMakes the Proc IF command case insensitive.
QUALIFIED.DISPLAYCauses the query processor to recognise Pick style qualified display clauses.
QUERY.FOOTER.PAUSEPause for user confirmation before continuing at the end of a query that uses a page footer.
QUERY.MERGE.PRINTCauses 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.CASECauses the query processor to perform selection operations and sorting in a case insensitive manner.
QUERY.PRIORITY.ANDCauses 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.CASECauses all sort operations in the query processor to be case insensitive.
QUERY.STRING.COMPForces 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.ALLForces 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.PAGECauses 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.CASECauses 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.ERRORDisplays the call stack at a fatal program error, showing the program name, line number (where available), and object code address.
SILENT.TANDEMAllow TANDEM monitoring without a confirmation prompt.
SPACE.MCTModifies the behaviour of the MCT conversion code such that only the first character and letters immediately after a space are converted to uppercase.
SPOOL.COMMANDDisplays the operating system command used to perform printing (Diagnostic aid, not Windows).
STACKED.ACCOUNTCauses a QMBasic EXECUTE statement that switches accounts to revert to the previous account on return to the calling program.
SUPPRESS.ABORT.MSGSuppresses display of program location diagnostic information when a QMBasic ABORT statement is executed.
UNASS.WARNINGUnassigned 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.ORIn a query containing multiple WITH clauses, there is an implied OR rather than the default implied AND between these clauses.

 

 

Special short form options

 

These option.name values set multiple options. Other options that were already set when these are used will not be cleared. These names cannot be used with ON, OFF or DISPLAY.

D3This 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.
MVBASEThis 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.
PICKThis 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.WARNINGSThis option sets DIV.ZERO.WARNING, NON.NUMERIC.WARNING and UNASS.WARNING options.

 

 

See also:

OPTION()