DEC AXP OSF/1 Minitab Release 9.1 User's Guide Copyright (C) 1994 Minitab Inc. All Rights Reserved May 1994 This document describes how to use Minitab in the DEC AXP OSF/1 environment. The simplest way to use Minitab is to just type the command minitab after logging in to your UNIX system, execute the desired Minitab commands and then exit Minitab with the stop command. Occasionally, you may find some of the additional features described below to be helpful. 1 Command Options The Minitab program has two options available from the command line. The first option is: o -n This is the nostartup option. Normally, Minitab will look in o Your current directory o your home directory o any default macro directories set up by your system administrator and o any macro directories you have set up with the MTBMACRO environment variable for the file startup.MAC or startup.MTB. Minitab stops searching when it finds it, executes it and then provides the interactive MTB> prompt. Using the -n control argument tells Minitab to skip this process and go directly to the prompt. The startup file may be used to automatically set up an outfile, define graphics devices or any other routine chores. As a side note, if you have both a startup.MAC and a startup.MTB file in the same directory, Minitab will execute the startup.MAC file and ignore the .MTB file. The second option is: o -f file This option will execute the Minitab macro named file after executing the startup.MAC or startup.MTB file. Like the startup file, after the commands in the file are executed, you will be at the MTB> prompt. Putting a STOP command as the last line of the file will cause Minitab to finish, allowing Minitab to run without any intervention. This may be useful in scripts and batch jobs to perform routine data anaylsis tasks, particularly when used in conjunction with OUTFILE commands and i/o redirection. The file should have the suffix .MTB and may be supplied as a pathname or as a filename. If only the filename is supplied, Minitab will search through its macro paths for the specified file. NOTE: only EXEC macros (*.MTB files) are supported with the -f option. When used in conjunction with the -n option, this has the effect of replacing the standard startup file with file. 2 Macro Paths Minitab utilizes a search path facility to locate macros (files ending .MTB used by the EXEC command, or files ending in .MAC used by the new % macro facility). By default, Minitab looks in the following directories in this order: o Your current working directory o Your home directory o Any macro directories set up by your System Administrator o Any directories set up by you through the MTBMACRO enivronment variable If you have a number of Minitab macros that you find yourself using, it may be useful to set up a directory to keep them all together. If you put the names of the directories, separated by colons, into the environment variable MTBMACRO, Minitab will add them to its search paths. If, for example, you had two directories under your home directory called macro1 and macro2, you could put this line in your .profile (using either the Bourne or Korn shell): MTBMACRO=$HOME/macro1:$HOME/macro2 export MTBMACRO If you use the C shell, you would put the line setenv MTBMACRO $HOME/macro1:$HOME/macro2 in your .login file. If Minitab cannot find a directory in the search list, it will silently ignore it. 3 Environment Variables Minitab will allow you to use environment variables in file pathnames. You can access any of your environment variables, provided you have exported them (Bourne or Korn shells). The C shell automatically makes available any variables set with setenv. As an example, if you have defined an environment variable called FILEDIR that contains the path of a directory of data files, you could type MTB> read '$FILEDIR/datafile' c1-c5 Note that the variable is preceded by a $ exactly as you would reference it at your shell prompt. The only restriction is that environment variables must be separated from the rest of the path by slashes as shown above. A construction such as 'data$FILEDIR' would not be recognized. If you put the entire path for a file in an environment variable, you must also include the appropriate suffix. Minitab will not add suffixes to that part of a path that is expanded from an environment variable. Depending on your environment, this facility could save a lot of typing. Minitab also predefines an environment variable for you called MTB_DIR. This variable contains the path on your system for the Minitab handbook data sets and worksheets. As an example, you can retrieve the Pulse data worksheet with the following command: MTB> retr '$MTB_DIR/pulse' This variable is only defined while you are in Minitab. To get a listing of the data directory while you are in Minitab, type this command: MTB> system ls $MTB_DIR 4 The Worksheet Size Unless your System Administrator has changed the Minitab configuration during the installation process, Minitab will use a default worksheet size of 100,000 elements. In the event that the default size is not large enough for your problem, you can increase the worksheet size by using the environment variable MINISIZE. Simply set this variable to the size you need before starting Minitab. For example (again using the Bourne or Korn shell): MINISIZE=302000 export MINISIZE will set up a worksheet of 300,000 elements. The worksheet size is always 2,000 less than the value specified (Minitab uses this extra space for overhead). The worksheet size is limited only by the memory and process constraints on your system. If you request a size that cannot be allocated on your system, Minitab will issue a warning message and use the default value. Please note that extremely large problems may execute slowly. 5 High Resolution Graphics Minitab supports high resolution graphics with the G series of commands (GPLOT, GBOX, etc.). In order to use these, you need to o Use the GOPTIONS command from within Minitab to define a graphics device. For example goptions; device=`tek4010'. sets up Minitab to use a Tektronix 4010 type device. You can use the UNIX command ls /usr/local/lib/minitab/graphics to get a list of supported graphics devices. Here are some of the devices supported by Minitab: Autograph X5A Hewlett Packard Laser Jet Autograph XK1 Tab Cifer 2634 Tektronix 4010 Cifer T5 Tektronix 4014 Dalcoll 249 Tektronix 4015 HDS terminal Tektronix 4105 Hewlett Packard 150 Tektronix 4112 Hewlett Packard 7470 DEC ln03 printer Hewlett Packard 7475 DEC VT125 Hewlett Packard 7550 DEC VT240 You also need to o Use a compatible graphics device. This may be a real graphics terminal, a PC with a graphics emulation program (eg, kermit will emulate a Tektronix 4010) or an xterm window set to Textronix emulation mode. The xterm option is available on your console screen only if you have your vendor's X window system installed. Check your system documentation for details. To select the Tektronix emulation mode while running xterm, hold down the control key while clicking the left mouse button to get the mode menu and then select the Tektronix mode. Some versions of xterm may require a control option when starting up in order to use a Tektronix emulation window. On some systems, the window may be larger than the screen area and should be resized to fit your available screen. See the next section for more information on using Minitab on workstations. Professional Graphics, which is part of the Enhanced Version of Minitab, is not currently available on the AXP OSF/1 platform. 6 Using Minitab on Workstations If you regularly use a workstation that supports the X windowing system, you can easily set up your environment so that Minitab automatically comes up in a Tektronix emulation window. The following discussion assumes that your system is using the MIT X11 R4 version of the xterm program. If your vendor does not use this program, check your local documentation for equivalent options. You should be able to perform this setup on almost all systems running X. In addition, you must have the X environment active for the following commands to work. If you do not, see your local "Xpert" or contact your system vendor. One easy way to get Minitab started correctly is to set up an alias. This goes in your .cshrc file if you use the C shell or in your .profile file if you use the Bourne or Korn shells. In the C shell the command would look like this: alias xmtb "xterm -t -T Minitab -n minitab -e minitab &" In the Korn shell, use alias xmtb="xterm -t -T Minitab -n minitab -e minitab &" This sets up an alias that makes the string xmtb equivalent to the rest of the string. Once defined, whenever you type xmtb. you will start up an xterm window which will immediately start up Minitab. The Bourne shell does not really support aliases, but you can define a variable with xmtb="xterm -t -T Minitab -n minitab -e minitab &" export xmtb and then use $xmtb as the equivalent. Another option that works with all shells is to put the "xterm ..." line without the quotes into a file called xmtb, put the file in a directory locatable by your PATH (usually $HOME/bin), and mark the file executable with a chmod command (chmod 555 xmtb). This has the same effect as an alias - you just type the name of the file and all commands contained in it will be executed. The xterm options are as follows: 1. -t _ Start up in Tektronix emulation mode 2. -T Minitab _ Title the window "Minitab" 3. -n minitab _ Name the icon "minitab" 4. -e minitab _ Start up the Minitab program in the window 5. & will let Minitab run without blocking the process which started the window If your Tektronix emulation window size does not meet your requirements, you can add the argument string -xrm "*tekGeometry:x" to the alias string and replace and with the size in pixels of each dimension. Offsets are used for and and can be used to position the window on your screen. The values +0+0 will put the window flush to the upper left of your screen. You need the double quotes to prevent the "*" from being expanded by the shell. For example, the C shell alias command alias xmtb 'xterm -t -xrm "*tekGeometry:300x500+0+0"-T Minitab -n minitab -e minitab &' will set up a Tektronix emulation window 300 pixels wide by 500 pixels high flush with the upper left corner of your screen. Note the use of single and double quotes with the alias command. See your local X documentation for more information on geometry specifications. Executing the Minitab STOP statement will close the window and remove it from your screen. If you use Minitab frequently, you can add the argument -iconic before the -e minitab and it will start up as an icon. Then, whenever you need to use Minitab, just double click on the icon. If you put the xterm command (without the alias) in your .Xdefaults file, you will always have a Minitab window available. You can also put the command into your .login or .profile file as long as it is done after you have started X. Using any of these methods, you should be sure to make a startup file in your home directory with the following lines in it: goptions; device='tek4014'. This will insure that Minitab is always configured to use the high resolution graphics commands. 7 Miscellaneous Minitab reads commands from standard input and writes to standard output, so it is possible to redirect these using the shell `<' and `>' operators. When redirecting output in this manner, the MTB> prompt is written to stderr, so it will appear on your terminal unless specifically redirected. For example, you can suppress the prompt entirely by directing standard error to the null device with this command line for the C shell: minitab >&2 /dev/null or, for the Bourne or Korn shells: minitab 2> /dev/null When redirecting input from a file, it may be useful to include the BATCH command in the input stream. Minitab filenames are case sensitive with uppercase extensions. The file startup.MTB is different from the file STARTUP.MTB. On input, if Minitab cannot locate the file, it will try using the same name without the suffix. On output, Minitab always uses a suffix. These suffixes are: o .DAT - used for data files o .MTW - used for worksheets o .MTP - used for portable worksheets o .MAC - used for new % macros o .MTB - used for old style EXEC macros o .MTJ - used for JOURNAL files o .LIS - used for output files o .PLT - used for plot files Minitab supports pathnames up to 120 characters long. If you explictly include a suffix, Minitab will use the name exactly as supplied. Known problems and work-arounds are contained in the file /usr/local/lib/minitab/PROBLEMS9.DOC Additional information is available in the file /usr/local/lib/minitab/troubleshoot9.doc Your System Administrator should let you know if this file is moved from this directory. If you have problems that cannot be resolved locally, please contact us. Our address, telephone and fax numbers are: Minitab, Inc. 3081 Enterprise Dr. State College, PA 16801 Phone: (814) 238-3280 Fax: (814) 238-4383 7