home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 3 / CDASC03.ISO / sorties / 1959 / 4os2.doc < prev    next >
Text File  |  1993-04-01  |  170KB  |  3,581 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.                             44
  9.                            44
  10.                           44        OOOOO        SSSSSS       222222
  11.                          44        OOOOOOO      SSSSSSSS     22222222
  12.                         44  44    OO     OO    SS           22     22
  13.                        44   44    OO     OO    SS                  22
  14.                       44    44    OO     OO     SSSSSS            222
  15.                      444444444    OO     OO      SSSSSS         222
  16.                       44444444    OO     OO           SS      222
  17.                             44    OO     OO           SS    222
  18.                             44     OOOOOOO     SSSSSSSS     222222222
  19.                             44      OOOOO       SSSSSS      222222222
  20.  
  21.  
  22.  
  23.  
  24.                                         Version 1.00
  25.  
  26.  
  27.  
  28.  
  29.  
  30.                                         Developed By
  31.                                   Rex Conn and Tom Rawson
  32.  
  33.                                       Documentation By
  34.                          Hardin Brothers, Tom Rawson, and Rex Conn
  35.  
  36.  
  37.  
  38.                                         Published By
  39.  
  40.                                       JP Software Inc.
  41.                                        P.O. Box 1470
  42.                                   East Arlington, MA 02174
  43.                                             USA
  44.  
  45.                                        (617) 646-3975
  46.                                      fax (617) 646-0904
  47.  
  48.  
  49.  
  50.                Program and Documentation Copyright 1988, 1989, 1990, 1991,
  51.                1992, Rex C. Conn and JP Software Inc., All Rights Reserved.
  52.                4OS2 is a trademark and 4DOS (R) is a registered trademark of
  53.                JP Software Inc.  OS/2 (R) is a registered trademark of IBM
  54.                Corporation.  Other product and company names are trademarks
  55.                of their respective owners.
  56.  
  57.  
  58.  
  59.  
  60.  
  61.                                     ACKNOWLEDGMENTS
  62.  
  63.  
  64.  
  65.  
  66.                We couldn't produce a product like 4OS2 without the dedication
  67.                and quality work of many people.  Our thanks to:
  68.  
  69.                     JP Software Staff:  Mike Bessy, Kevin Cocilo, Helen
  70.                     Coyne, Hayyim Feldman, Henry Harvey, Ellen Stone, Misty
  71.                     White.
  72.  
  73.                     Beta Test Support:  David Moskowitz, Guy Scharf, Larry
  74.                     Finkelstein, and Martin Schiff, of CompuServe's CONSULT
  75.                     forum.
  76.  
  77.                     Online Support:  Brian Miller and Tess Heder of Channel 1
  78.                     BBS; Don Watkins of CompuServe's IBMNET.
  79.  
  80.                     Beta Testers:  We can't list all of our beta testers
  81.                     here.  A special thanks to all of you who helped make
  82.                     4OS2 elegant, reliable, and friendly!
  83.  
  84.                     Help Text Conversion:  Matthew J. Palcic.
  85.  
  86.                     SHRALIAS Program:  Bill Hinkle.
  87.  
  88.  
  89.  
  90.  
  91.           The following tools are used in creating and maintaining 4OS2 and
  92.           the 4OS2 Help:
  93.  
  94.                     Compilers:        Microsoft C 6.0 and Macro Assembler 5.1
  95.                                       and 6.0
  96.                     Libraries:        Spontaneous Assembly (Base Two
  97.                                       Development)
  98.                     Editors:          Edix (Emerging Technology), Brief
  99.                                       (Borland), QEdit (SemWare)
  100.                     Version Control:  PVCS (Intersolv)
  101.                     Help Compiler:    IBM Information Presentation Facility
  102.                     Documentation:    Microsoft Word for Windows with Adobe
  103.                                       Type Manager
  104.  
  105.                                                                      CONTENTS
  106.           ___________________________________________________________________
  107.  
  108.  
  109.  
  110.           CONTENTS
  111.  
  112.  
  113.           Introduction.............................................1
  114.                How to Use This Manual..............................2
  115.  
  116.           Chapter 1 / Installation.................................4
  117.                Installing 4DOS for OS/2 DOS Sessions...............4
  118.                Installing 4OS2.....................................4
  119.                Automated 4OS2 Installation.........................5
  120.                Manual 4OS2 Installation............................6
  121.                     Manual Installation for OS/2 Version 1.x.......7
  122.                     Manual Installation for OS/2 Version 2.0.......7
  123.                     4OS2 Files and Directories.....................8
  124.                Uninstalling 4OS2...................................9
  125.  
  126.           Chapter 2 / General Concepts.............................10
  127.                Terminology.........................................10
  128.                OS/2 Sessions and Applications......................10
  129.                     Sessions and Session Types.....................11
  130.                     Applications and Application Types.............13
  131.                     Starting Sessions and Applications.............14
  132.                Creating and Configuring Icons......................15
  133.                     OS/2 Version 1.x Icons.........................15
  134.                     OS/2 Version 2.0 Icons.........................16
  135.                Primary and Secondary Shells........................17
  136.                High Performance File System (HPFS).................17
  137.                Extended Attributes.................................18
  138.  
  139.           Chapter 3 / Using 4OS2...................................20
  140.                At the Command Line.................................20
  141.                     4OS2 HELP......................................20
  142.                     Shared History and Alias Lists.................21
  143.                     Special Characters.............................22
  144.                Executable File Names...............................23
  145.                Redirection.........................................23
  146.                Piping..............................................24
  147.                4OS2 Internal Variables.............................25
  148.                4OS2 Variable Functions.............................26
  149.                Batch Files.........................................27
  150.                4OS2 Startup and Exit Files.........................28
  151.                     Using STARTUP.CMD..............................28
  152.                     Using 4START and 4EXIT.........................29
  153.                REXX Support........................................29
  154.                EXTPROC Support.....................................30
  155.  
  156.           Chapter 4 / Configuration and Tuning.....................32
  157.                Creating and Configuring 4OS2 Icons.................32
  158.  
  159.           ___________________________________________________________________
  160.           Copyright 1992, JP Software Inc.        4OS2 Reference Manual  /  i
  161.  
  162.                                                                      CONTENTS
  163.           ___________________________________________________________________
  164.  
  165.  
  166.                4OS2 Command Line Options...........................33
  167.                Using 4OS2.INI......................................35
  168.                     4OS2.INI Directives............................35
  169.                Configuring 4OS2 Help...............................36
  170.                Using 4DOS with OS/2................................37
  171.                     Changing the OS/2 CONFIG.SYS File..............38
  172.                     Using 4DOS with OS/2 Version 1.x...............39
  173.                     Using 4DOS with OS/2 Version 2.0...............40
  174.                     4DOS.INI for OS/2 Version 2.0 DOS Sessions.....42
  175.                     Startup Files for OS/2 Version 2.0 DOS Sessions43
  176.                     "Temporary" VDMs...............................44
  177.                     Configuring 4DOS for Dual Boot and Boot Manager44
  178.  
  179.           Chapter 5 / Command Reference Guide......................48
  180.                DETACH..............................................49
  181.                DIR.................................................50
  182.                DPATH...............................................51
  183.                HELP................................................52
  184.                KEYS................................................53
  185.                SETDOS..............................................54
  186.                START...............................................55
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.  
  206.  
  207.  
  208.  
  209.  
  210.  
  211.  
  212.  
  213.  
  214.  
  215.  
  216.           ___________________________________________________________________
  217.           Copyright 1992, JP Software Inc.       4OS2 Reference Manual  /  ii
  218.  
  219.                                                                  INTRODUCTION
  220.           ___________________________________________________________________
  221.  
  222.  
  223.  
  224.           INTRODUCTION
  225.  
  226.  
  227.           Welcome, and thanks for purchasing 4OS2!
  228.  
  229.           We developed 4OS2 to bring the power and convenience of our popular
  230.           4DOS program to users of the OS/2 operating system.  Whether you
  231.           are a computer novice or an experienced user, we think that 4OS2
  232.           will help you get the most out of your OS/2 system.
  233.  
  234.           4OS2, like its cousin 4DOS, is a command interpreter or "shell."
  235.           We have designed 4OS2 to be compatible with both 4DOS and with
  236.           OS/2's normal shell program, which is called CMD.EXE.
  237.  
  238.           If you are familiar with 4DOS or with the OS/2 command prompt, you
  239.           won't have to change your computing habits or unlearn anything to
  240.           use 4OS2.  If you know how to use commands to display a directory,
  241.           copy a file, or start an application program, you already know how
  242.           to use 4OS2.  And if you are a 4DOS user, you already know how to
  243.           use most of the advanced features that we have built into 4OS2.
  244.           You can even use many of your 4DOS batch files with 4OS2 without
  245.           changing them at all (see pages 23 and 27 for tips about making the
  246.           batch files work properly in both environments).
  247.  
  248.           Once you have 4OS2 installed, you can learn its new features at
  249.           your own pace.  Relax, enjoy 4OS2's power, and browse through the
  250.           manuals occasionally.  Press the F1 key whenever you need help.
  251.           4OS2 will soon become an essential part of your computer, and
  252.           you'll wonder how you ever got along without it.
  253.  
  254.           This version of 4OS2 is designed for and has been tested with OS/2
  255.           versions 1.2, 1.21, 1.3, and 2.0.  You must have one of these
  256.           versions of OS/2 operating on your computer to be able to install
  257.           and use 4OS2.  Throughout this manual, we refer to versions 1.2,
  258.           1.21, and 1.3 as "version 1.x."
  259.  
  260.           We are constantly working to improve 4OS2.  If you have suggestions
  261.           for features or commands that we should include in the next
  262.           version, or any other way we could improve our product, please let
  263.           us know.  Many of the features in this version of 4OS2 were
  264.           suggested by our users and beta testers.  We can't promise to
  265.           include every suggestion, but we really do appreciate and pay
  266.           attention to your comments.
  267.  
  268.  
  269.  
  270.  
  271.  
  272.  
  273.           ___________________________________________________________________
  274.           Copyright 1992, JP Software Inc.        4OS2 Reference Manual  /  1
  275.  
  276.                                                                  INTRODUCTION
  277.           ___________________________________________________________________
  278.  
  279.  
  280.  
  281.  
  282.           How to Use This Manual
  283.  
  284.                Because 4OS2 is almost identical to 4DOS in operation, nearly
  285.                everything in the 4DOS Reference Manual applies to 4OS2 as
  286.                well.  Therefore, we supply both this manual and the 4DOS
  287.                Reference Manual with every copy of 4OS2.  Use the 4DOS
  288.                Reference Manual as your main 4OS2 manual;  this booklet is a
  289.                supplement that explains the added features in 4OS2 and the
  290.                occasional differences between the two products.
  291.  
  292.                We publish the manuals in this form because most 4OS2
  293.                customers also use 4DOS.  This supplement helps focus
  294.                attention on the few differences between 4OS2 and 4DOS;  two
  295.                completely separate manuals would make those differences more
  296.                difficult to pinpoint and to remember.
  297.  
  298.                If you aren't already familiar with 4DOS, we urge you to
  299.                install it for use in your OS/2 DOS sessions.  Because 4DOS
  300.                and 4OS2 are so similar, you can install 4DOS first and take
  301.                the 4DOS Guided Tour (see Chapter 3 of the 4DOS Reference
  302.                Manual) to familiarize yourself with both products.
  303.  
  304.                If you prefer to work in OS/2, or if you don't have 4DOS, you
  305.                can install 4OS2 without 4DOS and look through the Guided Tour
  306.                and other parts of the 4DOS manual to gain a feel for how 4OS2
  307.                works.  Then return to this manual, especially Chapter 3, for
  308.                a discussion of the differences between 4DOS and 4OS2.
  309.  
  310.                Installation instructions for both products are in the next
  311.                chapter, and detailed installation instructions for 4DOS are
  312.                in Chapter 1 of the 4DOS manual.
  313.  
  314.                If you are familiar with 4DOS, you may want to read quickly
  315.                through this manual to get a general feeling for the few
  316.                differences between the two products.  Then you can install
  317.                4OS2 on your computer and study the differences that affect
  318.                your computing habits in detail.
  319.  
  320.                There are five chapters in this manual.  Here is what you'll
  321.                find in each:
  322.  
  323.                Chapter 1 / Installation
  324.  
  325.                     This chapter explains how to install 4OS2.  Because the
  326.                     installation instructions vary depending on the version
  327.                     of OS/2 that you are using, everyone should read this
  328.                     short chapter.
  329.  
  330.           ___________________________________________________________________
  331.           Copyright 1992, JP Software Inc.        4OS2 Reference Manual  /  2
  332.  
  333.                                                                  INTRODUCTION
  334.           ___________________________________________________________________
  335.  
  336.  
  337.  
  338.                Chapter 2 / General Concepts
  339.  
  340.                     OS/2 is a rich operating system with a wide range of
  341.                     features.  We don't have space for a complete OS/2
  342.                     tutorial, but some of the concepts and terms you need to
  343.                     configure and make full use of 4OS2 are explained in this
  344.                     chapter.  Even if you are an experienced OS/2 user, we
  345.                     encourage you to read Chapter 2 before using 4OS2
  346.                     extensively.
  347.  
  348.                Chapter 3 / Using 4OS2
  349.  
  350.                     This chapter explains the differences between 4DOS and
  351.                     4OS2.  It is a supplement to Chapter 5 / Using 4DOS in
  352.                     the 4DOS Reference Manual.
  353.  
  354.                Chapter 4 / Options and Tuning
  355.  
  356.                     This chapter discusses how to configure 4OS2.  It also
  357.                     explains how to configure 4DOS to run most efficiently as
  358.                     the command processor for DOS sessions under OS/2.
  359.  
  360.                Chapter 5 / Command Reference
  361.  
  362.                     The final chapter provides details about the commands
  363.                     that are new in 4OS2 and about those which differ from
  364.                     4DOS.  It is a supplement to Chapter 8 / Command
  365.                     Reference Guide in the 4DOS Reference Manual.
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.           ___________________________________________________________________
  388.           Copyright 1992, JP Software Inc.        4OS2 Reference Manual  /  3
  389.  
  390.                                                      CHAPTER 1 / INSTALLATION
  391.           ___________________________________________________________________
  392.  
  393.  
  394.  
  395.           CHAPTER 1 / INSTALLATION
  396.  
  397.  
  398.           Before you install 4OS2 (or any other software, for that matter),
  399.           you should make a bootable system diskette so you can recover in
  400.           case of a power failure or other interruption during the
  401.           installation process.  The easiest way to do so is to create a
  402.           bootable DOS system disk (see page 13 of the 4DOS reference
  403.           manual).  If necessary, you can use your OS/2 installation disks to
  404.           boot your system, then exit the installation program at the first
  405.           opportunity and return to an OS/2 (CMD.EXE) command prompt.
  406.  
  407.  
  408.           Installing 4DOS for OS/2 DOS Sessions
  409.  
  410.                4DOS and 4OS2 must be installed separately even if you
  411.                obtained them at the same time.  The easiest way to install
  412.                4DOS is to boot your computer with DOS and follow the
  413.                installation instructions in the 4DOS Reference Manual.
  414.  
  415.                If your computer is set up to boot OS/2 only, you can still
  416.                install 4DOS easily.  Start a DOS session and then install
  417.                4DOS from within the DOS session.  Put all of your 4DOS files
  418.                in a separate directory, not in the 4OS2 directory.  Try the
  419.                4DOS Guided Tour (Chapter 3 of the 4DOS Reference Manual) to
  420.                make sure that 4DOS has been installed properly.
  421.  
  422.                After you have used one of these methods to install 4DOS on
  423.                your hard drive, turn to pages 37 - 44 for information about
  424.                configuring 4DOS to work properly with OS/2.  That section
  425.                also explains how to modify your OS/2 CONFIG.SYS file if you
  426.                are installing 4DOS manually, or if you installed OS/2 after
  427.                4DOS.
  428.  
  429.  
  430.           Installing 4OS2
  431.  
  432.                See the sections below for specific instructions on installing
  433.                4OS2 automatically, manually under OS/2 version 1.x, or
  434.                manually under OS/2 version 2.0.
  435.  
  436.                Once you have 4OS2 installed, the standard "OS/2 Window" and
  437.                "OS/2 Full Screen" selections in your Group-Main window (OS/2
  438.                version 1.x) or Command Prompts folder (OS/2 version 2.0) will
  439.                start 4OS2 instead of CMD.EXE (unless they have been changed
  440.                from their default configuration).  You may wish to change the
  441.                names of these selections to "4OS2 Window" and "4OS2 Full
  442.                Screen".
  443.  
  444.           ___________________________________________________________________
  445.           Copyright 1992, JP Software Inc.        4OS2 Reference Manual  /  4
  446.  
  447.                                                      CHAPTER 1 / INSTALLATION
  448.           ___________________________________________________________________
  449.  
  450.  
  451.  
  452.                If you have a STARTUP.CMD batch file, it will run just as it
  453.                did before you installed 4OS2.  OS/2 will create a 4OS2
  454.                session at boot time and pass the STARTUP.CMD command to that
  455.                session, just as it did with CMD.EXE.
  456.  
  457.                For information about creating additional 4OS2 icons,
  458.                configuring 4OS2, and setting up startup batch files for
  459.                specific 4OS2 sessions, see pages 15 and 32.
  460.  
  461.  
  462.           Automated 4OS2 Installation
  463.  
  464.                If you downloaded 4OS2, see the section on manual installation
  465.                below.  Automated installation is only available if you have
  466.                the version of 4OS2 distributed on a diskette.
  467.  
  468.                When you are ready to install 4OS2, put the distribution
  469.                diskette into drive A (you may use drive B if you prefer).
  470.                Open an OS/2 windowed or full-screen session, then log into
  471.                drive A by typing:
  472.  
  473.                     a:
  474.  
  475.                and pressing Enter.  One of the files on the distribution
  476.                diskette, README.1ST, contains information that you should
  477.                read before you install 4OS2 on your computer.  Type:
  478.  
  479.                     type readme.1st | more
  480.  
  481.                to view the file.  If you want to print a copy of the file,
  482.                type:
  483.  
  484.                     copy readme.1st prn
  485.  
  486.                Now you can start the installation process.  Type:
  487.  
  488.                     install
  489.  
  490.                Once the installation program has started, just follow the
  491.                instructions on the screen and 4OS2 will install itself on
  492.                your system.  The installation program will ask whether you
  493.                want to perform a full installation or a partial installation.
  494.                If you want to install 4OS2 automatically, choose a full
  495.                installation.  The program will not make any changes to your
  496.                CONFIG.SYS or other system files unless you give it permission
  497.                to do so.
  498.  
  499.  
  500.  
  501.           ___________________________________________________________________
  502.           Copyright 1992, JP Software Inc.        4OS2 Reference Manual  /  5
  503.  
  504.                                                      CHAPTER 1 / INSTALLATION
  505.           ___________________________________________________________________
  506.  
  507.  
  508.  
  509.                Once the installation process is complete, shut down OS/2 and
  510.                reboot your computer.  You will then have all the power of
  511.                4OS2 available to you.
  512.  
  513.  
  514.           Manual 4OS2 Installation
  515.  
  516.                If you downloaded 4OS2, simply extract the downloaded files
  517.                into their own directory (do not put them in the same
  518.                directory as your 4DOS files).  Then skip the next two
  519.                paragraphs related to diskette copies of 4OS2, and proceed
  520.                with the remainder of the manual installation instructions.
  521.  
  522.                If you have a diskette copy of 4OS2, the 4OS2 files are
  523.                contained in a special library file on the diskette.  You
  524.                cannot simply copy the files from the diskette onto your
  525.                system.  You must use the installation program to extract and
  526.                decompress the 4OS2 files if you want to perform a manual
  527.                installation, or if you need to replace a damaged 4OS2 file on
  528.                your hard disk.
  529.  
  530.                If you want to install 4OS2 manually, first start the
  531.                automatic installation program using the instructions above.
  532.                Select the Extract all files option and extract the 4OS2 files
  533.                onto your hard disk.  Place the files in their own directory.
  534.                Do not put them in the same directory as your 4DOS files.  In
  535.                the examples below, we have assumed that the 4OS2 files are in
  536.                the C:\4OS2 directory.
  537.  
  538.                Once you have extracted the files, you can test drive 4OS2
  539.                before completing the installation.  To do so, start an OS/2
  540.                windowed or full-screen session from the Presentation Manager
  541.                desktop.  At the CMD.EXE prompt, change to the directory where
  542.                4OS2 is installed, and enter the command 4OS2.  When run in
  543.                this mode, 4OS2's HELP command and F1 key, along with the "/?"
  544.                option for 4OS2 commands, may not work if the required files
  545.                are not accessible.  You can activate these features during
  546.                your test drive by following the instructions for 4OS2.INF and
  547.                4OS2H.MSG in the 4OS2 Files and Directories section below.
  548.  
  549.                When you're ready to finish the installation process, follow
  550.                the instructions in the appropriate sections below.  Before
  551.                you modify CONFIG.SYS, be sure you have a bootable floppy disk
  552.                as discussed above.
  553.  
  554.  
  555.  
  556.  
  557.  
  558.           ___________________________________________________________________
  559.           Copyright 1992, JP Software Inc.        4OS2 Reference Manual  /  6
  560.  
  561.                                                      CHAPTER 1 / INSTALLATION
  562.           ___________________________________________________________________
  563.  
  564.  
  565.  
  566.  
  567.                Manual Installation for OS/2 Version 1.x
  568.  
  569.                Use an ASCII-format text editor to load and edit your OS/2
  570.                CONFIG.SYS file.  In the file, you will find a line that
  571.                begins with the word PROTSHELL and another that begins with
  572.                the words SET COMSPEC.  The lines should look something like
  573.                this, but they may not be adjacent in the file (the PROTSHELL
  574.                command is all on one line):
  575.  
  576.                     PROTSHELL=C:\OS2\PMSHELL.EXE C:\OS2\OS2.INI
  577.                          C:\OS2\OS2SYS.INI C:\OS2\CMD.EXE
  578.                     SET COMSPEC=C:\OS2\CMD.EXE
  579.  
  580.                Change the last item on the PROTSHELL line, the item that
  581.                includes the filename CMD.EXE, to point to 4OS2.EXE.  Be sure
  582.                to include the full path for 4OS2.EXE.  The changed PROTSHELL
  583.                line should look something like this (it should all be on one
  584.                line):
  585.  
  586.                     PROTSHELL=C:\OS2\PMSHELL.EXE C:\OS2\OS2.INI
  587.                          C:\OS2\OS2SYS.INI C:\4OS2\4OS2.EXE
  588.  
  589.                Do not change PMSHELL.EXE to 4OS2.EXE.  Change only the name
  590.                and path of CMD.EXE.
  591.  
  592.                Now change the SET COMSPEC line so that it also contains the
  593.                full path of 4OS2.EXE.  The completed line should look like
  594.                this:
  595.  
  596.                     SET COMSPEC=C:\4OS2\4OS2.EXE
  597.  
  598.                Verify that the changes have been made correctly and then save
  599.                the CONFIG.SYS file.  Exit from your editor, shut down OS/2,
  600.                and reboot your system.
  601.  
  602.  
  603.                Manual Installation for OS/2 Version 2.0
  604.  
  605.                Use an ASCII-format editor to load and edit your OS/2
  606.                CONFIG.SYS file.  In the file, you will find a line that
  607.                begins with the words SET OS2_SHELL and another that begins
  608.                with the words SET COMSPEC.  The lines should look something
  609.                like this, but they may not be adjacent in the file:
  610.  
  611.                     SET OS2_SHELL=D:\OS2\CMD.EXE
  612.                     SET COMSPEC=D:\OS2\CMD.EXE
  613.  
  614.  
  615.           ___________________________________________________________________
  616.           Copyright 1992, JP Software Inc.        4OS2 Reference Manual  /  7
  617.  
  618.                                                      CHAPTER 1 / INSTALLATION
  619.           ___________________________________________________________________
  620.  
  621.  
  622.  
  623.                Change both of these lines so that they to point to 4OS2.EXE,
  624.                including its path, instead of to the CMD.EXE file.  When you
  625.                are done, the lines should look something like this:
  626.  
  627.                     SET OS2_SHELL=C:\4OS2\4OS2.EXE
  628.                     SET COMSPEC=C:\4OS2\4OS2.EXE
  629.  
  630.                Verify that the changes have been made correctly and then save
  631.                the CONFIG.SYS file.  Exit from your editor, shut down OS/2,
  632.                and reboot your system.
  633.  
  634.  
  635.                4OS2 Files and Directories
  636.  
  637.                The automated installation procedure places all 4OS2 files in
  638.                a single directory.  You may move the files to different
  639.                directories, if you wish.  But you do have to make sure that
  640.                the files can be found by the programs that need to use them.
  641.                The following information will help you set up your system
  642.                correctly if you are performing a manual installation:
  643.  
  644.                     4OS2.EXE is the 4OS2 program file.  It must be in the
  645.                     directory specified in the PROTSHELL= (OS/2 version 1.x),
  646.                     SET OS2_SHELL= (OS/2 version 2.0), and SET COMSPEC= lines
  647.                     in your CONFIG.SYS file as explained above.
  648.  
  649.                     4OS2.INF contains the text for the 4OS2 HELP command and
  650.                     F1 key.  For HELP to work properly, the directory
  651.                     containing this file must be included in the BOOKSHELF
  652.                     environment variable, which is usually set with a SET
  653.                     BOOKSHELF= command in CONFIG.SYS.  If you prefer, you can
  654.                     move this file into the standard OS/2 bookshelf
  655.                     directory, \OS2\BOOK.
  656.  
  657.                     4OS2H.MSG contains the help text for the "/?" option
  658.                     available as part of each 4OS2 internal command.  For
  659.                     this feature to work properly, the directory containing
  660.                     this file must be included in the DPATH environment
  661.                     variable, which is usually set with a SET DPATH command
  662.                     in CONFIG.SYS.  If you prefer, you can move this file
  663.                     into the standard OS/2 directory for such files,
  664.                     \OS2\SYSTEM.
  665.  
  666.                     SHRALIAS.EXE is a small utility that saves the shared
  667.                     alias and history list between 4OS2 sessions.  The
  668.                     directory containing this file should be listed in your
  669.                     PATH statement.  If it is not, you will have to specify
  670.  
  671.  
  672.           ___________________________________________________________________
  673.           Copyright 1992, JP Software Inc.        4OS2 Reference Manual  /  8
  674.  
  675.                                                      CHAPTER 1 / INSTALLATION
  676.           ___________________________________________________________________
  677.  
  678.  
  679.                     the full path name to load SHRALIAS.EXE each time you
  680.                     want to use it.
  681.  
  682.  
  683.           Uninstalling 4OS2
  684.  
  685.                In the extremely unlikely event that you have trouble with
  686.                your computer after you install 4OS2, you can remove it quite
  687.                easily.  We don't expect you to have any trouble, but we know
  688.                some people feel more secure knowing how to uninstall a
  689.                product as well as install it.  Or, you may need to remove
  690.                4OS2 from one system if you are moving it to another system.
  691.  
  692.                To remove 4OS2 from your system temporarily, use an ASCII
  693.                editor to edit your OS/2 CONFIG.SYS file.  You will need to
  694.                edit both the SET COMSPEC line (all versions of OS/2) and
  695.                either the PROTSHELL line (OS/2 version 1.x) or SET OS2_SHELL
  696.                line (OS/2 version 2.0).  In all cases, change the reference
  697.                to 4OS2.EXE to the complete path and filename of CMD.EXE.
  698.                Save the file, exit from your editor, shut down OS/2, and
  699.                reboot your system.  OS/2 will boot using CMD.EXE as its
  700.                command processor.
  701.  
  702.                To remove 4OS2 permanently, follow the instructions above.
  703.                You will also want to change or delete any Group Main
  704.                selections (in OS/2 version 1.x) or icons (in OS/2 version
  705.                2.0) that refer directly to 4OS2.EXE.  Then delete all 4OS2
  706.                files on your hard drive to completely uninstall 4OS2.
  707.  
  708.  
  709.  
  710.  
  711.  
  712.  
  713.  
  714.  
  715.  
  716.  
  717.  
  718.  
  719.  
  720.  
  721.  
  722.  
  723.  
  724.  
  725.  
  726.  
  727.  
  728.  
  729.           ___________________________________________________________________
  730.           Copyright 1992, JP Software Inc.        4OS2 Reference Manual  /  9
  731.  
  732.                                                  CHAPTER 2 / GENERAL CONCEPTS
  733.           ___________________________________________________________________
  734.  
  735.  
  736.  
  737.           CHAPTER 2 / GENERAL CONCEPTS
  738.  
  739.  
  740.           This chapter contains information about OS/2 and 4OS2.  Some of the
  741.           information is general and introductory in nature;  other parts of
  742.           this chapter are fairly detailed and technical.  We encourage you
  743.           to at least scan through this chapter to see what is here and to
  744.           study the sections that appear to have relevance to your way of
  745.           using 4OS2 and OS/2.
  746.  
  747.  
  748.           Terminology
  749.  
  750.                Throughout this manual, the term "desktop" refers to the
  751.                Presentation Manager in OS/2 version 1.x or the Workplace
  752.                Shell in OS/2 version 2.0.
  753.  
  754.                The term "icon" refers to a selectable item on your desktop,
  755.                whether or not the corresponding icon is actually visible (you
  756.                may have chosen to configure the desktop with only session
  757.                names visible, rather than the icons themselves).  For
  758.                example, the standard desktop for all versions of OS/2
  759.                includes icons titled "OS/2 Window" and "OS/2 Full Screen."
  760.  
  761.                The term "session" refers to the OS/2 session created by
  762.                selecting an icon on the desktop.  Sessions run a program or
  763.                sequence of programs.  See below for more information on
  764.                sessions and session types.  When you double-click on an icon
  765.                or select it with the keyboard and press Enter, a new session
  766.                is started.
  767.  
  768.                The term "process" refers to a single invocation of a
  769.                particular program within a session.  Many sessions run only a
  770.                single process.  However, multiple processes can run
  771.                simultaneously within the same session.  For example, in a
  772.                4OS2 session which is running a character-mode text editor,
  773.                two processes are running: 4OS2 and the text editor.
  774.  
  775.  
  776.           OS/2 Sessions and Applications
  777.  
  778.                OS/2 supports several different types of applications and many
  779.                methods for starting them.  Most of the time, you don't need
  780.                to worry about these differences because 4OS2 and OS/2
  781.                cooperate to take care of them for you.  You may, however,
  782.                find this general discussion of applications and sessions
  783.                useful to understand what happens when you run an application
  784.  
  785.  
  786.           ___________________________________________________________________
  787.           Copyright 1992, JP Software Inc.       4OS2 Reference Manual  /  10
  788.  
  789.                                                  CHAPTER 2 / GENERAL CONCEPTS
  790.           ___________________________________________________________________
  791.  
  792.  
  793.                or other external program.  If you need more details, see the
  794.                OS/2 online reference information.
  795.  
  796.                Technical experts will recognize that these explanations are
  797.                not precise, but they should serve as a useful introduction
  798.                for many users.  (For example, this introduction does not
  799.                explore the distinction between sessions and screen groups.)
  800.  
  801.  
  802.                Sessions and Session Types
  803.  
  804.                OS/2 programs are run in "sessions" which are programs or
  805.                groups of programs whose output typically appears in specific
  806.                windowed display areas on the desktop ("windowed" sessions) or
  807.                takes up the whole screen ("full-screen" sessions).
  808.  
  809.                A windowed session runs on the desktop in a graphical window
  810.                whose size you (or an OS/2 application) can change.  As a
  811.                result, portions of the session's display area may be covered
  812.                or invisible at any given time.  The "active" session, or the
  813.                session that receives keystrokes, is always shown with a
  814.                highlighted title bar.
  815.  
  816.                Full-screen sessions run on a standard text mode display,
  817.                generally 80 characters by 25 lines.  When such a session is
  818.                active, its full display area is visible and it hides all
  819.                other sessions and the desktop itself.  You can use the Alt-
  820.                Esc key to switch back to the desktop from a full-screen
  821.                session.
  822.  
  823.                OS/2 supports ten different types of sessions:
  824.  
  825.                     OS/2 Presentation Manager (PM) session:  A PM session
  826.                     runs in graphics mode on the desktop.  PM sessions are
  827.                     always windowed.  Their output is graphical and may
  828.                     include pictures and a variety of fonts within the same
  829.                     window.  Examples of PM sessions include those started to
  830.                     view the OS/2 Command Reference, or to run the System
  831.                     Editor distributed with OS/2.
  832.  
  833.                     OS/2 character mode, full-screen session:  This session
  834.                     type displays only text in character mode, like a
  835.                     standard DOS application.  It uses the entire screen,
  836.                     almost always in standard 80 x 25 text mode.  Examples
  837.                     include a 4OS2 or CMD.EXE full-screen session.
  838.  
  839.                     OS/2 character mode, windowed session:  This session type
  840.                     is just like the character mode full-screen session
  841.                     except that it runs in a window.  It uses the same text
  842.  
  843.           ___________________________________________________________________
  844.           Copyright 1992, JP Software Inc.       4OS2 Reference Manual  /  11
  845.  
  846.                                                  CHAPTER 2 / GENERAL CONCEPTS
  847.           ___________________________________________________________________
  848.  
  849.  
  850.                     font over the entire window and does not display
  851.                     graphics.  Examples include a 4OS2 or CMD.EXE windowed
  852.                     session.
  853.  
  854.                     DOS full-screen session:  A DOS session runs DOS within
  855.                     OS/2.  A special version of DOS, designed to run in such
  856.                     a session, is supplied with OS/2 and is generally
  857.                     compatible with MS-DOS 4.0 (in OS/2 version 1.x) or MS-
  858.                     DOS 5.0 (in OS/2 version 2.0).  A DOS full-screen session
  859.                     has full control of the screen (including the ability to
  860.                     switch it into graphics and non-standard text modes).  In
  861.                     OS/2 version 1.x, you can start exactly one DOS session,
  862.                     called the DOS Compatibility Box.  Once this session is
  863.                     started, it cannot be closed (although you can switch
  864.                     back to the desktop with Alt-Esc).  In OS/2 version 2.0,
  865.                     you can start many such sessions, which are called
  866.                     Virtual DOS Machines (VDMs).  VDMs can normally be
  867.                     terminated with the EXIT command.  You can switch a full-
  868.                     screen DOS session into windowed mode by pressing Alt-
  869.                     Home.  One example of a DOS full-screen session is the
  870.                     session started by the default "DOS full-screen" icon
  871.                     which is installed automatically with OS/2.
  872.  
  873.                     DOS windowed session:  Available only in OS/2 version
  874.                     2.0, this session is similar to a DOS full-screen
  875.                     session, but runs in a window on the desktop.  Such a
  876.                     session always runs as a VDM and can normally be
  877.                     terminated with the EXIT command.  You can switch a
  878.                     windowed DOS session into full-screen mode by pressing
  879.                     Alt-Home.  A DOS windowed session can run all text-mode
  880.                     DOS applications, and applications that display graphics
  881.                     in standard graphics video modes.
  882.  
  883.                     Native DOS full-screen session:  Native DOS sessions are
  884.                     only available in OS/2 version 2.0.  They are similar to
  885.                     the DOS sessions described above, but load a specific
  886.                     version of DOS (for example, MS-DOS 3.3) into a VDM,
  887.                     rather than the version of DOS shipped with OS/2 version
  888.                     2.0.  Like normal DOS sessions, native DOS sessions can
  889.                     be switched between full-screen and windowed mode by
  890.                     pressing Alt-Home.  Once a native DOS session is started,
  891.                     it cannot be terminated with the EXIT command.  The only
  892.                     way to terminate such a session is to switch it to
  893.                     windowed mode, bring up the system menu for the window,
  894.                     click Close, and then click Yes to the following prompt.
  895.                     For more information on native DOS sessions, see the
  896.                     command VMDISK and the topic "Starting a Specific Version
  897.                     of DOS" in the on-line Command Reference for OS/2 version
  898.                     2.0.
  899.  
  900.           ___________________________________________________________________
  901.           Copyright 1992, JP Software Inc.       4OS2 Reference Manual  /  12
  902.  
  903.                                                  CHAPTER 2 / GENERAL CONCEPTS
  904.           ___________________________________________________________________
  905.  
  906.  
  907.  
  908.                     Native DOS windowed session:  This session is similar to
  909.                     a native DOS full-screen session, but it runs in a window
  910.                     on the desktop instead of in full-screen mode.
  911.  
  912.                     Windows full-screen session:  This session type is
  913.                     available only in OS/2 version 2.0.  A Windows full-
  914.                     screen session is essentially a DOS full-screen session
  915.                     that is running the special version of Microsoft Windows
  916.                     that is supplied with OS/2 version 2.0.  It has the
  917.                     standard Windows display, the Program Manager and Control
  918.                     Panel, etc., and can run Windows applications, but it
  919.                     cannot start OS/2 or DOS applications.
  920.  
  921.                     WIN-OS/2 full-screen session:  This session type is
  922.                     available only in OS/2 version 2.0.  It is similar to a
  923.                     Windows full-screen session, but runs only a single
  924.                     application.  Internally, it starts a DOS session, tells
  925.                     DOS to load the special version of Windows that comes
  926.                     with OS/2, and tells Windows to load the application.
  927.                     However, no DOS character-mode window is opened for this
  928.                     session -- only a full-screen window for the Windows
  929.                     application.
  930.  
  931.                     WIN-OS/2 windowed session:  This session type is
  932.                     available only in OS/2 version 2.0.  It allows a single
  933.                     Windows application to run inside a window on the
  934.                     Workplace Shell desktop.  Internally, it loads the
  935.                     application just like a WIN-OS/2 full-screen session.
  936.                     However, the window it opens is a graphical Presentation
  937.                     Manager window for the Windows application.  This session
  938.                     type is sometimes called a "seamless Windows" session.
  939.  
  940.  
  941.                Applications and Application Types
  942.  
  943.                OS/2 and 4OS2 support six different types of applications.
  944.                Application types are related to the type of session in which
  945.                the application can run.  They are similar to, but not the
  946.                same as, session types.  The type of an application is
  947.                determined by the programmer who creates the program.
  948.                Information about the application type is embedded in the
  949.                application itself.
  950.  
  951.                The application types are:
  952.  
  953.                     OS/2 Presentation Manager application:  Runs in a PM
  954.                     session only.  Examples include the OS/2 online help
  955.  
  956.  
  957.           ___________________________________________________________________
  958.           Copyright 1992, JP Software Inc.       4OS2 Reference Manual  /  13
  959.  
  960.                                                  CHAPTER 2 / GENERAL CONCEPTS
  961.           ___________________________________________________________________
  962.  
  963.  
  964.                     program VIEW.EXE and the System Editor distributed with
  965.                     OS/2.
  966.  
  967.                     OS/2 character mode, full-screen application:  Runs in a
  968.                     full-screen OS/2 session only.  Applications of this type
  969.                     are very rare.
  970.  
  971.                     OS/2 character mode, window-compatible application:  Runs
  972.                     in a full-screen or windowed OS/2 session.  Most OS/2
  973.                     character-mode applications -- including 4OS2 -- are in
  974.                     this category.  This and the previous type are sometimes
  975.                     called "VIO" or "AVIO" applications.
  976.  
  977.                     DOS application:  Runs in a DOS session only.  Examples
  978.                     include all .COM and .EXE files designed to run under
  979.                     DOS, such as those for your DOS communications program or
  980.                     word processor.  Virtually all DOS application programs
  981.                     that use text displays will run in either a full-screen
  982.                     or windowed DOS session.  Many DOS applications that use
  983.                     graphics will run properly only in a full-screen DOS
  984.                     session.  4OS2 also recognizes DOS batch files with a
  985.                     .BAT extension as DOS applications.
  986.  
  987.                     "Bound application" or "Family-mode application":  Runs
  988.                     in an OS/2 or a DOS character mode session from the same
  989.                     .EXE file.  Bound applications are primarily used in
  990.                     compilers and installation programs to allow the same
  991.                     file to run under both DOS and OS/2.
  992.  
  993.                     Windows application:  Runs only in a Windows session.
  994.                     Examples include applications like Word for Windows and
  995.                     Corel Draw.  Most Windows applications will run properly
  996.                     in either a Windows full-screen session, or a WIN-OS/2
  997.                     full-screen or windowed session.
  998.  
  999.  
  1000.                Starting Sessions and Applications
  1001.  
  1002.                Before you can start an application program to do some work,
  1003.                you must have a session in which to execute it.  Every icon on
  1004.                the OS/2 desktop represents a potential session: if you
  1005.                double-click the icon or select it and press Enter, OS/2
  1006.                starts a new session with the parameters that have been set up
  1007.                for that icon.
  1008.  
  1009.                The parameters for the icon may cause the session to run an
  1010.                OS/2 application program, load the OS/2 command processor
  1011.                (CMD.EXE by default, or 4OS2 if you have it installed) and
  1012.                display a prompt, run a batch file that could in turn start
  1013.  
  1014.           ___________________________________________________________________
  1015.           Copyright 1992, JP Software Inc.       4OS2 Reference Manual  /  14
  1016.  
  1017.                                                  CHAPTER 2 / GENERAL CONCEPTS
  1018.           ___________________________________________________________________
  1019.  
  1020.  
  1021.                other sessions, or start DOS, Windows, or a Windows
  1022.                application.
  1023.  
  1024.                To start 4OS2, you must define an icon for an OS/2 character
  1025.                mode session, either full-screen or windowed.  To do so, see
  1026.                Chapter 4 / Options and Tuning (page 32) for full
  1027.                instructions.  Briefly, after you have installed 4OS2 and
  1028.                defined it as your shell in your CONFIG.SYS file, you merely
  1029.                have to place an asterisk [*] in the field for the program
  1030.                name.  (If CONFIG.SYS has not yet been set up for 4OS2, you
  1031.                must explicitly specify the full path and name of 4OS2.EXE
  1032.                instead of using the [*].)
  1033.  
  1034.                Once 4OS2 has started, you can start applications or other
  1035.                sessions from the 4OS2 prompt.  When you start an application,
  1036.                4OS2 checks its type.  If the type is the same as that of the
  1037.                session in which 4OS2 is running (which will only happen for
  1038.                OS/2 character-mode applications), the application will run in
  1039.                the same session as 4OS2.  4OS2 will wait for the application
  1040.                to complete before displaying a new prompt.  This is analogous
  1041.                to how applications are run in DOS.
  1042.  
  1043.                If the application type is different from the 4OS2 session
  1044.                type, 4OS2 will start a new session to run the application.
  1045.                Then 4OS2 will wait for that session to signal completion
  1046.                before returning to the prompt.  If 4OS2 is running in a
  1047.                window, the 4OS2 window will be minimized while the new
  1048.                session is running, and restored to its original state when
  1049.                the new session finishes.  You can also force 4OS2 to start a
  1050.                new session and not wait for it to complete by using the START
  1051.                command (see page 55).
  1052.  
  1053.  
  1054.           Creating and Configuring Icons
  1055.  
  1056.                This section gives you basic information which you will need
  1057.                to create and configure 4OS2 and 4DOS icons on your OS/2
  1058.                desktop.  For complete details on creating and configuring
  1059.                icons, see your OS/2 documentation.  For details on the
  1060.                appropriate properties or settings to use for 4OS2 and 4DOS
  1061.                icons see pages 33 (4OS2) and 37 (4DOS).
  1062.  
  1063.  
  1064.                OS/2 Version 1.x Icons
  1065.  
  1066.                In OS/2 version 1.x, icons are displayed within groups on the
  1067.                desktop.  For example, the "OS/2 Full Screen" icon normally
  1068.                appears in Group-Main.
  1069.  
  1070.  
  1071.           ___________________________________________________________________
  1072.           Copyright 1992, JP Software Inc.       4OS2 Reference Manual  /  15
  1073.  
  1074.                                                  CHAPTER 2 / GENERAL CONCEPTS
  1075.           ___________________________________________________________________
  1076.  
  1077.  
  1078.  
  1079.                To create a new icon, switch to the group where you want the
  1080.                icon to appear and choose the New selection on the File menu.
  1081.                Then adjust the icon's properties.
  1082.  
  1083.                To adjust the properties of an icon, first select it (click on
  1084.                the icon once, or use the arrow keys on the keyboard), then
  1085.                open the File Properties menu from the menu bar.  From within
  1086.                this menu you can modify the program name, startup directory,
  1087.                command line parameters, and other configuration data for the
  1088.                icon.
  1089.  
  1090.  
  1091.                OS/2 Version 2.0 Icons
  1092.  
  1093.                In OS/2 version 2.0, icons may appear on the desktop itself or
  1094.                within folders.  For example, the "OS/2 Full Screen" icon
  1095.                normally appears in the "Command Prompts" folder.
  1096.  
  1097.                To create a new icon, switch to the folder where you want the
  1098.                icon to appear and either copy an existing icon (use either
  1099.                the Copy or Create Another selection on the icon's popup menu)
  1100.                or drag a Program Template in from the Templates folder.
  1101.                Depending on the copying method you choose, the Settings
  1102.                notebook may open automatically.
  1103.  
  1104.                To adjust the properties of an icon, you must open its
  1105.                Settings notebook.  To do so, click the right mouse button in
  1106.                the icon.  When the popup menu appears, click the left mouse
  1107.                button on the small arrow to the right of the Open selection,
  1108.                then again on the Settings selection on the submenu.
  1109.  
  1110.                Once the Settings notebook is open, use the Program page to
  1111.                modify the program name, startup directory, and command line
  1112.                parameters.  The Session page lets you set the session type.
  1113.                Other pages let you adjust other configuration data for the
  1114.                icon.
  1115.  
  1116.                The contents of the Settings notebook will vary depending on
  1117.                the type of icon and the session type set on the Session page.
  1118.                For example, DOS and Windows sessions allow control of a wide
  1119.                variety of DOS parameters (such as available XMS and EMS
  1120.                memory, whether DOS is loaded high, and the maximum number of
  1121.                open files) using the "DOS Settings" or "Windows Settings"
  1122.                button on the Session page.  However, this button cannot be
  1123.                used for Presentation Manager or OS/2 character-mode sessions.
  1124.  
  1125.  
  1126.  
  1127.  
  1128.           ___________________________________________________________________
  1129.           Copyright 1992, JP Software Inc.       4OS2 Reference Manual  /  16
  1130.  
  1131.                                                  CHAPTER 2 / GENERAL CONCEPTS
  1132.           ___________________________________________________________________
  1133.  
  1134.  
  1135.  
  1136.  
  1137.           Primary and Secondary Shells
  1138.  
  1139.                Primary and secondary shells are used a little differently
  1140.                under OS/2 than you may be used to under DOS.  In particular,
  1141.                primary shells are more common in OS/2 and secondary shells
  1142.                are less common.
  1143.  
  1144.                When you boot DOS, there is only one primary shell: the one
  1145.                loaded when your system boots.  Under OS/2, a new primary
  1146.                shell starts whenever a new character-mode session is started.
  1147.                If the session is an OS/2 session, a 4OS2 (or CMD.EXE) primary
  1148.                shell is used.  If it is a DOS or Windows session, a 4DOS (or
  1149.                COMMAND.COM) primary shell is used.
  1150.  
  1151.                Secondary shells are used most often under DOS for "shelling
  1152.                to DOS" from an application, and for starting DOS sessions
  1153.                under multitaskers or task switchers like Back & Forth,
  1154.                DESQview, or Microsoft Windows.  Most OS/2 applications don't
  1155.                offer a "shell to OS/2" capability, and new sessions create
  1156.                primary, not secondary shells.  As a result, 4OS2 secondary
  1157.                shells are generally created only for pipes (see page 24), or
  1158.                if you start a second copy of 4OS2 directly from the command
  1159.                prompt.
  1160.  
  1161.  
  1162.           High Performance File System (HPFS)
  1163.  
  1164.                OS/2 version 2.0 includes support for two different file
  1165.                systems.  The first is the traditional DOS file system that is
  1166.                based on a file allocation table (FAT) and has file names that
  1167.                are composed of 8 characters plus a 3-character extension.
  1168.  
  1169.                The second file system is called the High Performance File
  1170.                System or HPFS.  In this system, file names can be a maximum
  1171.                of 255 characters.  The names may include spaces and other
  1172.                characters that are not allowed in the FAT file system.
  1173.  
  1174.                The file system type (FAT or HPFS) is determined when a hard
  1175.                disk partition is formatted, and applies to the entire
  1176.                partition.  For example, you might have a 200 MB hard disk
  1177.                divided into four 50 MB partitions, with the first three
  1178.                partitions (C:, D:, and E:) formatted for the FAT file system
  1179.                and the fourth (F:) formatted for HPFS.  Partition F: would
  1180.                then be available only from OS/2 sessions (including DOS
  1181.                sessions running under OS/2).  It would not be visible from a
  1182.                DOS boot outside of OS/2.
  1183.  
  1184.  
  1185.           ___________________________________________________________________
  1186.           Copyright 1992, JP Software Inc.       4OS2 Reference Manual  /  17
  1187.  
  1188.                                                  CHAPTER 2 / GENERAL CONCEPTS
  1189.           ___________________________________________________________________
  1190.  
  1191.  
  1192.  
  1193.                4OS2 is compatible with both file systems.  Any command that
  1194.                accepts file names will accept both FAT-compatible names and
  1195.                HPFS-compatible names.  If an HPFS-compatible name includes
  1196.                spaces or other characters that would not be allowed in a FAT
  1197.                name, you must place double quotes around the entire name.
  1198.  
  1199.                For example, suppose you have a file named LET3 on a FAT
  1200.                partition, and you want to copy it to the LETTERS directory on
  1201.                drive F:, an HPFS partition, and give it the name LETTER TO
  1202.                SARA.  To do so, use either of these commands:
  1203.  
  1204.                     [c:\wp] copy let3 f:\"letter to sara"
  1205.                     [c:\wp] copy let3 "f:\letter to sara"
  1206.  
  1207.                Note that the quotes can include the filename only, or the
  1208.                entire path.  As long as the portion of the filename that
  1209.                includes spaces or other similar separator characters is
  1210.                quoted, the filename will be interpreted properly.
  1211.  
  1212.                You can use the DESCRIBE command to add descriptions to files
  1213.                on an HPFS partition, just as you can on a FAT partition.
  1214.                This may mean you use two sets of quotes in the DESCRIBE
  1215.                command, for example (enter this command on one line):
  1216.  
  1217.                     [c:\wp] describe "f:\letter to sara" "letter to sara
  1218.                     rimaldi about purchases"
  1219.  
  1220.                If quotes are required to delimit the HPFS file name, 4OS2
  1221.                will include them in the DESCRIPT.ION file.  This keeps the
  1222.                file name and description properly separated from each other.
  1223.                4DOS will not display or modify descriptions for files with
  1224.                quoted HPFS names, but will not disturb the descriptions 4OS2
  1225.                creates for these files.
  1226.  
  1227.                HPFS is called an "installable file system" (installed with
  1228.                the IFS= directive in CONFIG.SYS).  OS/2 supports additional
  1229.                installable file systems.  4OS2 will work properly with any
  1230.                installable file system which supports standard OS/2 file
  1231.                access calls.
  1232.  
  1233.  
  1234.           Extended Attributes
  1235.  
  1236.                DOS allows you to define a limited set of attributes for
  1237.                files, for example whether the file is Read-Only, Hidden, or
  1238.                System (for more information see pages 47 - 48 of the 4DOS
  1239.                manual).  OS/2 supports a new type of information about files
  1240.                called "Extended Attributes" or "EAs".
  1241.  
  1242.           ___________________________________________________________________
  1243.           Copyright 1992, JP Software Inc.       4OS2 Reference Manual  /  18
  1244.  
  1245.                                                  CHAPTER 2 / GENERAL CONCEPTS
  1246.           ___________________________________________________________________
  1247.  
  1248.  
  1249.  
  1250.                The Extended Attributes for a file provide additional
  1251.                information which is not part of the file's actual contents.
  1252.                This information might include the icon to be displayed for
  1253.                the file on the OS/2 desktop or the type of data contained in
  1254.                the file.
  1255.  
  1256.                OS/2 supports Extended Attributes on both FAT and HPFS
  1257.                partitions.  EAs for the files on a FAT partition are stored
  1258.                in the file "EA DATA. SF" in the partition's root directory.
  1259.                Like CMD.EXE, 4OS2 preserves a file's EAs when copying or
  1260.                moving the file, and makes the appropriate adjustments to EAs
  1261.                when a file is deleted or renamed.
  1262.  
  1263.                If you boot in DOS mode (as opposed to a DOS session under
  1264.                OS/2) and delete or otherwise manipulate files that have
  1265.                Extended Attributes, you can face several unexpected problems
  1266.                when you next boot under OS/2 because the EAs and directories
  1267.                will be out of sync.  If you must manipulate files with
  1268.                Extended Attributes during a DOS boot, make sure you run
  1269.                OS/2's CHKDSK program the next time you boot OS/2.
  1270.  
  1271.                For more information on Extended Attributes, see your OS/2
  1272.                documentation.
  1273.  
  1274.  
  1275.  
  1276.  
  1277.  
  1278.  
  1279.  
  1280.  
  1281.  
  1282.  
  1283.  
  1284.  
  1285.  
  1286.  
  1287.  
  1288.  
  1289.  
  1290.  
  1291.  
  1292.  
  1293.  
  1294.  
  1295.  
  1296.  
  1297.  
  1298.  
  1299.           ___________________________________________________________________
  1300.           Copyright 1992, JP Software Inc.       4OS2 Reference Manual  /  19
  1301.  
  1302.                                                        CHAPTER 3 / USING 4OS2
  1303.           ___________________________________________________________________
  1304.  
  1305.  
  1306.  
  1307.           CHAPTER 3 / USING 4OS2
  1308.  
  1309.  
  1310.           In use, 4OS2 is nearly identical to 4DOS.  The few differences are
  1311.           explained in this chapter.  We have assumed in this chapter that
  1312.           you have the 4DOS Reference Manual available and that you have some
  1313.           familiarity with the corresponding 4DOS features.
  1314.  
  1315.           If a section of this chapter seems completely unfamiliar to you, it
  1316.           is probably discussing a feature of 4DOS and 4OS2 that you are not
  1317.           using.  Feel free to read only the sections of this chapter that
  1318.           are relevant to the way that you use your computer and 4OS2.
  1319.  
  1320.  
  1321.           At the Command Line
  1322.                  [see page 55 in the 4DOS Reference Manual]
  1323.  
  1324.                The 4OS2 command line will hold a maximum of 511 characters,
  1325.                instead of the 255 characters available at the 4DOS command
  1326.                line.  All other command line editing features work the same
  1327.                under 4OS2 as they do under 4DOS.
  1328.  
  1329.                The default 4OS2 prompt is [$p] on hard disk partitions and
  1330.                [$n] on floppy disks, rather than the corresponding defaults
  1331.                of $p$g and $n$g in 4DOS.  This default is compatible with
  1332.                CMD.EXE, and encloses the current path or drive in square
  1333.                brackets.  When OS/2 is installed, it inserts a SET PROMPT
  1334.                statement in CONFIG.SYS to set the prompt to $i[$p].  This
  1335.                prompt will override 4OS2's default (it will not affect 4DOS).
  1336.                The $i adds a header line to the default prompt, to remind you
  1337.                of certain OS/2 keystrokes.  You can modify or delete the SET
  1338.                PROMPT line in CONFIG.SYS if you want to use a different
  1339.                prompt for your 4OS2 sessions.
  1340.  
  1341.                For compatibility with CMD.EXE, 4OS2 will prompt for
  1342.                additional command line text when you include a caret [^] as
  1343.                the very last character of a typed command line.  For example:
  1344.  
  1345.                     [c:\] echo The quick brown fox jumped over the lazy^
  1346.                     More? sleeping dog. > alphabet
  1347.  
  1348.  
  1349.                4OS2 HELP
  1350.  
  1351.                Complete on-line help for all 4OS2 commands and features is
  1352.                provided with 4OS2.  As in 4DOS, help is invoked with the HELP
  1353.                command or the F1 key.  4OS2's help text does not cover the
  1354.                OS/2 external commands because they are included in OS/2's
  1355.  
  1356.           ___________________________________________________________________
  1357.           Copyright 1992, JP Software Inc.       4OS2 Reference Manual  /  20
  1358.  
  1359.                                                        CHAPTER 3 / USING 4OS2
  1360.           ___________________________________________________________________
  1361.  
  1362.  
  1363.                built-in Command Reference.  The OS/2 Command Reference is
  1364.                normally displayed along with 4OS2's help when the HELP
  1365.                command or F1 key is used.  You can also use the 4OS2 HELP
  1366.                command for explanations of OS/2 error messages (see page 52).
  1367.  
  1368.                When you start the 4OS2 Help system, 4OS2 opens a new OS/2
  1369.                Presentation Manager session to run VIEW.EXE, the standard
  1370.                help program supplied with OS/2.  VIEW displays the 4OS2 Help
  1371.                and OS/2 Command Reference information and lets you browse
  1372.                through it.
  1373.  
  1374.                If you invoke VIEW from a windowed 4OS2 session, you will be
  1375.                returned to that session when you are done with VIEW.  If you
  1376.                invoke VIEW from a full-screen session, you must manually
  1377.                return to that session using standard OS/2 methods for
  1378.                switching between sessions (this is due to the design of OS/2,
  1379.                and is not a limitation within 4OS2).
  1380.  
  1381.                You can also keep the VIEW help window on the screen and
  1382.                return to the 4OS2 session, switching between the two sessions
  1383.                as needed.  This may be useful when you are writing a batch
  1384.                file, working on a complex command, or experimenting with
  1385.                4OS2.
  1386.  
  1387.                4OS2 also supports the /? switch to display help for any
  1388.                command.  For more information see your 4DOS reference manual
  1389.                and the information on the 4OS2H.MSG file on page 8 of this
  1390.                manual.  See page 36 for information about configuring 4OS2
  1391.                help.
  1392.  
  1393.  
  1394.                Shared History and Alias Lists
  1395.                  [see pages 57 and 94 in the 4DOS Reference Manual]
  1396.  
  1397.                By default, 4OS2 will use the same history list and alias list
  1398.                in all sessions and in both primary and secondary 4OS2 shells.
  1399.                It keeps these lists in shared memory segments.  This means
  1400.                that the aliases that you define in one session will be
  1401.                available immediately in copies of 4OS2 that are running in
  1402.                other sessions.  In addition, the history list, which is used
  1403.                to record the commands that you type, is updated in all 4OS2
  1404.                sessions whenever you type a command at any 4OS2 prompt.
  1405.  
  1406.                If you want to start a 4OS2 shell or session with unique alias
  1407.                and history lists, use the LocalAliases and LocalHistory
  1408.                directives in the 4OS2.INI file (see page 35) or on the 4OS2
  1409.                command line (see page 33).  Using the 4OS2.INI directive is
  1410.                the best choice if you want to have separate alias and history
  1411.                lists for all 4OS2 sessions.  You might prefer using the
  1412.  
  1413.           ___________________________________________________________________
  1414.           Copyright 1992, JP Software Inc.       4OS2 Reference Manual  /  21
  1415.  
  1416.                                                        CHAPTER 3 / USING 4OS2
  1417.           ___________________________________________________________________
  1418.  
  1419.  
  1420.                command line directive if you want to create a separate list
  1421.                just for one particular session or shell.
  1422.  
  1423.                The memory segments that contain the shared history and alias
  1424.                lists are retained as long as there is at least one copy of
  1425.                4OS2 running that supports shared lists.  When all such copies
  1426.                of 4OS2 end, the shared history and alias lists are discarded.
  1427.  
  1428.                A utility program called SHRALIAS.EXE is included on the 4OS2
  1429.                distribution diskette.  It will keep these lists open until
  1430.                your computer is rebooted.  To use this program, include the
  1431.                following line in your STARTUP.CMD, 4START, or 4OS2 session
  1432.                startup batch file:
  1433.  
  1434.                     [d:\path\]shralias
  1435.  
  1436.                Once SHRALIAS is started, it will remain active until your
  1437.                computer is turned off or rebooted, even if the session from
  1438.                which it was started is terminated.  To deactivate SHRALIAS,
  1439.                enter this command at any 4OS2 prompt:
  1440.  
  1441.                     [d:\path]shralias /u
  1442.  
  1443.  
  1444.                Special Characters
  1445.  
  1446.                To maintain compatibility with CMD.EXE, the default values for
  1447.                three special characters are different in 4OS2 than in 4DOS.
  1448.                If you want to share batch (.BTM) files or aliases between
  1449.                4OS2 and 4DOS, you will probably want to select a common set
  1450.                of characters for both environments.  You can do so with
  1451.                directives in 4OS2.INI or 4DOS.INI, or by using the SETDOS
  1452.                command.
  1453.  
  1454.                By default, the command separator is an ampersand [&] in 4OS2
  1455.                and a caret [^] in 4DOS (see page 62 in the 4DOS Reference
  1456.                Manual).  You can select a common command separator character
  1457.                with the CommandSep directive or the SETDOS /C command.
  1458.  
  1459.                The default escape character is a caret [^] in 4OS2 and Ctrl-X
  1460.                in 4DOS (see page 91 in the 4DOS Reference Manual).  You can
  1461.                select a common escape character with the EscapeChar directive
  1462.                or the SETDOS /E command.
  1463.  
  1464.                4OS2 batch files and aliases recognize the dollar sign [$] to
  1465.                mean all or all remaining replaceable parameters (e.g., %$ or
  1466.                %2$).  The corresponding symbol in 4DOS is the ampersand [&]
  1467.                (see pages 44 and 75 in the 4DOS Reference Manual).  You can
  1468.  
  1469.  
  1470.           ___________________________________________________________________
  1471.           Copyright 1992, JP Software Inc.       4OS2 Reference Manual  /  22
  1472.  
  1473.                                                        CHAPTER 3 / USING 4OS2
  1474.           ___________________________________________________________________
  1475.  
  1476.  
  1477.                select a common symbol with the ParameterChar directive or the
  1478.                SETDOS /P command.
  1479.  
  1480.  
  1481.           Executable File Names
  1482.                  [see pages 44 and 75 in the 4DOS reference manual]
  1483.  
  1484.                4OS2 is similar to 4DOS in the way it executes programs and
  1485.                batch files.  It searches for .COM, .EXE, .BTM, and .CMD
  1486.                files, and files with executable extensions, in the current
  1487.                directory and then in each directory in the PATH.  In
  1488.                addition, 4OS2 will execute any file which contains an
  1489.                executable application program even if it does not have the
  1490.                standard .COM or .EXE extension.
  1491.  
  1492.                Such a file will be found only if you give its extension
  1493.                explicitly.  For example, if you had an executable file in the
  1494.                current directory called WORKOUT.PGM you could run it by
  1495.                typing that name (with the extension), but not by simply
  1496.                typing WORKOUT.
  1497.  
  1498.  
  1499.           Redirection
  1500.                  [see page 66 in the 4DOS Reference Manual]
  1501.  
  1502.                In addition to the extended 4DOS redirection options, 4OS2
  1503.                also supports the OS/2 (CMD.EXE) syntax
  1504.  
  1505.                          n>file
  1506.  
  1507.                and
  1508.  
  1509.                          n>&m
  1510.  
  1511.                where [n] and [m] are digits between 0 and 9.  You may not put
  1512.                any spaces between the n and the >, or between the & and the m
  1513.                in the second form.   The digits represent file handles;  OS/2
  1514.                interprets "0" as STDIN (standard input), "1" as STDOUT
  1515.                (standard output), and "2" as STDERR (standard error).
  1516.                Handles 3 to 9 will probably not be useful unless you have an
  1517.                application which uses those handles for a specific,
  1518.                documented purpose.
  1519.  
  1520.                The n>file syntax redirects output from handle n to a file.
  1521.                You can use this form to redirect two handles to different
  1522.                places.  For example,
  1523.  
  1524.                     [c:\] dir >outfile 2>errfile
  1525.  
  1526.  
  1527.           ___________________________________________________________________
  1528.           Copyright 1992, JP Software Inc.       4OS2 Reference Manual  /  23
  1529.  
  1530.                                                        CHAPTER 3 / USING 4OS2
  1531.           ___________________________________________________________________
  1532.  
  1533.  
  1534.  
  1535.                sends normal output to a file called OUTFILE and any error
  1536.                messages to a file called ERRFILE.
  1537.  
  1538.                The n>&m syntax redirects handle n to the same location as the
  1539.                previously assigned handle m.  For example, to send STDERR to
  1540.                the same file as STDOUT, you could use this command:
  1541.  
  1542.                     [c:\] dir >outfile 2>&1
  1543.  
  1544.                Notice that you can perform the same operations by using
  1545.                4OS2's enhanced redirection features.  The two examples above
  1546.                could be written as
  1547.  
  1548.                     [c:\] dir >outfile >&>errfile
  1549.  
  1550.                and
  1551.  
  1552.                     [c:\] dir >&outfile
  1553.  
  1554.  
  1555.           Piping
  1556.                  [see page 68 in the 4DOS Reference Manual]
  1557.  
  1558.                A pipe takes the standard output of one program (the sending
  1559.                program) and uses it as the standard input of a second program
  1560.                (the receiving program).  Because of the limitations of MS-
  1561.                DOS, 4DOS implements pipes by creating a temporary file to
  1562.                collect the output from the sending program.  Once that
  1563.                program is done, 4DOS starts the receiving program and sends
  1564.                it the contents of the temporary file as its input.  When the
  1565.                receiving program ends, 4DOS deletes the temporary file.
  1566.  
  1567.                The flexibility of OS/2 lets 4OS2 implement pipes by starting
  1568.                a new process for the receiving program.  The sending and
  1569.                receiving programs run simultaneously;  the sending program
  1570.                writes to the pipe and the receiving program reads from the
  1571.                pipe.  When both programs finish, the process for the
  1572.                receiving program is ended automatically.
  1573.  
  1574.                If you are used to using pipes under 4DOS, you normally will
  1575.                not see any difference with a 4OS2 pipe except perhaps less
  1576.                disk activity.  But you may not get the results you expect
  1577.                from 4OS2 if you use a pipe command like:
  1578.  
  1579.                          [c:\] echo test | input %%var
  1580.  
  1581.  
  1582.  
  1583.  
  1584.           ___________________________________________________________________
  1585.           Copyright 1992, JP Software Inc.       4OS2 Reference Manual  /  24
  1586.  
  1587.                                                        CHAPTER 3 / USING 4OS2
  1588.           ___________________________________________________________________
  1589.  
  1590.  
  1591.  
  1592.                In 4DOS, this pipe will create an environment variable called
  1593.                VAR and set its value as "test."  You will be able to see the
  1594.                new variable by typing SET at the 4DOS command.
  1595.  
  1596.                In 4OS2, VAR will be set in the environment that belongs to
  1597.                the receiving program.  But that environment will be discarded
  1598.                when the pipe has been emptied and the process ends.  You will
  1599.                never see VAR in the environment even though 4OS2 and OS/2 are
  1600.                both operating correctly.
  1601.  
  1602.                The same cautions apply to the "pipe-fitting" commands, TEE
  1603.                and Y.  When you use pipes with 4OS2, make sure you think
  1604.                about any possible consequences that can occur from using a
  1605.                separate process to run the receiving program.
  1606.  
  1607.                Because 4OS2 does not use temporary files for pipes, the TEMP
  1608.                and TEMP4DOS environment variables do not affect pipes in 4OS2
  1609.                as they do in 4DOS.
  1610.  
  1611.  
  1612.           4OS2 Internal Variables
  1613.                  [see page 79 in the 4DOS Reference Manual]
  1614.  
  1615.                The following internal variables are unique to 4OS2:
  1616.  
  1617.                     _PID is the current process ID number.
  1618.  
  1619.                     _PPID is the process ID number of the parent process.
  1620.  
  1621.                     _SID is the session ID number.
  1622.  
  1623.                     _PTYPE is the current OS/2 process type:
  1624.  
  1625.                          AVIO      Character mode, windowed
  1626.                          DT        Detached (no screen in use)
  1627.                          FS        Character mode, full-screen
  1628.                          PM        Presentation Manager
  1629.  
  1630.                The following 4DOS internal variables are not available in
  1631.                4OS2:
  1632.  
  1633.                     _ALIAS (because 4OS2 dynamically sizes the alias list).
  1634.  
  1635.                     _DV (because DESQView does not run under OS/2).
  1636.  
  1637.                     _ENV (because 4OS2 dynamically sizes the environment).
  1638.  
  1639.  
  1640.  
  1641.           ___________________________________________________________________
  1642.           Copyright 1992, JP Software Inc.       4OS2 Reference Manual  /  25
  1643.  
  1644.                                                        CHAPTER 3 / USING 4OS2
  1645.           ___________________________________________________________________
  1646.  
  1647.  
  1648.  
  1649.                     _WIN (because Windows does not run in the OS/2 character-
  1650.                     mode sessions used to run 4OS2).
  1651.  
  1652.                One 4DOS internal variable has additional options in 4OS2:
  1653.  
  1654.                     %_VIDEO returns two additional video adapter types not
  1655.                     detectable under DOS:  "IA/A" for the IBM PS/2 Image
  1656.                     Adapter/A, and "XGA" for IBM the PS/2 XGA.
  1657.  
  1658.  
  1659.           4OS2 Variable Functions
  1660.                  [see page 83 in the 4DOS Reference Manual]
  1661.  
  1662.                The following variable functions are available only in 4OS2:
  1663.  
  1664.                     @EXETYPE[filename]:  Returns the application type as a
  1665.                     string:
  1666.  
  1667.                          DOS       DOS .COM, .EXE, or .BAT file (OS/2 2.0
  1668.                                    only)
  1669.                          AVIO      OS/2 Character mode, windowed
  1670.                          FS        OS/2 Character mode, full-screen
  1671.                          PM        OS/2 Presentation Manager
  1672.                          WIN       Windows 3 (OS/2 2.0 only)
  1673.  
  1674.                     @FSTYPE[d:]: Returns the file system type for the
  1675.                     specified drive.  Normally, it will return "FAT" for a
  1676.                     DOS-compatible drive with a file allocation table or
  1677.                     "HPFS" for a drive that uses OS/2's high performance file
  1678.                     system.  Other values may be returned by any additional
  1679.                     file systems installed with the IFS= directive in
  1680.                     CONFIG.SYS.
  1681.  
  1682.                The following 4DOS variable functions are not available in
  1683.                4OS2:
  1684.  
  1685.                     @EMS (because OS/2 does not recognize nor use expanded
  1686.                     memory).
  1687.  
  1688.                     @EXTENDED (because OS/2 does not recognize extended
  1689.                     memory as a special memory type).
  1690.  
  1691.                     @LPT (because there is no feasible way to read printer
  1692.                     status information directly under OS/2).
  1693.  
  1694.                     @REMOVABLE (because there is no feasible way to detect
  1695.                     removable drives under OS/2)
  1696.  
  1697.  
  1698.           ___________________________________________________________________
  1699.           Copyright 1992, JP Software Inc.       4OS2 Reference Manual  /  26
  1700.  
  1701.                                                        CHAPTER 3 / USING 4OS2
  1702.           ___________________________________________________________________
  1703.  
  1704.  
  1705.  
  1706.                     @TRUENAME (because there is no feasible way to detect
  1707.                     true names under OS/2).
  1708.  
  1709.                     @XMS (because OS/2 does not recognize nor use XMS
  1710.                     memory).
  1711.  
  1712.                Also, in 4OS2 the @DOSMEM function returns the size of the
  1713.                largest block of free memory, not the total amount of free
  1714.                memory (because total free memory is not an available or
  1715.                meaningful value under OS/2).
  1716.  
  1717.  
  1718.           Batch Files
  1719.  
  1720.                4OS2 can execute two kinds of batch files: files with an
  1721.                extension of .CMD and those with an extension of .BTM.  The
  1722.                former are traditional OS/2 batch files;  the latter can be
  1723.                run by 4OS2 and by 4DOS running either under DOS or in a DOS
  1724.                session under OS/2.
  1725.  
  1726.                If you run the same .BTM files with 4OS2 and 4DOS, you should
  1727.                encounter few difficulties.  However, 4OS2 and 4DOS by default
  1728.                use a different command separator, a different escape
  1729.                character, and a different character for all remaining
  1730.                parameters on a batch file or alias command line.  You may
  1731.                want to use the CommandSep, EscapeChar, and ParameterChar
  1732.                directives in either 4OS2.INI or 4DOS.INI, or the
  1733.                corresponding SETDOS switches, to set the same characters in
  1734.                both products (see page 23).
  1735.  
  1736.                Inside a .BTM file, you may need to determine whether the file
  1737.                is being executed by 4OS2, by 4DOS running under DOS, or by
  1738.                4DOS in an OS/2  DOS session.  You may also want the file to
  1739.                do different things in primary and secondary shells.
  1740.  
  1741.                The template on the following page should help you write .BTM
  1742.                files that can run successfully in each possible environment.
  1743.                It includes detection of several different environments but
  1744.                does not cover all possibilities.  The basic rule is to use
  1745.                the internal variable %_DOS to determine the operating system,
  1746.                %_DOSVER to determine the operating system version, and
  1747.                %_SHELL to determine the shell level.  Note that in a DOS
  1748.                session, %_DOSVER returns 3.3, 5.0, etc. for the corresponding
  1749.                MS-DOS versions, 10.2 or 10.3 for the OS/2 version 1.2 or 1.3
  1750.                DOS Compatibility Box, and 20.0 for an OS/2 version 2.0 VDM.
  1751.                In an OS/2 session, %_DOSVER returns the true OS/2 version
  1752.                (e.g., 1.2 or 2.0).
  1753.  
  1754.  
  1755.           ___________________________________________________________________
  1756.           Copyright 1992, JP Software Inc.       4OS2 Reference Manual  /  27
  1757.  
  1758.                                                        CHAPTER 3 / USING 4OS2
  1759.           ___________________________________________________________________
  1760.  
  1761.  
  1762.  
  1763.                     [commands here for both 4OS2 and 4DOS]
  1764.                     iff "%_DOS" == "DOS" then
  1765.                          [commands here for all 4DOS shells]
  1766.                          iff %_DOSVER == 20.0
  1767.                               [commands here for OS/2 2.0 VDMs]
  1768.                          endiff
  1769.                          iff %_SHELL == 0
  1770.                               [commands here for 4DOS primary shells]
  1771.                          endiff
  1772.                     else
  1773.                          [commands here for all 4OS2 shells]
  1774.                          iff %_DOSVER == 1.3
  1775.                               [commands here for 4OS2 under OS/2 1.3]
  1776.                          elseiff %_DOSVER == 2.0
  1777.                               [commands here for 4OS2 under OS/2 2.0]
  1778.                          endiff
  1779.                          iff %_SHELL ne 0
  1780.                               [commands here for all 4OS2 secondary shells]
  1781.                          endiff
  1782.                     endiff
  1783.  
  1784.  
  1785.           4OS2 Startup and Exit Files
  1786.  
  1787.                4OS2 uses three startup or exit batch files: STARTUP.CMD,
  1788.                4START, and 4EXIT.  STARTUP.CMD is run automatically whenever
  1789.                OS/2 starts.  4START is run whenever 4OS2 starts, and 4EXIT is
  1790.                run whenever 4OS2 exits.  4START and 4EXIT can be either .CMD
  1791.                or .BTM files.  If they have the extension .BTM and are in a
  1792.                directory where 4DOS can find them, they will also run
  1793.                whenever 4DOS starts and exits.
  1794.  
  1795.  
  1796.                Using STARTUP.CMD
  1797.  
  1798.                If you have a STARTUP.CMD file in the root directory of your
  1799.                OS/2 boot drive, OS/2 will automatically create a windowed
  1800.                4OS2 session when the system boots and will tell that session
  1801.                to execute STARTUP.CMD.  (This is a feature of OS/2 and does
  1802.                not depend on 4OS2.  If CMD.EXE is your OS/2 command processor
  1803.                it will be used to run STARTUP.CMD.)
  1804.  
  1805.                You can use STARTUP.CMD to start other sessions, to set up a
  1806.                global alias list, start SHRALIAS, etc., just as you might use
  1807.                AUTOEXEC.BAT under DOS.  STARTUP.CMD will be executed once,
  1808.                when your system boots, not every time a 4OS2 session is
  1809.                started.
  1810.  
  1811.  
  1812.           ___________________________________________________________________
  1813.           Copyright 1992, JP Software Inc.       4OS2 Reference Manual  /  28
  1814.  
  1815.                                                        CHAPTER 3 / USING 4OS2
  1816.           ___________________________________________________________________
  1817.  
  1818.  
  1819.  
  1820.                If you place the command EXIT at the end of STARTUP.CMD, the
  1821.                session created to run STARTUP.CMD will end when that command
  1822.                is executed, and any global alias list will be discarded if no
  1823.                other 4OS2 session has been started and SHRALIAS has not been
  1824.                loaded (see page 22).  If you don't include an EXIT, the
  1825.                session will remain open and can be used as a normal windowed
  1826.                4OS2 session.
  1827.  
  1828.  
  1829.                Using 4START and 4EXIT
  1830.  
  1831.                If you create a 4START.BTM and 4EXIT.BTM file, you can use
  1832.                them for both 4OS2 and 4DOS.  The template above shows how to
  1833.                include commands that are specific to each operating system.
  1834.  
  1835.                If you prefer to use different files for 4OS2 and 4DOS, you
  1836.                can use 4START.CMD for 4OS2 and 4START.BAT for 4DOS.  You
  1837.                could name your 4EXIT files similarly.  You can also keep the
  1838.                4START and 4EXIT files separate by placing the files for 4OS2
  1839.                in the 4OS2 directory and the files for 4DOS in the 4DOS
  1840.                directory.
  1841.  
  1842.                If you prefer, you can create a file with a name other than
  1843.                4START (for example, STARTOS2.CMD) and put its name in the
  1844.                Parameters field for any 4OS2 icon (see page 32).  Doing so
  1845.                has two advantages.  The file will only be started when a
  1846.                primary 4OS2 shell is started, not under a secondary shell or
  1847.                under 4DOS.  Also, you can then use different startup files
  1848.                for different 4OS2 sessions.  Note that this file will not be
  1849.                run by the "automatic" session that OS/2 starts at boot time
  1850.                to run STARTUP.CMD.  If you want it to run at that time also,
  1851.                you will have to CALL it from STARTUP.CMD.
  1852.  
  1853.  
  1854.           REXX Support
  1855.  
  1856.                REXX is a file and text processing language developed by IBM
  1857.                and included within OS/2.  REXX files have a .CMD extension,
  1858.                just like normal batch files, but the first two characters in
  1859.                the file are always [/*], which indicate the beginning of a
  1860.                REXX comment.
  1861.  
  1862.                4OS2 checks to see if the first two characters on the first
  1863.                line of a .CMD file are [/*].  If so, it passes the file to
  1864.                OS/2's built-in REXX facility for processing.  Any commands in
  1865.                the file that are not recognized by REXX will be passed back
  1866.                to 4OS2.  This allows you to embed any valid 4OS2 command
  1867.                (including internal commands and aliases) within a REXX file
  1868.  
  1869.           ___________________________________________________________________
  1870.           Copyright 1992, JP Software Inc.       4OS2 Reference Manual  /  29
  1871.  
  1872.                                                        CHAPTER 3 / USING 4OS2
  1873.           ___________________________________________________________________
  1874.  
  1875.  
  1876.                which is started from 4OS2.  You can also force REXX to pass
  1877.                commands to 4OS2 by enclosing those commands in single
  1878.                quotation marks.
  1879.  
  1880.                For more information on REXX see your OS/2 documentation.
  1881.  
  1882.  
  1883.           EXTPROC Support
  1884.  
  1885.                OS/2 also offers an external processor (EXTPROC) option for
  1886.                batch files that lets you define an external program to
  1887.                process a particular .CMD file.
  1888.  
  1889.                4OS2 supports EXTPROC in the same way as CMD.EXE.  To identify
  1890.                a .CMD file to be used with an external processor, place the
  1891.                string "EXTPROC" as the first word on the first line of the
  1892.                file followed by the name of the external program that should
  1893.                be called.  4OS2 will start the program and pass it the name
  1894.                of the .CMD file and any command line arguments that were
  1895.                entered.  4OS2 will look for the external processor in the
  1896.                current directory and then in each directory in the PATH.
  1897.                4OS2 will start the external processor in the current session,
  1898.                if possible, and wait for it to finish.  If the external
  1899.                processor's application type is incompatible with the current
  1900.                session, 4OS2 will begin a new session for it and wait until
  1901.                that session ends before returning to the command prompt.
  1902.  
  1903.                For example, suppose GETDATA.CMD contains the following lines:
  1904.  
  1905.                     EXTPROC D:\DATAACQ\DATALOAD.EXE
  1906.                     OPEN PORT1
  1907.                     READ 4000
  1908.                     DISKWRITE D:\DATAACQ\PORT1\RAW
  1909.  
  1910.                Then if you entered the command:
  1911.  
  1912.                     [d:\dataacq>] getdata p17
  1913.  
  1914.                4OS2 would read the GETDATA.CMD file, determine that it began
  1915.                with an EXTPROC command, read the name of the processor
  1916.                program, and then execute the command:
  1917.  
  1918.                     D:\DATAACQ\DATALOAD.EXE D:\DATAACQ\GETDATA.CMD p17
  1919.  
  1920.                The hypothetical DATALOAD.EXE program would then be
  1921.                responsible for reopening the GETDATA.CMD file, ignoring the
  1922.                EXTPROC line at the start, and interpreting the other
  1923.                instructions in the file.  It would also have to respond
  1924.                appropriately to the command line parameter entered (p17).
  1925.  
  1926.           ___________________________________________________________________
  1927.           Copyright 1992, JP Software Inc.       4OS2 Reference Manual  /  30
  1928.  
  1929.                                                        CHAPTER 3 / USING 4OS2
  1930.           ___________________________________________________________________
  1931.  
  1932.  
  1933.  
  1934.                For more information on external batch file processors see
  1935.                your OS/2 documentation.
  1936.  
  1937.                Do not try to run 4OS2 or CMD.EXE as an external processor
  1938.                with EXTPROC.  Both programs will interpret the EXTPROC line
  1939.                as a command to re-open themselves.  The result will be an
  1940.                infinite loop that will continue until the computer runs out
  1941.                of resources and locks up.
  1942.  
  1943.  
  1944.  
  1945.  
  1946.  
  1947.  
  1948.  
  1949.  
  1950.  
  1951.  
  1952.  
  1953.  
  1954.  
  1955.  
  1956.  
  1957.  
  1958.  
  1959.  
  1960.  
  1961.  
  1962.  
  1963.  
  1964.  
  1965.  
  1966.  
  1967.  
  1968.  
  1969.  
  1970.  
  1971.  
  1972.  
  1973.  
  1974.  
  1975.  
  1976.  
  1977.  
  1978.  
  1979.  
  1980.  
  1981.  
  1982.  
  1983.           ___________________________________________________________________
  1984.           Copyright 1992, JP Software Inc.       4OS2 Reference Manual  /  31
  1985.  
  1986.                                          CHAPTER 4 / CONFIGURATION AND TUNING
  1987.           ___________________________________________________________________
  1988.  
  1989.  
  1990.  
  1991.           CHAPTER 4 / CONFIGURATION AND TUNING
  1992.  
  1993.                  [see page 107 in the 4DOS Reference Manual]
  1994.  
  1995.           4OS2 can be configured in three different ways: with command-line
  1996.           options, through its initialization file, and via the SETDOS
  1997.           command.  The SETDOS command is described on page 54 of this manual
  1998.           and page 280 of the 4DOS Reference Manual.  Command line options
  1999.           and the initialization file are described in this chapter.  This
  2000.           chapter also discusses how to configure the 4OS2 help system and
  2001.           how to use 4DOS effectively in DOS sessions.
  2002.  
  2003.           In this chapter, we assume that 4OS2 is set up as the default OS/2
  2004.           command processor in your OS/2 CONFIG.SYS file.  This is normally
  2005.           done when you install 4OS2.  See pages 7 and 7 for information on
  2006.           making these changes to CONFIG.SYS manually.
  2007.  
  2008.  
  2009.           Creating and Configuring 4OS2 Icons
  2010.  
  2011.                You can create as many 4OS2 icons as you wish on the OS/2
  2012.                desktop.  Different icons can be used to start 4OS2 in
  2013.                different modes, with different startup commands or options,
  2014.                or to run different batch files or other commands.  You can
  2015.                use these icons to run commonly-used commands and batch files
  2016.                directly from the OS/2 desktop.
  2017.  
  2018.                Each icon represents a different 4OS2 session and you can set
  2019.                up any of these sessions to run in windowed or full-screen
  2020.                mode.  You can also set any necessary command line parameters
  2021.                for 4OS2 such as a command to be executed, any desired
  2022.                switches, and the name and path for 4OS2.INI.  More
  2023.                information on command line switches and options for 4OS2, and
  2024.                on 4OS2.INI, is included later in this section.
  2025.  
  2026.                For general information on creating and configuring icons, see
  2027.                page 15 and your OS/2 documentation.
  2028.  
  2029.                When you configure a 4OS2 icon, place command line parameters
  2030.                that you want passed to 4OS2 (e.g., @ininame) into the
  2031.                Parameters field for the icon.
  2032.  
  2033.                To run a startup batch file for a particular 4OS2 session,
  2034.                include its name (with a path, if the batch file is not in the
  2035.                session's startup directory) as the last item in the
  2036.                Parameters field.  That batch file will be executed after any
  2037.                4START file but before the first prompt is displayed.  You can
  2038.                use the batch file to set environment variables and execute
  2039.  
  2040.           ___________________________________________________________________
  2041.           Copyright 1992, JP Software Inc.       4OS2 Reference Manual  /  32
  2042.  
  2043.                                          CHAPTER 4 / CONFIGURATION AND TUNING
  2044.           ___________________________________________________________________
  2045.  
  2046.  
  2047.                any other 4OS2 commands.  You can also execute any internal
  2048.                4OS2 command, external command, or alias by placing its name
  2049.                in the Parameters field.  When you set up a batch file or
  2050.                other command to run in this way you are using the command
  2051.                option (see below).
  2052.  
  2053.                To execute an internal or external command, an alias, or a
  2054.                batch file and then exit (return to the desktop) when it is
  2055.                done, place /C command (rather than just command) as the last
  2056.                item in the Parameters field.
  2057.  
  2058.  
  2059.           4OS2 Command Line Options
  2060.  
  2061.                The 4OS2 command line does not need to contain any
  2062.                information.  When invoked with an empty command line, 4OS2
  2063.                will configure itself from the 4OS2.INI file, run 4START, and
  2064.                then display a prompt and wait for you to type a command.
  2065.                However, you may add information to the 4OS2 command line that
  2066.                will affect the way it operates.
  2067.  
  2068.                Command line options for primary shells are set in the
  2069.                Parameters field of the 4OS2 icon.  If you need help finding
  2070.                and setting the Parameters field for your version of OS/2, see
  2071.                page 15.  Command line options for secondary shells can be set
  2072.                using 4OS2.INI directives, or typed on the command line itself
  2073.                following the program name if the shell is started from a
  2074.                prompt.
  2075.  
  2076.                4OS2 recognizes six optional fields on the command line.  If
  2077.                you use more than one of these fields, their order is
  2078.                important.  The syntax for these options is (all options go on
  2079.                one line):
  2080.  
  2081.                     [d:\path] [@d:\path\inifile] [/S] [//iniline]...
  2082.                     [/C | /K] [command]
  2083.  
  2084.                In this syntax statement, items in square brackets are
  2085.                optional.  The //iniline option may be repeated.
  2086.  
  2087.                In the descriptions below, d: means a drive letter and \path
  2088.                means a subdirectory name.
  2089.  
  2090.                d:\path     4OS2 will use this directory and path to set the
  2091.                            COMSPEC environment variable for this session.
  2092.                            If this option is not used, COMSPEC is set from
  2093.                            the location of 4OS2.EXE.  Since 4OS2 always
  2094.                            knows what drive and directory it was started
  2095.                            from, there is little reason to use this option.
  2096.  
  2097.           ___________________________________________________________________
  2098.           Copyright 1992, JP Software Inc.       4OS2 Reference Manual  /  33
  2099.  
  2100.                                          CHAPTER 4 / CONFIGURATION AND TUNING
  2101.           ___________________________________________________________________
  2102.  
  2103.  
  2104.                            It is included only for compatibility with OS/2's
  2105.                            default shell program, CMD.EXE.  This option
  2106.                            cannot be used for secondary shells.
  2107.  
  2108.                @d:\path\inifile
  2109.                            This option sets the path and name of the
  2110.                            4OS2.INI file, which is discussed below.  You do
  2111.                            not need this option if you aren't using a
  2112.                            4OS2.INI file.  Nor do you need this option if
  2113.                            the file is named 4OS2.INI and it is in the same
  2114.                            subdirectory as 4OS2.EXE or in the root directory
  2115.                            of the boot drive.  Otherwise, this option must
  2116.                            be included.  This option is most useful if you
  2117.                            want to start a 4OS2 session with a specific and
  2118.                            unique INI file.
  2119.  
  2120.                /S          This option tells 4OS2 that you do not want it to
  2121.                            set up a Ctrl-C / Ctrl-Break handler.  It is
  2122.                            included for compatibility with CMD.EXE, but it
  2123.                            may cause the system to operate incorrectly if
  2124.                            you use this option without other software to
  2125.                            handle Ctrl-C and Ctrl-Break.  This option should
  2126.                            be avoided by most users.
  2127.  
  2128.                //iniline   This option tells 4OS2 to treat the text
  2129.                            appearing between the // and the next space or
  2130.                            tab as a 4OS2.INI directive (see below for a
  2131.                            discussion of 4OS2.INI).  The directive should be
  2132.                            in the same format as a line in 4OS2.INI, but it
  2133.                            may not contain spaces, tabs, or comments.  This
  2134.                            option overrides any corresponding directive in
  2135.                            your 4OS2.INI file.  This option is a convenient
  2136.                            way to send 4OS2 one or two simple directives
  2137.                            without modifying or creating a new 4OS2.INI
  2138.                            file.
  2139.  
  2140.                [/C | /K] command
  2141.                            This option tells 4OS2 to run a command when it
  2142.                            starts.  The command will be run after 4START has
  2143.                            been executed and before any command prompt is
  2144.                            displayed.  It can be any valid internal or
  2145.                            external command, batch file, or alias, and you
  2146.                            may include multiple commands by using the
  2147.                            command separator.  All other startup options
  2148.                            must be placed before the command, because 4OS2
  2149.                            will treat characters after the command as part
  2150.                            of the command and not as additional startup
  2151.                            options.
  2152.  
  2153.  
  2154.           ___________________________________________________________________
  2155.           Copyright 1992, JP Software Inc.       4OS2 Reference Manual  /  34
  2156.  
  2157.                                          CHAPTER 4 / CONFIGURATION AND TUNING
  2158.           ___________________________________________________________________
  2159.  
  2160.  
  2161.  
  2162.                            When the command is preceded by a /C, 4OS2 will
  2163.                            execute the command and then exit and return to
  2164.                            the parent program or the OS/2 desktop, without
  2165.                            displaying a prompt.
  2166.  
  2167.                            The /K switch has no effect; using it is the same
  2168.                            as placing the command (without a /C or /K) at
  2169.                            the end of the startup command line.  It is
  2170.                            included only for compatibility with CMD.EXE.
  2171.  
  2172.  
  2173.           Using 4OS2.INI
  2174.  
  2175.                4OS2 uses a file of initialization information called the
  2176.                4OS2.INI file.  You can add to and edit this file with any
  2177.                ASCII text editor to set 4OS2 options and alter the way that
  2178.                4OS2 works.  Most of this section explains the options
  2179.                available through 4OS2.INI.  You only need to include entries
  2180.                in 4OS2.INI for any settings that you want to change from
  2181.                their default values.  If you are happy with all of the
  2182.                default values, you don't need a 4OS2.INI file at all.
  2183.  
  2184.                Some settings in 4OS2.INI are initialized when you install
  2185.                4OS2, so you may have a 4OS2.INI file even if you didn't
  2186.                create one yourself.  You should not delete this file unless
  2187.                you've checked carefully to be sure that you don't need any of
  2188.                the settings the initialization program put there.
  2189.  
  2190.                In general, the 4OS2.INI file works the same as the 4DOS.INI
  2191.                file described on page 116 of the 4DOS Reference Manual.  The
  2192.                following paragraphs only describe the differences between the
  2193.                two files and the way they are processed.
  2194.  
  2195.  
  2196.                4OS2.INI Directives
  2197.  
  2198.                The following directives are used only in 4OS2:
  2199.  
  2200.                     HelpBook = string (4OS2+CMDREF):  Sets the names of the
  2201.                     "books" to be loaded when 4OS2 help is invoked with the
  2202.                     HELP command or the F1 key.  The default is 4OS2+CMDREF
  2203.                     which loads the 4OS2 help and the OS/2 command reference.
  2204.                     See the next section for details about this directive.
  2205.  
  2206.                     LocalAliases = Yes | NO:  Normally, 4OS2 shares one alias
  2207.                     list among all running shells.  "Yes" forces 4OS2 to use
  2208.                     a local alias list for the affected session(s) instead of
  2209.                     a shared global list.
  2210.  
  2211.           ___________________________________________________________________
  2212.           Copyright 1992, JP Software Inc.       4OS2 Reference Manual  /  35
  2213.  
  2214.                                          CHAPTER 4 / CONFIGURATION AND TUNING
  2215.           ___________________________________________________________________
  2216.  
  2217.  
  2218.  
  2219.                     LocalHistory = Yes | NO:  Normally, 4OS2 shares one
  2220.                     history list among all running shells.  "Yes" forces 4OS2
  2221.                     to use a local history list for the affected session(s)
  2222.                     instead of a shared global list.
  2223.  
  2224.                     WindowState = STANDARD | Maximize | Minimize:  Sets the
  2225.                     state of the 4OS2 window in a windowed session.
  2226.                     "Standard" leaves the window where OS/2 puts it and is
  2227.                     the default.  "Maximize" maximizes the window; "Minimize"
  2228.                     minimizes it.  If WindowState is set to Maximize or
  2229.                     Minimize, you will see OS/2 briefly display the window at
  2230.                     the default size and position, then 4OS2 will change it
  2231.                     to the state you specify. This behavior is a limitation
  2232.                     of OS/2, not 4OS2.  (To create a 4OS2 window without
  2233.                     seeing the window state change on the screen, use the
  2234.                     START command with the /POS, /MIN, or /MAX switch.)
  2235.  
  2236.                The following 4DOS.INI directives may not be used in a
  2237.                4OS2.INI file.  These directives are specific to 4DOS, or to
  2238.                DOS or features or limitations that do not exist in OS/2:
  2239.  
  2240.                     Alias             FullINT2E         StackSize
  2241.                     ANSI              HelpOptions       Swapping
  2242.                     AutoExecPath      HelpPath          SwapReopen
  2243.                     DiskReset         LineInput         UMBEnvironment
  2244.                     DVCleanup         MessageServer     UMBLoad
  2245.                     EnvFree           NetwareNames      UniqueSwapName
  2246.                     Environment       Reduce
  2247.                     FineSwap          ReserveTPA
  2248.  
  2249.  
  2250.           Configuring 4OS2 Help
  2251.  
  2252.                In order for the 4OS2 help system to work properly, both
  2253.                VIEW.EXE and the help text file, 4OS2.INF, must be in their
  2254.                proper locations.  VIEW.EXE is normally stored in the \OS2
  2255.                directory.  This directory must be included in your PATH (as
  2256.                it normally is) so that 4OS2 can find and start VIEW.
  2257.  
  2258.                During automated installation, 4OS2.INF is copied to your 4OS2
  2259.                installation directory.  You can make the 4OS2 help text
  2260.                available to VIEW by either moving 4OS2.INF to the standard
  2261.                "book" directory shown on the SET BOOKSHELF line in CONFIG.SYS
  2262.                (normally \OS2\BOOK), or by adding the 4OS2 directory to the
  2263.                BOOKSHELF setting (BOOKSHELF, like PATH, contains a list of
  2264.                directory names, separated by semicolons).  The latter method
  2265.                is the one used by 4OS2's automated installation program.
  2266.  
  2267.  
  2268.           ___________________________________________________________________
  2269.           Copyright 1992, JP Software Inc.       4OS2 Reference Manual  /  36
  2270.  
  2271.                                          CHAPTER 4 / CONFIGURATION AND TUNING
  2272.           ___________________________________________________________________
  2273.  
  2274.  
  2275.  
  2276.                OS/2 includes a complete reference to all internal and
  2277.                external commands in the reference book named CMDREF.  This
  2278.                book is stored in the file \OS2\BOOK\CMDREF.INF.  4OS2
  2279.                normally passes the help file name "4OS2+CMDREF" to VIEW,
  2280.                which then opens the 4OS2 help text and the OS/2 command
  2281.                reference.  However, you can specify a different set of
  2282.                "books" to be opened when HELP or F1 is invoked.  To do so,
  2283.                use the HelpBook directive in 4OS2.INI (see page 35).
  2284.  
  2285.                For example, to set up 4OS2 so that only 4OS2 help is
  2286.                displayed (without the CMDREF book) when F1 is pressed, you
  2287.                would include the following directive in 4OS2.INI:
  2288.  
  2289.                     HelpBook=4OS2
  2290.  
  2291.                When more than one book is listed in the HelpBook setting,
  2292.                VIEW will see the combined group as a single book.  The Table
  2293.                of Contents displayed by VIEW will include the tables of
  2294.                contents from all the listed books, concatenated together as
  2295.                one group of topics with no divisions to show where one book
  2296.                ends and the next begins.
  2297.  
  2298.                If you wish, you can set up a separate icon for 4OS2 help
  2299.                which can be invoked from your desktop.  To do so, create an
  2300.                icon with VIEW.EXE as the program name and 4OS2 in the
  2301.                parameter field (use 4OS2+CMDREF to show both books when the
  2302.                icon is selected).
  2303.  
  2304.  
  2305.           Using 4DOS with OS/2
  2306.  
  2307.                The combination of 4OS2 and 4DOS gives you a consistent user
  2308.                interface whether you boot your computer with OS/2 or DOS, and
  2309.                whether you are in OS/2 character mode or running an OS/2 DOS
  2310.                session.  However, to use DOS, 4DOS, and OS/2 successfully
  2311.                requires some planning if you want to get all the power
  2312.                possible out of each operating environment.
  2313.  
  2314.                This section explains some of the planning you should do and
  2315.                some of the techniques you can use to get everything working
  2316.                together correctly.  It covers:
  2317.  
  2318.                     * Setting up your OS/2 CONFIG.SYS file to use 4DOS as
  2319.                       the command processor for OS/2 DOS sessions in all
  2320.                       versions of OS/2 (see page 38).
  2321.  
  2322.                     * Configuring OS/2 version 2.0 DOS sessions (Virtual DOS
  2323.                       Machines) to get the most out of 4DOS (see page 40).
  2324.  
  2325.           ___________________________________________________________________
  2326.           Copyright 1992, JP Software Inc.       4OS2 Reference Manual  /  37
  2327.  
  2328.                                          CHAPTER 4 / CONFIGURATION AND TUNING
  2329.           ___________________________________________________________________
  2330.  
  2331.  
  2332.  
  2333.                     * Arranging your 4DOS.INI, 4START, 4EXIT, and
  2334.                       AUTOEXEC.BAT files for use in the multiple DOS
  2335.                       sessions available under OS/2 2.0 (see page 42).
  2336.  
  2337.                     * Setting up temporary DOS sessions in OS/2 2.0 to run a
  2338.                       single DOS command or application (see page 44).
  2339.  
  2340.                     * Adjusting 4DOS.INI, 4START, 4EXIT, and AUTOEXEC.BAT
  2341.                       when you have the ability to boot your computer under
  2342.                       either DOS or OS/2 using OS/2's Dual Boot or Boot
  2343.                       Manager features (see page 44).
  2344.  
  2345.                Throughout this section, we assume that you want to use 4DOS
  2346.                as your command processor in all of these situations, and that
  2347.                you are using 4OS2 as your command processor in OS/2 character
  2348.                mode sessions.  Also, we assume that you have installed 4DOS
  2349.                in the C:\4DOS\ directory.
  2350.  
  2351.                If your system has a DOS boot capability (separate from OS/2),
  2352.                we suggest that you first make sure you have 4DOS set up to
  2353.                run properly under a standard DOS boot.  Use the 4DOS
  2354.                Reference Manual and the 4DOS installation program to set your
  2355.                DOS-based CONFIG.SYS and AUTOEXEC.BAT files the way you want
  2356.                them.
  2357.  
  2358.                To set up 4DOS for use with OS/2 you may need some background
  2359.                information on 4DOS installation and configuration options.
  2360.                We've included only what's necessary here;  if you want more
  2361.                detail or need to refresh your memory, see Chapters 2 and 6 of
  2362.                the 4DOS manual.
  2363.  
  2364.                If you are using OS/2's Dual Boot or Boot Manager, you will
  2365.                have (at least) two copies of CONFIG.SYS and AUTOEXEC.BAT on
  2366.                your computer, one for booting OS/2 and OS/2 DOS sessions, and
  2367.                the other for booting DOS without OS/2.  See the section on
  2368.                Dual Boot and Boot Manager on page 44 for details on where
  2369.                these two sets of files are stored.  Unless otherwise
  2370.                specified, references in this section to CONFIG.SYS and
  2371.                AUTOEXEC.BAT refer to the OS/2 versions of these files.
  2372.  
  2373.  
  2374.                Changing the OS/2 CONFIG.SYS File
  2375.  
  2376.                Before you make any changes to CONFIG.SYS, make sure that you
  2377.                have a bootable floppy disk or your OS/2 installation disks,
  2378.                so that an error won't leave your system unbootable.  You're
  2379.                not likely to create such an error, especially under OS/2, but
  2380.                this is always a wise precaution.
  2381.  
  2382.           ___________________________________________________________________
  2383.           Copyright 1992, JP Software Inc.       4OS2 Reference Manual  /  38
  2384.  
  2385.                                          CHAPTER 4 / CONFIGURATION AND TUNING
  2386.           ___________________________________________________________________
  2387.  
  2388.  
  2389.  
  2390.                To install 4DOS as your default shell for OS/2 DOS sessions,
  2391.                look for a SHELL= command in CONFIG.SYS.  It will look
  2392.                something like this:
  2393.  
  2394.                          SHELL=C:\OS2\MDOS\COMMAND.COM C:\OS2\MDOS /P
  2395.  
  2396.                Change the line to refer to 4DOS rather than COMMAND.COM:
  2397.  
  2398.                          SHELL=c:\4dos\4dos.com c:\4dos [options]
  2399.  
  2400.                The first part of that statement simply sets 4DOS.COM as your
  2401.                shell program for DOS sessions.  The second part specifies the
  2402.                directory where 4DOS.COM is stored, which is called the
  2403.                COMSPEC setting.  You must include the COMSPEC setting or your
  2404.                OS/2 DOS sessions may not start or work properly.  In an OS/2
  2405.                DOS session, 4DOS cannot determine the COMSPEC setting
  2406.                automatically unless 4DOS.COM is stored in the root directory
  2407.                of the boot drive.
  2408.  
  2409.                You may want to add other 4DOS options to the command line as
  2410.                well;  see page 108 in the 4DOS Reference Manual.
  2411.  
  2412.                After you have modified CONFIG.SYS, you must shut down OS/2
  2413.                and reboot in order for your changes to take effect.  But
  2414.                before you do, read through the remainder of this section to
  2415.                see if you need to make any other configuration changes.
  2416.  
  2417.  
  2418.                Using 4DOS with OS/2 Version 1.x
  2419.  
  2420.                Under OS/2 version 1.x, you can install 4DOS simply by setting
  2421.                the SHELL= command in CONFIG.SYS.  This command determines how
  2422.                4DOS starts when you invoke the DOS Compatibility Box from the
  2423.                OS/2 desktop.
  2424.  
  2425.                You can use the [options] portion of the SHELL command to
  2426.                select a special 4DOS.INI file and to set any other 4DOS
  2427.                command line options you choose.  In essence, you can set up
  2428.                4DOS just as you would if you installed it on a DOS system
  2429.                without OS/2.
  2430.  
  2431.                You can skip the sections below which explain how to configure
  2432.                DOS sessions under OS/2 version 2.0.  However, if you are
  2433.                using the OS/2 version 1.x Dual Boot capability, you should
  2434.                read the section on Dual Boot and Boot Manager (page 44).
  2435.  
  2436.  
  2437.  
  2438.  
  2439.           ___________________________________________________________________
  2440.           Copyright 1992, JP Software Inc.       4OS2 Reference Manual  /  39
  2441.  
  2442.                                          CHAPTER 4 / CONFIGURATION AND TUNING
  2443.           ___________________________________________________________________
  2444.  
  2445.  
  2446.  
  2447.  
  2448.                Using 4DOS with OS/2 Version 2.0
  2449.  
  2450.                Under OS/2 version 2.0, you can have multiple icons for DOS
  2451.                sessions or Virtual DOS Machines (VDMs).  These may include
  2452.                icons in the Command Prompts window, icons for "migrated
  2453.                applications," icons for DOS and Windows applications, and
  2454.                icons for batch files.
  2455.  
  2456.                Assuming you set up your VDM icons as described here, each
  2457.                time a DOS session starts 4DOS is loaded as a primary shell.
  2458.                4DOS will process 4DOS.INI, execute your 4START file if you
  2459.                have one, and execute AUTOEXEC.BAT.  When the session is
  2460.                closed with the EXIT command, 4DOS will run your 4EXIT file if
  2461.                you have one.  You can start any number of DOS sessions and
  2462.                (within the limits of system resources) have as many running
  2463.                simultaneously as you like.
  2464.  
  2465.                This is fundamentally different from what happens when you
  2466.                boot your computer under DOS or OS/2 1.x, where there is only
  2467.                one 4DOS primary shell, AUTOEXEC.BAT is only executed once
  2468.                each time you boot, and so on.  OS/2 version 2.0 gives you a
  2469.                lot more flexibility, but that flexibility requires planning
  2470.                to get the most out of 4DOS.
  2471.  
  2472.                For example, you can have all your DOS sessions use the same
  2473.                AUTOEXEC.BAT file, or you can have different versions of
  2474.                AUTOEXEC.BAT for different sessions.  The same is true of the
  2475.                other startup and exit files (4DOS.INI, 4START, and 4EXIT).
  2476.                This section and the sections below discuss how to set up
  2477.                icons for your DOS sessions, and how to arrange your startup
  2478.                and exit files so that 4DOS will do just what you want it to
  2479.                in each DOS session.
  2480.  
  2481.                Each VDM icon contains its own information about how to start
  2482.                DOS for that session.  In essence, each icon has its own
  2483.                CONFIG.SYS file built into it.  When you create a new icon
  2484.                from OS/2's default Program template, this DOS configuration
  2485.                information is initialized based on your CONFIG.SYS file, or
  2486.                taken from standard OS/2 DOS defaults (for settings which have
  2487.                no corresponding command in CONFIG.SYS).  If you create a new
  2488.                icon by Copying an existing icon, the existing icon's
  2489.                information will be used in the new icon.
  2490.  
  2491.                Once an icon has been created, you can modify the DOS
  2492.                configuration information by using the DOS Settings button on
  2493.                the Session page in the icon's Settings notebook (see page 15
  2494.                for more details on modifying the settings for an icon).  Any
  2495.  
  2496.           ___________________________________________________________________
  2497.           Copyright 1992, JP Software Inc.       4OS2 Reference Manual  /  40
  2498.  
  2499.                                          CHAPTER 4 / CONFIGURATION AND TUNING
  2500.           ___________________________________________________________________
  2501.  
  2502.  
  2503.                modifications you make will apply only to that icon (and
  2504.                others created from it with the Copy option on the icon's
  2505.                popup menu).
  2506.  
  2507.                You can return any DOS setting for a VDM icon to its default
  2508.                value by selecting the setting and clicking on the Default
  2509.                button.  This replaces the value of the setting with the value
  2510.                that OS/2 read from CONFIG.SYS when you last booted, or with
  2511.                the value from OS/2's standard defaults.  Changes that you
  2512.                make in CONFIG.SYS will then be reflected in the setting for
  2513.                that icon each time you boot OS/2.  However once you modify a
  2514.                setting in a particular icon any link to the corresponding
  2515.                default value in CONFIG.SYS is removed, and further changes in
  2516.                CONFIG.SYS will not be reflected in the setting for that icon.
  2517.  
  2518.                The setting labeled DOS_SHELL determines what command
  2519.                processor OS/2 will load when the icon is used to start a
  2520.                session.  It is formatted just like the SHELL= line in
  2521.                CONFIG.SYS (but without the characters "SHELL=").  The
  2522.                DOS_SHELL setting should always include the COMSPEC path.  For
  2523.                example, you might set DOS_SHELL to:
  2524.  
  2525.                     c:\4dos\4dos.com c:\4dos
  2526.  
  2527.                Once you've set up CONFIG.SYS as described above and rebooted,
  2528.                any new VDM icons you create from the default Program template
  2529.                will automatically use 4DOS.  However, VDM icons which existed
  2530.                before you modified CONFIG.SYS may list COMMAND.COM in the
  2531.                DOS_SHELL setting.  To correct the setting so that 4DOS is
  2532.                used for these icons, modify DOS_SHELL in each icon to point
  2533.                to 4DOS, as shown in the example above, or select the Default
  2534.                button for DOS_SHELL after you have modified the SHELL= line
  2535.                in CONFIG.SYS and rebooted.
  2536.  
  2537.                Once you have the DOS settings correct, you can create a VDM
  2538.                icon that gives you a standard 4DOS prompt by simply placing a
  2539.                [*] in the Program Name field (on the Program page in the
  2540.                icon's Settings notebook).  This tells OS/2 to load the DOS
  2541.                command processor and go to a prompt instead of running a
  2542.                specific DOS application.  Then go back to the Session page
  2543.                and set the session type to DOS Full Screen or DOS Window.
  2544.                The session type should be set after the Program Name field is
  2545.                filled in.
  2546.  
  2547.                You may, of course, customize any icon with optional 4DOS
  2548.                command line switches, such as "@" followed by a custom INI
  2549.                file name, or "//" followed by an INI file command (see page
  2550.                108 of your 4DOS manual for more details).  These switches can
  2551.  
  2552.  
  2553.           ___________________________________________________________________
  2554.           Copyright 1992, JP Software Inc.       4OS2 Reference Manual  /  41
  2555.  
  2556.                                          CHAPTER 4 / CONFIGURATION AND TUNING
  2557.           ___________________________________________________________________
  2558.  
  2559.  
  2560.                be placed at the end of the DOS_SHELL setting, or in the
  2561.                Parameters field in the Program window.
  2562.  
  2563.                For example, your Program page might have the following
  2564.                settings for a standard 4DOS prompt, using a special INI file
  2565.                for this session:
  2566.  
  2567.                     Program Name:       *
  2568.                     Parameters:         @D:\4DOS\OS2VDM.INI
  2569.                     Working Directory:  C:\
  2570.  
  2571.                You can run any internal command, DOS application, batch file,
  2572.                or alias directly from a 4DOS VDM icon.  To do so, place the
  2573.                command to be executed as the last item in the Parameters
  2574.                field for the icon.  4DOS will execute the command and then
  2575.                display a prompt.  4DOS will execute the command after it
  2576.                processes your 4START file (if any) and AUTOEXEC.BAT.
  2577.  
  2578.                If you precede the command name with /C, 4DOS will exit and
  2579.                return to the OS/2 desktop when the command is finished.  This
  2580.                is a "temporary" VDM, described in more detail on page 44.
  2581.                You can also make 4DOS exit when the command is complete by
  2582.                invoking a batch file or alias which ends with the EXIT
  2583.                command.
  2584.  
  2585.                You can also run a DOS program by placing its name in the
  2586.                icon's Program Name field.  When you select the icon, OS/2
  2587.                will automatically run a temporary VDM to load 4DOS, execute
  2588.                the command, and then return to the OS/2 desktop.  To use this
  2589.                capability, you must include the full path name for the
  2590.                program.  For example:
  2591.  
  2592.                     Program Name:       E:\WORDPROC\WP.EXE
  2593.                     Parameters:         [blank]
  2594.                     Working Directory:  D:\LETTERS
  2595.  
  2596.  
  2597.                4DOS.INI for OS/2 Version 2.0 DOS Sessions
  2598.  
  2599.                Each time you start a DOS session, 4DOS will search for
  2600.                4DOS.INI in the directory where 4DOS.COM is stored, then in
  2601.                the root directory of that drive, and finally in the root
  2602.                directory of the boot drive.
  2603.  
  2604.                In most cases, the best strategy is to put 4DOS.INI in the
  2605.                same directory as 4DOS.COM and make sure your COMSPEC setting
  2606.                is correct as described above.  4DOS will use this 4DOS.INI
  2607.                file by default for all DOS sessions.
  2608.  
  2609.  
  2610.           ___________________________________________________________________
  2611.           Copyright 1992, JP Software Inc.       4OS2 Reference Manual  /  42
  2612.  
  2613.                                          CHAPTER 4 / CONFIGURATION AND TUNING
  2614.           ___________________________________________________________________
  2615.  
  2616.  
  2617.  
  2618.                To use a different INI file for sessions started from a
  2619.                particular icon, include an @ininame parameter on the
  2620.                DOS_SHELL setting for that icon.  Be sure to include the full
  2621.                path and name of the file.  To modify specific 4DOS.INI
  2622.                settings for sessions started from an icon, use one or more
  2623.                //iniline parameters on the DOS_SHELL setting for the icon.
  2624.                For icons with a [*] in the program name field, the @ininame
  2625.                or //iniline parameters may be placed at the beginning of the
  2626.                Parameters field if you wish, rather than in the DOS_SHELL
  2627.                setting.
  2628.  
  2629.                You can also use the @ininame parameter on your SHELL= line in
  2630.                the OS/2 CONFIG.SYS file to change the default location of
  2631.                4DOS.INI for all DOS sessions run under OS/2.  If you do so,
  2632.                remember that changes made in CONFIG.SYS will only affect
  2633.                icons created after your next reboot, and will not affect
  2634.                existing icons.
  2635.  
  2636.  
  2637.                Startup Files for OS/2 Version 2.0 DOS Sessions
  2638.  
  2639.                Each time you start a DOS session, 4DOS will search for 4START
  2640.                and 4EXIT in the directory where 4DOS.COM is stored, then in
  2641.                the root directory of the boot drive.  It will search for
  2642.                AUTOEXEC.BAT in the root directory of the OS/2 boot drive.
  2643.                Therefore, the same 4START, 4EXIT, and AUTOEXEC.BAT files will
  2644.                normally be used for all DOS sessions.  You can override these
  2645.                defaults with the 4StartPath and AutoExecPath directives in
  2646.                4DOS.INI.
  2647.  
  2648.                To select different 4START, 4EXIT, andAUTOEXEC.BAT files for a
  2649.                particular icon, place the files for that icon in a directory
  2650.                that is not one of the default directories described above.
  2651.                Then create a new 4DOS.INI file for that icon, using
  2652.                4StartPath and / or AutoExecPath directives to point to the
  2653.                new directory, or use a //4StartPath or //AutoExecPath
  2654.                directive in the DOS_SHELL setting or parameters field for the
  2655.                icon.
  2656.  
  2657.                To disable the default 4START, 4EXIT, or AUTOEXEC.BAT files
  2658.                for a particular icon without selecting alternate files, use
  2659.                the techniques described above to tell 4DOS to load these
  2660.                files from a directory where they do not exist.  All three
  2661.                files are optional, so if they do not exist in the directory
  2662.                specified by 4StartPath or AutoExecPath, they will not be
  2663.                executed.  If you wish, you can then execute an alternate
  2664.                startup batch file for that icon by placing its name in the
  2665.                Parameters field for the icon, as described on page 42.
  2666.  
  2667.           ___________________________________________________________________
  2668.           Copyright 1992, JP Software Inc.       4OS2 Reference Manual  /  43
  2669.  
  2670.                                          CHAPTER 4 / CONFIGURATION AND TUNING
  2671.           ___________________________________________________________________
  2672.  
  2673.  
  2674.  
  2675.                Remember that if your 4START and 4EXIT files have the
  2676.                extension .BTM, they may be executed by both 4DOS and 4OS2
  2677.                (see page 29).  If so, you may need to customize them for DOS
  2678.                mode and OS/2 mode.  You can use the internal variable %_DOS
  2679.                to separate commands for each operating system (see page 28
  2680.                for a detailed example).
  2681.  
  2682.  
  2683.                "Temporary" VDMs
  2684.  
  2685.                So far, we have discussed starting a VDM to run 4DOS and get
  2686.                to the DOS prompt.  OS/2 version 2.0 also lets you start a
  2687.                temporary VDM, for example to run a DOS application or batch
  2688.                file from an icon.  In a temporary VDM, 4DOS is still loaded
  2689.                as the primary shell even though it is being invoked to run
  2690.                just a single command or application.  This primary 4DOS shell
  2691.                is also a "transient" shell that exits (back to OS/2) when its
  2692.                job is done.  Temporary VDMs are created automatically by OS/2
  2693.                if you set up an icon with the Program Name set to the name of
  2694.                a DOS application.  You can also start them yourself by using
  2695.                a /C in the Parameters field for a standard 4DOS icon (see
  2696.                page 42).
  2697.  
  2698.                You usually won't want a temporary VDM to load all the memory-
  2699.                resident utilities and execute all the other commands that you
  2700.                want when you are setting up a DOS prompt.  Most often, you
  2701.                will want to set up a simple VDM, run the command, and exit as
  2702.                quickly as possible.  The 4DOS internal variable %_TRANSIENT
  2703.                makes it easy to do just that.  The beginning of your
  2704.                AUTOEXEC.BAT file could look like this:
  2705.  
  2706.                     iff %_transient == 1 then
  2707.                          call setpath
  2708.                          call aliases
  2709.                          quit
  2710.                     endiff
  2711.  
  2712.                This fragment calls other batch files to set up the path,
  2713.                aliases, and the environment, but it does not load TSRs.
  2714.  
  2715.  
  2716.                Configuring 4DOS for Dual Boot and Boot Manager
  2717.  
  2718.                When you install OS/2, you are given a choice of making it the
  2719.                only operating system on your computer, or retaining a DOS
  2720.                boot capability as well.
  2721.  
  2722.  
  2723.  
  2724.           ___________________________________________________________________
  2725.           Copyright 1992, JP Software Inc.       4OS2 Reference Manual  /  44
  2726.  
  2727.                                          CHAPTER 4 / CONFIGURATION AND TUNING
  2728.           ___________________________________________________________________
  2729.  
  2730.  
  2731.  
  2732.                If you retain a DOS boot capability, OS/2 offers two different
  2733.                methods for switching between DOS and OS/2:  Dual Boot (OS/2
  2734.                versions 1.x and 2.0) and Boot Manager (OS/2 version 2.0
  2735.                only).  The way you configure 4DOS to work with OS/2 depends
  2736.                partly on whether you retain a DOS boot capability on your
  2737.                computer, and, if so, which method you choose.
  2738.  
  2739.                Dual Boot is invoked with the BOOT command (the program
  2740.                BOOT.COM distributed with OS/2).  If you use Dual Boot, you
  2741.                will have one copy of CONFIG.SYS and AUTOEXEC.BAT available on
  2742.                your boot drive when you boot in DOS mode and another version
  2743.                available when you boot in OS/2 mode.  BOOT.COM works by
  2744.                swapping the DOS and OS/2 versions of CONFIG.SYS and
  2745.                AUTOEXEC.BAT, as well as other hidden system data, then
  2746.                rebooting the computer.
  2747.  
  2748.                The Boot Manager (included with OS/2 version 2.0 only) uses a
  2749.                different approach.  It lets you install DOS on one hard drive
  2750.                partition and OS/2 on another partition.  When you boot the
  2751.                computer, the Boot Manager displays a menu and lets you pick
  2752.                which operating system to boot.  Each partition will have its
  2753.                own versions of CONFIG.SYS and AUTOEXEC.BAT.
  2754.  
  2755.                The difference between these approaches is the location and
  2756.                availability of files.  If you use Dual Boot, all booting is
  2757.                from the same drive.  The CONFIG.SYS and AUTOEXEC.BAT files
  2758.                are switched back and forth as you boot from one operating
  2759.                system or the other;  the set of files that is in use is
  2760.                stored in the root directory of the boot drive, and the set
  2761.                not in use at any given time is stored in the \OS2\SYSTEM
  2762.                directory.  If you use the Boot Manager, the files for DOS
  2763.                reside on one drive (for example, C) and those for OS/2 are on
  2764.                another drive (for example, D).  The files are not moved when
  2765.                you switch operating systems.  In both cases, you can keep the
  2766.                startup files synchronized or independent to meet your own
  2767.                needs.
  2768.  
  2769.                Setting up CONFIG.SYS under these conditions is very simple.
  2770.                Modify your OS/2 CONFIG.SYS file for 4DOS and 4OS2 as
  2771.                described in this manual, and modify your DOS CONFIG.SYS file
  2772.                for 4DOS as described in the 4DOS manual.  The two files
  2773.                remain separate, and any changes to common items (for example
  2774.                the name of the directory where 4DOS is stored, used in the
  2775.                SHELL= command) must be made in both files.
  2776.  
  2777.                With AUTOEXEC.BAT, you have more flexibility.  Whether you use
  2778.                Dual Boot or Boot Manager, you will have two standard
  2779.  
  2780.  
  2781.           ___________________________________________________________________
  2782.           Copyright 1992, JP Software Inc.       4OS2 Reference Manual  /  45
  2783.  
  2784.                                          CHAPTER 4 / CONFIGURATION AND TUNING
  2785.           ___________________________________________________________________
  2786.  
  2787.  
  2788.                AUTOEXEC.BAT files:  one for starting 4DOS under a DOS boot
  2789.                and one for OS/2 DOS sessions.
  2790.  
  2791.                If you want very different commands in AUTOEXEC.BAT for a DOS
  2792.                boot and OS/2 DOS sessions, you can keep the two files
  2793.                separate and distinct.  Just make sure that both files are
  2794.                updated whenever you make changes to the commands they have in
  2795.                common.  You can also CALL other batch files from each copy of
  2796.                AUTOEXEC.BAT to handle common commands.
  2797.  
  2798.                However, you may find that many of the commands in the two
  2799.                AUTOEXEC.BAT files are the same and that it is more convenient
  2800.                to maintain a single file.
  2801.  
  2802.                If you use the Boot Manager, you can put all of your
  2803.                instructions in one file and start it from the other.  For
  2804.                example, if DOS boots from drive C: and OS/2 boots from drive
  2805.                D:, your AUTOEXEC.BAT on drive D: could simply be:
  2806.  
  2807.                     cdd c:\
  2808.                     autoexec.bat
  2809.  
  2810.                On a Dual Boot system, you could accomplish the same thing by
  2811.                putting all of your commands into a third file (for example,
  2812.                C:\SYSTART.BAT) and CALLing it from both the DOS and OS/2
  2813.                AUTOEXEC.BAT files.
  2814.  
  2815.                You can also use the AutoExecPath directive in 4DOS.INI to
  2816.                force 4DOS to look in a particular directory for AUTOEXEC.BAT
  2817.                regardless of whether it is started from an OS/2 DOS session
  2818.                or from a DOS boot, and regardless of the boot drive.
  2819.  
  2820.                If you keep commands for both boot modes in a single
  2821.                AUTOEXEC.BAT file, you can use the internal variable %_DOSVER
  2822.                to separate commands to be executed during a DOS boot from
  2823.                those for an OS/2 DOS session (see page 28 for a detailed
  2824.                example).
  2825.  
  2826.                Handling 4DOS's startup and exit files (4DOS.INI, 4START, and
  2827.                4EXIT) is a little different.  Unlike CONFIG.SYS and
  2828.                AUTOEXEC.BAT, the 4DOS files won't be swapped for you when you
  2829.                switch operating systems with Dual Boot, and they won't be
  2830.                automatically stored on separate partitions if you use the
  2831.                Boot Manager.  4DOS normally looks for these files in the
  2832.                directory where 4DOS.COM is stored, so the same files will be
  2833.                used for both a DOS boot and OS/2 DOS sessions.  If you want
  2834.                separate files for these different situations, you must use
  2835.                4DOS features to set them up.
  2836.  
  2837.  
  2838.           ___________________________________________________________________
  2839.           Copyright 1992, JP Software Inc.       4OS2 Reference Manual  /  46
  2840.  
  2841.                                          CHAPTER 4 / CONFIGURATION AND TUNING
  2842.           ___________________________________________________________________
  2843.  
  2844.  
  2845.  
  2846.                To set up separate 4DOS.INI files for a DOS boot and OS/2 DOS
  2847.                sessions, use the @ininame parameter on the SHELL= line in
  2848.                your OS/2 CONFIG.SYS file to change the location of 4DOS.INI
  2849.                for DOS sessions run under OS/2.  You can do the same for a
  2850.                DOS boot by making a similar change to your DOS CONFIG.SYS
  2851.                file.
  2852.  
  2853.                To select different 4START and 4EXIT files for a DOS boot and
  2854.                for OS/2 DOS sessions, place the files for one type of boot in
  2855.                a different directory (not the directory where 4DOS.COM is
  2856.                stored).  Then either set up a different 4DOS.INI file for
  2857.                that boot mode as described above, using 4StartPath to point
  2858.                to the new directory, or use a //4StartPath directive on the
  2859.                SHELL= line in CONFIG.SYS for that boot mode.
  2860.  
  2861.                You can also keep commands for both boot modes in a single
  2862.                file, and use %_DOSVER to separate the commands to be executed
  2863.                during a DOS boot from those for an OS/2 DOS session.
  2864.  
  2865.                Remember that if your 4START and 4EXIT files have the
  2866.                extension .BTM, they may be executed not only in different
  2867.                boot modes, but also by both 4DOS and 4OS2 (see page 29).  If
  2868.                so, you may need to customize them for DOS mode and OS/2 mode.
  2869.                You can use the internal variable %_DOS to separate commands
  2870.                for each operating system (see page 28 for a detailed
  2871.                example).
  2872.  
  2873.  
  2874.  
  2875.  
  2876.  
  2877.  
  2878.  
  2879.  
  2880.  
  2881.  
  2882.  
  2883.  
  2884.  
  2885.  
  2886.  
  2887.  
  2888.  
  2889.  
  2890.  
  2891.  
  2892.  
  2893.  
  2894.  
  2895.           ___________________________________________________________________
  2896.           Copyright 1992, JP Software Inc.       4OS2 Reference Manual  /  47
  2897.  
  2898.                                           CHAPTER 5 / COMMAND REFERENCE GUIDE
  2899.           ___________________________________________________________________
  2900.  
  2901.  
  2902.  
  2903.           CHAPTER 5 / COMMAND REFERENCE GUIDE
  2904.  
  2905.  
  2906.           This chapter provides information about commands that are new in
  2907.           4OS2, and commands which differ from 4DOS.  For a complete
  2908.           reference to 4DOS and 4OS2 commands see Chapter 8 (page 157) in the
  2909.           4DOS Reference Manual.
  2910.  
  2911.           The following commands are unique to 4OS2:
  2912.  
  2913.                DETACH starts an OS/2 program in detached mode.
  2914.  
  2915.                DPATH sets the search path for data files.
  2916.  
  2917.                KEYS  enables, disables, or displays the history list.
  2918.  
  2919.                START starts a program in a new session.
  2920.  
  2921.           The following commands have different options in 4OS2 than they do
  2922.           in 4DOS:
  2923.  
  2924.                DIR can display directories in either the high performance
  2925.                file system (HPFS) or traditional DOS-compatible FAT format.
  2926.  
  2927.                ESET, SET, and UNSET do not have a /M(aster environment)
  2928.                option in 4OS2.
  2929.  
  2930.                HELP can display explanations of OS/2 system error messages
  2931.                and can automatically change the 4OS2 prompt.
  2932.  
  2933.                SETDOS does not have the ANSI and Line Input options that are
  2934.                available in 4DOS.
  2935.  
  2936.           The new commands and the changes to DIR, HELP, and SETDOS are
  2937.           described in detail on the following pages.
  2938.  
  2939.           The following 4DOS commands are not available in 4OS2, because they
  2940.           perform functions that are not meaningful and/or feasible under
  2941.           OS/2:
  2942.  
  2943.                BREAK                      LOADHIGH / LH
  2944.  
  2945.                CTTY                       SWAPPING
  2946.  
  2947.                KEYSTACK                   TRUENAME
  2948.  
  2949.  
  2950.  
  2951.  
  2952.           ___________________________________________________________________
  2953.           Copyright 1992, JP Software Inc.       4OS2 Reference Manual  /  48
  2954.  
  2955.                                  CHAPTER 5 / COMMAND REFERENCE GUIDE / DETACH
  2956.           ___________________________________________________________________
  2957.  
  2958.  
  2959.           DETACH                                                 (Compatible)
  2960.  
  2961.           Purpose:    Start an OS/2 program in detached mode.
  2962.  
  2963.           Format:     DETACH command
  2964.  
  2965.                       command: the name of a command to execute, including
  2966.                       an optional drive and path specification.  The name
  2967.                       must be enclosed in quotation marks if it contains a
  2968.                       space.
  2969.  
  2970.                       See also: START
  2971.  
  2972.           Usage:      When you start a program with DETACH, that program
  2973.                       cannot use the keyboard, mouse, or video display.  It
  2974.                       is "detached" from the normal means of user input and
  2975.                       output.  However, you can redirect the program's
  2976.                       standard I/O to other devices if necessary, using the
  2977.                       4OS2 redirection symbols.
  2978.  
  2979.                       The command can be an internal command, external
  2980.                       command, alias, or batch file.  If you specify an
  2981.                       internal command, alias, or batch file (either a .CMD
  2982.                       or .BTM file) as the command, 4OS2 will detach a copy
  2983.                       of itself to execute the command.
  2984.  
  2985.                       For example, the following command will detach a copy
  2986.                       of 4OS2 to run the batch file XYZ.BTM:
  2987.  
  2988.                            [c:\] detach xyz.btm
  2989.  
  2990.                       Once the program has started, 4OS2 returns to the
  2991.                       prompt immediately.  It does not wait for a detached
  2992.                       program to finish.
  2993.  
  2994.  
  2995.  
  2996.  
  2997.  
  2998.  
  2999.  
  3000.  
  3001.  
  3002.  
  3003.  
  3004.  
  3005.  
  3006.  
  3007.  
  3008.  
  3009.           ___________________________________________________________________
  3010.           Copyright 1992, JP Software Inc.       4OS2 Reference Manual  /  49
  3011.  
  3012.                                     CHAPTER 5 / COMMAND REFERENCE GUIDE / DIR
  3013.           ___________________________________________________________________
  3014.  
  3015.  
  3016.           DIR                                                      (Enhanced)
  3017.                  [see page 198 of the 4DOS Reference Manual]
  3018.  
  3019.           Purpose:    Display information about files and subdirectories.
  3020.  
  3021.           Format:     DIR [/1 /2 /4 /A[[:][-]rhsda] /B /C /F /J /K /L /M /N
  3022.                            /O[[:][-]deginsu] /P /S /T /U /V /W /Z] [file...]
  3023.  
  3024.                       file:  The file, directory, or list of files or
  3025.                       directories to display.
  3026.  
  3027.                       /1 (one column)             /M (suppress footer)
  3028.                       /2 (two columns)            /N (use HPFS format)
  3029.                       /4 (four columns)           /O (sort order )
  3030.                       /A(ttribute select)         /P(ause)
  3031.                       /B(are)                     /S(ubdirectories)
  3032.                       /C(ase -- use upper case)   /T (aTtribute display)
  3033.                       /F(ull path)                /U (sUmmary information)
  3034.                       /J(ustify names)            /V(ertical)
  3035.                       /K (suppress header)        /W(ide)
  3036.                       /L(ower case)               /Z (use FAT format)
  3037.  
  3038.           Usage:      The DIR command is the same in 4OS2 and 4DOS, except
  3039.                       that the /N option has a new meaning and the /Z option
  3040.                       has been added.  The 4DOS /N option, which resets DIR
  3041.                       to default values, has no equivalent in 4OS2.
  3042.  
  3043.           Options:    /N:  Display the directory in OS/2 high performance
  3044.                       file system (HPFS) format.
  3045.  
  3046.                       /Z:  Display the directory in DOS-compatible FAT
  3047.                       format.  Long names on an HPFS drive will be truncated
  3048.                       to 11 characters.  The name will be followed by a
  3049.                       solid right arrow symbol [a] to show that one or more
  3050.                       characters have been truncated.
  3051.  
  3052.  
  3053.  
  3054.  
  3055.  
  3056.  
  3057.  
  3058.  
  3059.  
  3060.  
  3061.  
  3062.  
  3063.  
  3064.  
  3065.  
  3066.           ___________________________________________________________________
  3067.           Copyright 1992, JP Software Inc.       4OS2 Reference Manual  /  50
  3068.  
  3069.                                   CHAPTER 5 / COMMAND REFERENCE GUIDE / DPATH
  3070.           ___________________________________________________________________
  3071.  
  3072.  
  3073.           DPATH                                                  (Compatible)
  3074.  
  3075.           Purpose:    Specify the subdirectories which applications will
  3076.                       search to find files that are not in the current
  3077.                       directory.
  3078.  
  3079.           Format:     DPATH [directory[;directory...]]
  3080.  
  3081.                       directory:  The full name of a directory to include in
  3082.                       the DPATH (data path) setting.
  3083.  
  3084.                       See also: PATH, SET, and ESET in the 4DOS Reference
  3085.                       Manual.
  3086.  
  3087.           Usage:      When most OS/2 applications try to open a data file,
  3088.                       they look for the file in the current directory first.
  3089.                       If they fail to find the file there, they search each
  3090.                       of the directories in the DPATH setting in the order
  3091.                       that they are included.  4OS2 internal commands like
  3092.                       TYPE do not search the DPATH directories for files.
  3093.  
  3094.                       For example, the following DPATH command directs
  3095.                       applications to look for files in the following order:
  3096.                       the current directory, the INIT directory on C, and
  3097.                       the CONFIG directory on D:
  3098.  
  3099.                            [c:\] dpath c:\init;d:\config
  3100.  
  3101.                       The listing of directories to be searched can be set
  3102.                       or viewed with the DPATH command.  The list is stored
  3103.                       as an environment string with the variable name DPATH,
  3104.                       and can also be set or viewed with the SET command and
  3105.                       edited with the ESET command.
  3106.  
  3107.                       Directory names in the DPATH must be separated with
  3108.                       semicolons [;].  4OS2 will not shift directory names
  3109.                       in the DPATH to upper case as it does with those in
  3110.                       the PATH setting.  If you want the names in the DPATH
  3111.                       to be in upper case you must enter them that way.
  3112.  
  3113.                       If you enter DPATH with no parameters, 4OS2 displays
  3114.                       the current DPATH search list.
  3115.  
  3116.  
  3117.  
  3118.  
  3119.  
  3120.  
  3121.  
  3122.  
  3123.           ___________________________________________________________________
  3124.           Copyright 1992, JP Software Inc.       4OS2 Reference Manual  /  51
  3125.  
  3126.                                    CHAPTER 5 / COMMAND REFERENCE GUIDE / HELP
  3127.           ___________________________________________________________________
  3128.  
  3129.  
  3130.           HELP                                                     (Enhanced)
  3131.  
  3132.           Purpose     Display help for 4OS2 commands and OS/2 system
  3133.                       messages.
  3134.  
  3135.           Format:     HELP [topic] [ON | OFF]
  3136.  
  3137.                       topic:  A help topic, 4OS2 internal command, or OS/2
  3138.                       error number.
  3139.  
  3140.           Usage:      HELP works the same in 4OS2 as in 4DOS but has some
  3141.                       additional features.
  3142.  
  3143.                       When you start HELP, the text you see depends on the
  3144.                       help "books" that 4OS2 opens.  The list of books is
  3145.                       determined by the HelpBook directive in 4OS2.INI (see
  3146.                       pages 35 and 36 for more information).  The topic may
  3147.                       be from any book in the HelpBook list.
  3148.  
  3149.                       If you type either of these commands:
  3150.  
  3151.                            [c:\] help nnnn
  3152.                            [c:\] help sysnnnn
  3153.  
  3154.                       where "nnnn" is an OS/2 system error number, HELP will
  3155.                       display an explanation of the OS/2 error.  This
  3156.                       feature works by running the OS/2 program HELPMSG.EXE
  3157.                       which opens the file OSO001.H to get the explanation.
  3158.                       For this feature to work, HELPMSG.EXE must be in a
  3159.                       directory that is in your PATH setting and the data
  3160.                       file OSO001H.MSG must be in a directory in your DPATH.
  3161.  
  3162.                       If you type
  3163.  
  3164.                            [c:\] help on
  3165.  
  3166.                       4OS2 will change the default prompt to $i[$p].  If you
  3167.                       type
  3168.  
  3169.                            [c:\] help off
  3170.  
  3171.                       then 4OS2 will change the default prompt to [$p].
  3172.                       This feature is included for compatibility with OS/2's
  3173.                       CMD.EXE.  Changing the prompt is probably better
  3174.                       accomplished by using the PROMPT command instead of
  3175.                       HELP ON or HELP OFF.
  3176.  
  3177.  
  3178.  
  3179.  
  3180.           ___________________________________________________________________
  3181.           Copyright 1992, JP Software Inc.       4OS2 Reference Manual  /  52
  3182.  
  3183.                                    CHAPTER 5 / COMMAND REFERENCE GUIDE / KEYS
  3184.           ___________________________________________________________________
  3185.  
  3186.  
  3187.           KEYS                                                   (Compatible)
  3188.  
  3189.           Purpose:    Enable, disable, or display the history list.
  3190.  
  3191.           Format:     KEYS [ON | OFF | LIST]
  3192.  
  3193.                       See also: HISTORY in the 4DOS Reference Manual.
  3194.  
  3195.           Usage:      This command emulates the CMD.EXE KEYS command, which
  3196.                       controls the history list.  It is provided for
  3197.                       compatibility with CMD.EXE.  The same functions are
  3198.                       available by setting the HistMin directive in 4OS2.INI
  3199.                       and by using the HISTORY command in 4OS2.
  3200.  
  3201.                       The history list collects the commands you type for
  3202.                       later recall, editing, and viewing.  You can view the
  3203.                       contents of the list through the history list window
  3204.                       (see page 59 in the 4DOS Reference Manual) or by
  3205.                       typing any of the following commands:
  3206.  
  3207.                            [c:\] history
  3208.                            [c:\] history /p
  3209.                            [c:\] keys list
  3210.  
  3211.                       The first command displays the entire history list.
  3212.                       The second displays the entire list and pauses at the
  3213.                       end of each full screen.  The third command produces
  3214.                       the same output as the first, except that each line is
  3215.                       numbered.
  3216.  
  3217.                       You can disable the collection and storage of commands
  3218.                       in the history list by typing
  3219.  
  3220.                            [c:\] keys off
  3221.  
  3222.                       Once the history has been turned off, you can turn it
  3223.                       back on by typing
  3224.  
  3225.                            [c:\] keys on
  3226.  
  3227.                       If you issue the KEYS command without any parameters,
  3228.                       4OS2 will show you the current status of the history
  3229.                       list.
  3230.  
  3231.                       See page 21 for more information about how the history
  3232.                       list is stored.
  3233.  
  3234.  
  3235.  
  3236.  
  3237.           ___________________________________________________________________
  3238.           Copyright 1992, JP Software Inc.       4OS2 Reference Manual  /  53
  3239.  
  3240.                                  CHAPTER 5 / COMMAND REFERENCE GUIDE / SETDOS
  3241.           ___________________________________________________________________
  3242.  
  3243.  
  3244.           SETDOS                                                        (New)
  3245.                  [see page 280 of the 4DOS Reference Manual]
  3246.  
  3247.           Purpose:    Display or set the 4OS2 configuration.
  3248.  
  3249.           Format:     SETDOS [/C? /E? /I+|- command /M? /N? /P? /R? /S?:?
  3250.                            /U? /V?]
  3251.  
  3252.                       /C(ompound)                 /P(arameter character)
  3253.                       /E(scape character)         /R(ows)
  3254.                       /I(nternal commands)        /S(hape of cursor)
  3255.                       /M(ode for editing)         /U(pper case)
  3256.                       /N(o clobber)               /V(erbose)
  3257.  
  3258.           Usage:      The SETDOS command is the same in 4OS2 as it is in
  3259.                       4DOS, except that two of the optional parameters are
  3260.                       not available in 4OS2 and their values are not
  3261.                       reported.
  3262.  
  3263.                       The /A(NSI) option and the ANSI directive in 4OS2.INI
  3264.                       are not available because 4OS2 enables ANSI support
  3265.                       and assumes that it remains enabled.  You can turn off
  3266.                       ANSI support with OS/2's external ANSI command
  3267.                       (ANSI.EXE).  If you do, however, 4OS2 will not notice
  3268.                       the change and will display unusual characters or
  3269.                       ignore colors in your CLS and COLOR commands.  The
  3270.                       4OS2 internal variable %_ANSI reflects the state of
  3271.                       OS/2 established with ANSI.EXE.
  3272.  
  3273.                       The /L(ine) option and the LineInput directive in
  3274.                       4OS2.INI are not available because the "line input"
  3275.                       capability is not required for compatibility with OS/2
  3276.                       applications, as it may be under DOS.
  3277.  
  3278.                       In all other respects, the commands are the same.  See
  3279.                       the 4DOS Reference Manual for a full description of
  3280.                       SETDOS.
  3281.  
  3282.  
  3283.  
  3284.  
  3285.  
  3286.  
  3287.  
  3288.  
  3289.  
  3290.  
  3291.  
  3292.  
  3293.  
  3294.           ___________________________________________________________________
  3295.           Copyright 1992, JP Software Inc.       4OS2 Reference Manual  /  54
  3296.  
  3297.                                   CHAPTER 5 / COMMAND REFERENCE GUIDE / START
  3298.           ___________________________________________________________________
  3299.  
  3300.  
  3301.           START                                                    (Enhanced)
  3302.  
  3303.           Purpose:    Start a program in another session.
  3304.  
  3305.           Format:     START ["program title"] [/B[G] /DOS /C /F[G] /FS /I
  3306.                       /ICON=filename /INV /K /L /LA /LH /MAX /MIN /N
  3307.                       /PGM progname /PM /POS=row,col,width,height /WIN
  3308.                       /WAIT] [command]
  3309.  
  3310.                       program title:  Title to appear on title bar.
  3311.                       filename:  Name of icon (.ICO) file.
  3312.                       progname:  Program name (not the session name).
  3313.                       command:  Command to be executed.
  3314.  
  3315.                       /B[G] (background)          /LA (local aliases)
  3316.                       /DOS (DOS session)          /LH (local history list
  3317.                       /C(lose when done)          /MAX(imized)
  3318.                       /F[G] (foreground)          /MIN(imized)
  3319.                       /FS (full screen)           /N(o command processor)
  3320.                       /I(nherit environment)      /PGM (program name)
  3321.                       /ICON (name .ICO file)      /PM (PM application)
  3322.                       /INV(isible)                /POS(ition of window)
  3323.                       /K(eep when done)           /WAIT for completion
  3324.                       /L(ocal lists)              /WIN(dowed session)
  3325.  
  3326.                       See also: DETACH in this manual.
  3327.  
  3328.           Usage:      START is used to begin a new session and, optionally,
  3329.                       to run a program in that session.  If you use START
  3330.                       with no parameters, it will begin a new 4OS2 session.
  3331.                       If you add a command, START will begin a new session
  3332.                       and execute the command that you have specified.
  3333.  
  3334.                       START determines the application type automatically
  3335.                       and starts the session in the appropriate mode (OS/2
  3336.                       or DOS; full-screen, windowed, or Presentation
  3337.                       Manager).
  3338.  
  3339.                       If the program is a DOS application or .BAT file, 4OS2
  3340.                       will return an error message in OS/2 version 1.x.  In
  3341.                       OS/2 version 2.0, 4OS2 will start a new DOS session to
  3342.                       run the program or batch file.  The DOS session will
  3343.                       close itself automatically as soon as the program or
  3344.                       batch file ends.  If you want the session to wait for
  3345.                       a keystroke before it closes itself, you can use the
  3346.                       syntax:
  3347.  
  3348.                            [c:\] start /DOS progname ^^ pause
  3349.  
  3350.  
  3351.           ___________________________________________________________________
  3352.           Copyright 1992, JP Software Inc.       4OS2 Reference Manual  /  55
  3353.  
  3354.                                   CHAPTER 5 / COMMAND REFERENCE GUIDE / START
  3355.           ___________________________________________________________________
  3356.  
  3357.  
  3358.  
  3359.                       (Because the caret [^] is the 4OS2 escape character,
  3360.                       two carets must be used in order to pass one on to
  3361.                       4DOS as a command separator.)
  3362.  
  3363.                       If you want to start a DOS command-line session in
  3364.                       OS/2 version 2.0, you can use the command:
  3365.  
  3366.                            [c:\] start /DOS
  3367.  
  3368.                       DOS sessions created with START use the default DOS
  3369.                       settings in CONFIG.SYS.  You cannot change the DOS
  3370.                       settings for these sessions individually the way you
  3371.                       can for sessions started from an icon.
  3372.  
  3373.                       START gives you some flexibility in determining the
  3374.                       session mode.  For example, if the command is the name
  3375.                       of a batch file (either a .BTM or .CMD file), you can
  3376.                       use the /FS or /WIN options to run the batch file as
  3377.                       part of a new 4OS2 session in either full-screen or
  3378.                       windowed mode.
  3379.  
  3380.                       However, you cannot start a session in a mode that is
  3381.                       inappropriate for the application type.  A DOS
  3382.                       application can not be run as part of a Presentation
  3383.                       Manager session, for example, even if you use the /PM
  3384.                       switch.  Invalid or conflicting options will be
  3385.                       ignored.  4OS2 will always attempt to run the command
  3386.                       in the appropriate type of session.
  3387.  
  3388.                       The list below summarizes the most commonly used START
  3389.                       options, and how you can use them to control the way a
  3390.                       session is started:
  3391.  
  3392.                            /BG and /FG allow you to start the session in the
  3393.                            background (does not respond to keystrokes until
  3394.                            selected) or foreground (responds to keystrokes
  3395.                            until deselected).  /FG is the default if /DOS,
  3396.                            /FS, /WIN, or /PM is used, otherwise /BG is the
  3397.                            default.
  3398.  
  3399.                            /FS and /WIN control whether a character-mode
  3400.                            session is started in full-screen or windowed
  3401.                            mode.  The default is to start a session of the
  3402.                            same type as the current 4OS2 session, if the
  3403.                            application can be run in such a session.
  3404.  
  3405.                            /MAX,  /MIN, and /POS allow you to start a
  3406.                            character-mode windowed session in a maximized
  3407.  
  3408.           ___________________________________________________________________
  3409.           Copyright 1992, JP Software Inc.       4OS2 Reference Manual  /  56
  3410.  
  3411.                                   CHAPTER 5 / COMMAND REFERENCE GUIDE / START
  3412.           ___________________________________________________________________
  3413.  
  3414.  
  3415.                            window, a minimized window, or a window with a
  3416.                            specified position and size.  The default is to
  3417.                            allow OS/2 to choose the position and size of the
  3418.                            window.
  3419.  
  3420.                            /C and /K allow you to close the session when the
  3421.                            command is finished (the default for DOS and PM
  3422.                            sessions) or keep it open and go to a prompt (the
  3423.                            default for OS/2 character mode sessions).
  3424.  
  3425.                       The program title, if it is included, will appear on
  3426.                       the title bar and the Presentation Manager task list
  3427.                       (OS/2 version 1.x) or window list (OS/2 version 2.0).
  3428.                       The program title must be enclosed in quotation marks
  3429.                       and cannot exceed 60 characters in length.  If the
  3430.                       program title is omitted, the program name will be
  3431.                       used as the session title and on the task list.
  3432.  
  3433.           Options:    /BG (BackGround session):  The session is started as a
  3434.                       background session.  /BG may be abbreviated to /B.
  3435.  
  3436.                       /C(lose):  The session is started using 4OS2.EXE and
  3437.                       is closed when the application ends.
  3438.  
  3439.                       /DOS (DOS session):  Start a DOS session in a Virtual
  3440.                       DOS Machine (OS/2 version 2.0).  This option is not
  3441.                       available in OS/2 version 1.x, which doesn't allow
  3442.                       multiple DOS sessions.
  3443.  
  3444.                       /FG (ForeGround session):  Start the session as the
  3445.                       foreground session.  /FG may be abbreviated to /F.
  3446.  
  3447.                       /FS (Full Screen):  Start the session as a full-screen
  3448.                       session.
  3449.  
  3450.                       /I(nherit environment):  Inherit the default
  3451.                       environment specified in CONFIG.SYS rather than the
  3452.                       current 4OS2.EXE environment.
  3453.  
  3454.                       /ICON=filename:  Use the specified icon file.  If you
  3455.                       don't use /ICON, 4OS2 will look for an .ICO file with
  3456.                       the same file name and in the same directory as the
  3457.                       program file.
  3458.  
  3459.                       /INV(isible):  Start the session as invisible.  No
  3460.                       icon will appear and the session will only be
  3461.                       accessible through the Task Manager or Window List.
  3462.  
  3463.  
  3464.  
  3465.           ___________________________________________________________________
  3466.           Copyright 1992, JP Software Inc.       4OS2 Reference Manual  /  57
  3467.  
  3468.                                   CHAPTER 5 / COMMAND REFERENCE GUIDE / START
  3469.           ___________________________________________________________________
  3470.  
  3471.  
  3472.  
  3473.                       /K(eep session at end):  The session is run using
  3474.                       4OS2.EXE, and continues after the application program
  3475.                       ends.  Use the EXIT command to end the session.
  3476.  
  3477.                       /L(ocal lists):  Start 4OS2.EXE with local alias and
  3478.                       history lists.  This option combines the effects of
  3479.                       /LA and /LH.
  3480.  
  3481.                       /LA (Local Alias list):  Start 4OS2.EXE with a local
  3482.                       alias list.  If you don't use this option, the session
  3483.                       will share the alias list of the current 4OS2 shell,
  3484.                       unless a LocalAliases=No directive is used in 4OS2.INI
  3485.                       or on the command line.
  3486.  
  3487.                       /LH (Local History list):  Start 4OS2.EXE with a local
  3488.                       history list.  If you don't use this option, the
  3489.                       session will share the history list of the current
  3490.                       4OS2 shell, unless a LocalHistory=No directive is used
  3491.                       in 4OS2.INI or on the command line.
  3492.  
  3493.                       /MAX(imized):  Start the session maximized.
  3494.  
  3495.                       /MIN(imized):  Start the session minimized.
  3496.  
  3497.                       /N(o command processor):  Run an OS/2 application
  3498.                       directly, without loading another copy of 4OS2.  This
  3499.                       is the default for Presentation Manager applications.
  3500.                       You cannot use /N when the command is a batch file or
  3501.                       internal command.
  3502.  
  3503.                       /PGM (ProGraM name):  The string following this option
  3504.                       is the program name.  The first quoted string on the
  3505.                       line will be used as the session and task list title
  3506.                       only, and not as the program name.
  3507.  
  3508.                       /PM (Presentation Manager):  Start a PM session.
  3509.  
  3510.                       /POS(ition):  Start the window at the specified screen
  3511.                       position.  The full syntax is /POS=row, col, width,
  3512.                       height where the values are specified in pels.  Row
  3513.                       and col are the bottom left corner of the window (the
  3514.                       bottom left corner of the screen is position 0,0).
  3515.  
  3516.  
  3517.  
  3518.  
  3519.  
  3520.  
  3521.  
  3522.           ___________________________________________________________________
  3523.           Copyright 1992, JP Software Inc.       4OS2 Reference Manual  /  58
  3524.  
  3525.                                   CHAPTER 5 / COMMAND REFERENCE GUIDE / START
  3526.           ___________________________________________________________________
  3527.  
  3528.  
  3529.  
  3530.                       /WAIT:  Wait for the session to finish before
  3531.                       returning to the prompt.  This is similar to running a
  3532.                       program directly from the prompt (without START), but
  3533.                       allows you to use options like /MAX or /POS, which are
  3534.                       not available when a program is run directly.
  3535.  
  3536.                       /WIN(dowed):  Start the session in a window.
  3537.  
  3538.  
  3539.  
  3540.  
  3541.  
  3542.  
  3543.  
  3544.  
  3545.  
  3546.  
  3547.  
  3548.  
  3549.  
  3550.  
  3551.  
  3552.  
  3553.  
  3554.  
  3555.  
  3556.  
  3557.  
  3558.  
  3559.  
  3560.  
  3561.  
  3562.  
  3563.  
  3564.  
  3565.  
  3566.  
  3567.  
  3568.  
  3569.  
  3570.  
  3571.  
  3572.  
  3573.  
  3574.  
  3575.  
  3576.  
  3577.  
  3578.  
  3579.           ___________________________________________________________________
  3580.           Copyright 1992, JP Software Inc.       4OS2 Reference Manual  /  59
  3581.