QM Command Options

QM Command Options

Top  Previous  Next


The QM executable stored in the bin subdirectory of the QMSYS account has a number of command line options. The command options shown below are all case insensitive. To comply with Linux conventions options may be also used with a double hyphen prefix.


-nLogs the user in as user n where the value of n must be in the range of user numbers reserved with the FIXUSERS configuration parameter. If the FIXUSERS parameter has not been set, the full range of QM user numbers is available for use in this way. If there is already a user logged in with this user number, the login fails. If the value of n is not within the reserved range, the parameter is ignored.


-ACauses QM to prompt for the account name on entry.


-AnameEnters account name unless there is a fixed account name defined for the user name of the user entering QM. Note that there is no space before the account name.


-DLInitiate device licensing negotiation for entry to QM from the operating system command prompt.


-K nKill the QM process for user n.


-K PID nKill the QM process for operating system process id n.


-K userKill all QM processes for login id user.


-K allKill all QM processes.


-LApply a new licence.


-UList current QM users. Append X (qm -ux) for an extended report that shows how many licensed users have been consumed and the login time and account name for each process.


-CLEANUPScans QM's internal list of users to identify any processes that have terminated abnormally and, if found, tidies up from the lost process.



-HELPDisplay usage help.



-LOCKSShow record locks.



-PHANTOM cmdExecutes cmd as a phantom process.


-QUIETSuppresses display of release information, VOC upgrade prompts, etc on entry to QM. Useful in some scripted sessions.


-RESTARTRestart QM (not Windows).


-RESUMEResume database updates.



-STARTStart QM (not Windows).



-STATUSShows the QM startup time and the current number of users in each process class.


-STDOUT(Windows only) QM normally uses the Windows console APIs to output data to the screen. This option causes it to use the stdout file handle and is of use when capturing the output or piping it into other processes. It should not be used for normal terminal output as some display features may not work with this option.


-STOPStop QM (not Windows).


-SUSPENDSuspend database updates.


-SYSIDDisplay system id code.


-TERM xxxSets the initial terminal type. This may be changed later from within the application. If this option is not used, QM defaults to the value of the operating system TERM environment variable or, if this is not defined, vt100.


-UTF8Sets the terminal mode as UTF-8 (Not Windows).


-VERSIONDisplays version information.



It is also possible to execute a QM command directly from the operating system command prompt by appending it to the start up of the QM session, after any other command options. For example:


Note that quotes may be needed if the QM command contains any characters with special meaning to the operating system. Use of QM in this way can be detected by use of the SYSTEM(1026) function that will return the command (e.g. RUN OVERNIGHT in the above example).



Environment Variables


QMDLIf defined, entry to QM from the operating system command prompt behaves as though the -DL option had been used.


QMSYSNormally the location of the QMSYS directory is derived from the pathname of the QM executable as this is installed in the bin subdirectory of the QMSYS account. This variable specifies an alternative default location for the QMSYS account directory. It is also used by QMConnectLocal() if a non-default location is used.


TMPSpecifies the location of temporary directory if the TEMP configuration parameter is not set.