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