home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: OtherApp / OtherApp.zip / 4os2251.zip / 4OS2.INF (.txt) < prev    next >
OS/2 Help File  |  1995-08-22  |  369KB  |  11,561 lines

  1.  
  2. ΓòÉΓòÉΓòÉ 1. About 4OS2 Help ΓòÉΓòÉΓòÉ
  3.  
  4.                               4OS2 2.5 Help System
  5.  
  6.                 Text by Hardin Brothers, Tom Rawson, and Rex Conn
  7.  
  8. Program and Text Copyright 1988 - 1995, JP Software Inc., All Rights Reserved. 
  9.  
  10. 4OS2 is a trademark and 4DOS is a registered trademark of JP Software Inc. 
  11. OS/2 is a registered trademark of IBM Corporation.  Other product and company 
  12. names are trademarks of their respective owners. 
  13.  
  14. [2.51.043 - 8/95] 
  15.  
  16.  
  17. ΓòÉΓòÉΓòÉ 2. Using the 4OS2 Help System ΓòÉΓòÉΓòÉ
  18.  
  19. This online help system for 4OS2 covers all 4OS2 features and internal 
  20. commands.  It includes reference information to assist you in using 4OS2 and 
  21. developing batch files; however it does not include all of the details which 
  22. are included in the printed 4OS2 manuals. 
  23.  
  24. If you type part or all of a command on the line and then press F1, the help 
  25. system will provide "context-sensitive" help by using the first word on the 
  26. line as a help topic.  If it's a valid topic, you will see help for that topic 
  27. automatically; if not, you will see the list of all help topics and you can 
  28. pick the one you want. 
  29.  
  30. You can use this feature to obtain help on any topic -- not just on commands. 
  31. For example, if you enter the command HELP _DISK you will see help for the 
  32. _DISK internal variable. 
  33.  
  34. If you type the name of any internal command at the prompt, followed by a slash 
  35. and a question mark [/?] like this: 
  36.  
  37.         copy /?
  38.  
  39. then you will see help for the command in a "quick-reference" style.  Output 
  40. from a /? display may be redirected with > or >>. 
  41.  
  42. The /? option may not work correctly if you have used an alias to redefine how 
  43. an internal command operates.  To view the /? help for such a command you must 
  44. add an asterisk to the beginning of the command to disable alias processing. 
  45. For example, if you have defined this alias: 
  46.  
  47.         alias copy *copy /r
  48.  
  49. then the command COPY /? will be translated to COPY /R /?, which will not work 
  50. properly.  However, if you use *COPY /?, the alias will be ignored and the /? 
  51. will work as you intended. 
  52.  
  53. The 4OS2 help system uses OS/2's VIEW.EXE to display this help text. Once 
  54. you've started the help system with HELP or F1, you can use VIEW's standard 
  55. keystrokes to navigate.  For more information, click on the Help menu at the 
  56. top of the VIEW window. 
  57.  
  58. Configuring the Help System 
  59.  
  60. You can select which help "books" are displayed when you press the F1 key or 
  61. enter the HELP command.  A help book is a single .INF file.  This help text is 
  62. in the file 4OS2.INF. 
  63.  
  64. By default, 4OS2 opens this book and the OS/2 command reference file, 
  65. CMDREF.INF.  You can change the default books opened for the 4OS2 help system 
  66. with the HelpBook directive in 4OS2.INI.  The default setting is 4OS2+CMDREF. 
  67. For example, to load only the 4OS2 help when you press F1 or enter the HELP 
  68. command: 
  69.  
  70.         HelpBook = 4OS2
  71.  
  72.  
  73. ΓòÉΓòÉΓòÉ 3. Conventions ΓòÉΓòÉΓòÉ
  74.  
  75. This section contains information about conventions that are used throughout 
  76. 4OS2: 
  77.  
  78.             Colors and color names 
  79.             Color-coded directories 
  80.             Keys and key names 
  81.  
  82.  These topics are combined here in a central reference spot so that they will 
  83.  be easy to find when you need to refer to them.  You will find cross 
  84.  references to this section throughout the help system. 
  85.  
  86.  
  87. ΓòÉΓòÉΓòÉ 3.1. Colors and Color Names ΓòÉΓòÉΓòÉ
  88.  
  89. You can use color names in several of the directives in the .INI file and in 
  90. many commands.  The general form of a color name is: 
  91.  
  92.     [BRIght] [BLInk] fg ON [BRIght] bg [BORder bc ] 
  93.  
  94. where fg is the foreground or text color, bg is the background color, and bc is 
  95. the border color. 
  96.  
  97. The available colors are: 
  98.  
  99.         Black           Blue            Green           Red
  100.         Magenta         Cyan            Yellow          White
  101.  
  102. Color names and the words BRIght, BLInk, and BORder may be shortened to the 
  103. first 3 letters. 
  104.  
  105. You can also specify colors by number instead of by name.  The numbers are most 
  106. useful in potentially long INI file directives like ColorDir. The following 
  107. numbers are recognized: 
  108.  
  109.   0 - Black     8 - Gray (bright black)
  110.   1 - Blue      9 - Bright blue
  111.   2 - Green    10 - Bright green
  112.   3 - Cyan     11 - Bright cyan
  113.   4 - Red      12 - Bright red
  114.   5 - Magenta  13 - Bright magenta
  115.   6 - Yellow   14 - Bright yellow
  116.   7 - White    15 - Bright white
  117.  
  118. Use one number to substitute for the [BRIght] fg portion of the color name, and 
  119. a second to substitute for the [BRIght] bg portion.  For example, instead of 
  120. bright cyan on blue you could use 11 on 1 to save space in a ColorDir 
  121. specification. 
  122.  
  123. There are several subtleties that complicate the use of colors and color names. 
  124. In order to understand them, you will need to read through the restrictions 
  125. described below.  These restrictions are due to the design of your PC video 
  126. hardware and video drivers, and are not inherent in 4OS2.  Some of the 
  127. restrictions are complex, so feel free to skip over those that do not apply to 
  128. color combinations you use. 
  129.  
  130. Some restrictions depend on the display "mode."  4OS2 can run in either normal 
  131. display mode, where it uses the full screen and has more direct control over 
  132. the video hardware; or in windowed display mode, where it appears in a window 
  133. on the OS/2 desktop. 
  134.  
  135. Monochrome Video Adapters 
  136.  
  137. If you have a monochrome video adapter, you cannot display any colors except 
  138. white and black in either normal or bright intensity. If you have a color video 
  139. adapter, you can use any of the standard colors listed above (provided you meet 
  140. the other restrictions below). 
  141.  
  142. Color Errors 
  143.  
  144. A standard color specification allows sixteen foreground and eight background 
  145. colors (sixteen if bright backgrounds are enabled, see below).  However, most 
  146. video adapters and monitors do not provide true renditions of certain colors. 
  147. For example, most users see normal "yellow" as brown, and bright yellow as 
  148. yellow; many also see normal red as red, and "bright red" as pink.  Color 
  149. errors are often much worse when running in windowed mode (see above), because 
  150. the graphical environment that created the window may not map the text-mode 
  151. colors the way you expect.  These problems are inherent in the monitor, video 
  152. adapter, and driver software.  They cannot be corrected using 4OS2 color 
  153. specifications. 
  154.  
  155. Border Colors 
  156.  
  157. In order to use border colors, you must have a color video adapter (monochrome 
  158. adapters do not support border colors). 
  159.  
  160. 4OS2 can only accept border colors in the CLS and COLOR commands, and in the 
  161. StdColors directive in the .INI file.  Border colors will be ignored, or will 
  162. cause an error, if they are used elsewhere. 
  163.  
  164. Border colors do not work in windowed mode, and will be ignored if used in a 
  165. windowed session under OS/2. 
  166.  
  167. Blinking Text and Bright Background Colors 
  168.  
  169. The interactions between blinking characters, bright backgrounds, and your 
  170. display mode can be complex.  You will need to understand them if you use 
  171. either attribute in your color specifications. 
  172.  
  173. Bright background colors are only available if you have an EGA- or 
  174. VGA-compatible display adapter.  If you have a monochrome or CGA adapter, you 
  175. can use blinking displays and ignore the interactions described below. 
  176.  
  177. The effects of blinking and bright background color specifications depend 
  178. partly on whether you are in normal or windowed display mode. 
  179.  
  180. Full-Screen Display Mode 
  181.  
  182. In full-screen display mode your video hardware can be configured via software 
  183. commands to display either blinking text, or text with a bright background, but 
  184. not both.  This is due to the design of PC video hardware, and is not a 
  185. software restriction. 
  186.  
  187. The memory on your video adapter includes a "flag" for each character on the 
  188. screen.  The flag controls blinking text and bright background colors.  If the 
  189. flag is off, the character is displayed with a normal background and does not 
  190. blink.  If the flag is "on," the character either blinks or is displayed with a 
  191. bright background, depending on which way your video adapter is currently 
  192. configured. 
  193.  
  194. In full-screen display mode, the configuration of your video adapter can be 
  195. controlled by 4OS2 with the BrightBG directive in the 4OS2.INI file or the 
  196. SETDOS /B command.  If you set BrightBG = No or use the SETDOS /B0 command, 
  197. 4OS2 will configure the video adapter for blinking text, and characters with 
  198. the blink / bright background flag set will blink.  If you set BrightBG = Yes 
  199. or use SETDOS /B1, 4OS2 will configure the video adapter for bright background 
  200. colors, and the characters will be displayed with a bright background instead. 
  201.  
  202. Because there is only one flag for each character to specify both blinking text 
  203. and bright background color, it doesn't matter which attribute you use when you 
  204. specify the color.  Whether you specify blinking text or a bright background, 
  205. you will see the same thing on your screen.  For example, these two COLOR 
  206. commands will always produce the same results: 
  207.  
  208.         color blink white on blue
  209.         color white on bright blue
  210.  
  211. If bright backgrounds are enabled, both commands will produce white text on a 
  212. bright blue background.  If blinking text is enabled, both commands will 
  213. produce blinking white text on a blue background. 
  214.  
  215. If you don't use BrightBG or SETDOS /B, or if you use SETDOS /B2, 4OS2 will not 
  216. attempt to configure your video hardware.  Most video adapters default to 
  217. blinking text in normal mode, but this can be changed by application programs. 
  218. If you use BrightBG or SETDOS /B, 4OS2 will configure the hardware each time it 
  219. displays the prompt. 
  220.  
  221. The method used to adjust the video hardware may not be compatible with all 
  222. video cards.  If you see screen "flashes" at each prompt when you use BrightBG 
  223. or SETDOS /B, discontinue using both commands.  This problem is very rare and 
  224. is not likely to occur on standard EGA and VGA systems. 
  225.  
  226. Windowed Mode 
  227.  
  228. In windowed mode, 4OS2 cannot control your hardware to select blinking or 
  229. bright backgrounds.  Instead, OS/2 displays bright background colors, 
  230. regardless of the BrightBG or SETDOS /B setting.  It does not provide a way to 
  231. display blinking characters in windowed mode.  As an example, the two commands 
  232. given above would both display white text on a bright blue background when run 
  233. in windowed mode. 
  234.  
  235. Switching Modes 
  236.  
  237. OS/2 allows you to switch any DOS session between full- screen and windowed 
  238. mode.  You cannot switch modes for OS/2 sessions, so 4OS2 is not directly 
  239. affected by mode switching. However, if you write batch files or aliases which 
  240. run in both modes, you may need to take into account that OS/2 defaults to 
  241. displaying blinking text in full-screen mode and bright backgrounds in windowed 
  242. mode. 
  243.  
  244.  
  245. ΓòÉΓòÉΓòÉ 3.2. Color-Coded Directories ΓòÉΓòÉΓòÉ
  246.  
  247. The DIR and SELECT commands can display each file name in a different color, 
  248. depending on the file's extension. 
  249.  
  250. To choose the DIR and SELECT display colors, you must either use the SET 
  251. command to create an environment variable called COLORDIR, or use the ColorDir 
  252. directive in your .INI file. 
  253.  
  254. If you do not use the COLORDIR variable or the ColorDir directive, DIR will use 
  255. the default screen colors and SELECT will use the default screen colors or 
  256. those set with the SelectColors directive. 
  257.  
  258. If you use both the COLORDIR variable and the ColorDir directive, the 
  259. environment variable will override the settings in your .INI file.  You may 
  260. find it useful to use the COLORDIR variable for experimenting, then to set 
  261. permanent directory colors with the ColorDir directive. 
  262.  
  263. The format for both the COLORDIR environment variable and the ColorDir 
  264. directive in the .INI file is: 
  265.  
  266.         ext ... :ColorName; ...
  267.  
  268. where "ext" is a file extension (which may include wildcards) or one of the 
  269. following file types: 
  270.  
  271.         DIRS      Directories
  272.         RDONLY    Read-only files
  273.         HIDDEN    Hidden files
  274.         SYSTEM    System files
  275.         ARCHIVE   Files modified since the last backup
  276.  
  277. and "ColorName" is any valid color name (see Colors). 
  278.  
  279. Unlike most color specifications, the background portion of the color name may 
  280. be left out for directory colors.  If you don't specify a background color, DIR 
  281. and SELECT will use the current screen background color. 
  282.  
  283. For example, to display the .COM and .EXE files in red on the current 
  284. background, the .C and .ASM files in bright cyan on the current background, and 
  285. the read-only files in blinking green on white (this should be entered on one 
  286. line): 
  287.  
  288.         [c:\] set colordir=com exe:red; c asm:bright cyan; rdonly:blink green on white
  289.  
  290. Extended wildcards (for example "BA[KXC]" for .BAK, .BAX, and .BAC files) can 
  291. be used in directory color specifications. 
  292.  
  293. If the extension or type of a file matches an extension or type listed in your 
  294. color specification, the remainder of the colors are ignored for that file. 
  295. You may need to take this into account in determining the order of extensions 
  296. and file types in your COLORDIR setting.  For example, you might try this 
  297. setting to display all .COM and .EXE files in red, and all other files whose 
  298. extension starts with a "C" in green: 
  299.  
  300.      c:\> set colordir=c*:green;com exe:red
  301.  
  302. However in this case the .COM files will be displayed in green, because they 
  303. match the "c*", and the ".com" later on the line is ignored.  To correct this 
  304. problem, change the line to read: 
  305.  
  306.      c:\> set colordir=com exe:red;c*:green
  307.  
  308.  
  309. ΓòÉΓòÉΓòÉ 3.3. Keys and Key Names ΓòÉΓòÉΓòÉ
  310.  
  311. Key names are used to define keystroke aliases, and in several 4OS2.INI 
  312. directives.  The format of a key name is the same in both uses: 
  313.  
  314.         [Prefix-]Keyname
  315.  
  316. The key prefix can be left out, or it can be any one of the following: 
  317.  
  318.         Alt         followed by A - Z, 0 - 9, F1 - F12, or Bksp
  319.         Ctrl        followed by A - Z, F1 - F12, Tab, Bksp, Enter,
  320.                       Left, Right, Home, End, PgUp, PgDn, Ins, or Del
  321.         Shift       followed by F1 - F12 or Tab.
  322.  
  323. The possible key names are: 
  324.  
  325.         A - Z           Enter           PgDn
  326.         0 - 9           Up              Home
  327.         F1 - F          Down            End
  328.         Esc             Left            Ins
  329.         Bksp            Right           Del
  330.         Tab             PgUp
  331.  
  332. All key names must be spelled as shown.  Alphabetic keys can be specified in 
  333. upper-case or lower-case.  You cannot specify a punctuation key. 
  334.  
  335. The prefix and key name must be separated by a dash [-].  For example: 
  336.  
  337.         Alt-F10        This is okay
  338.         Alt F10        The space will cause an error
  339.  
  340. If you prefer, you can use a numeric value instead of a key name. Use the ASCII 
  341. code for an ASCII, extended ASCII, or control character.  Use the scan code 
  342. preceded by an at sign [@] for extended key codes like F1 or the cursor keys. 
  343. For example, use 13 for Enter, or @59 for F1.  In general, you will find it 
  344. easier to use the names described above rather than key numbers. See see the 
  345. Reference Tables for an explanation and list of ASCII and key codes. 
  346.  
  347. Some keys are intercepted by OS/2 and are not passed on to 4OS2.  For example, 
  348. Ctrl-S pauses screen output temporarily, and Ctrl-Esc pops up the OS/2 window 
  349. list.  Keys which are intercepted by OS/2 generally cannot be assigned to 
  350. aliases or with key mapping directives, because 4OS2 never receives these 
  351. keystrokes and therefore cannot act on them. 
  352.  
  353. You also may not be able to use certain keys if your keyboard is not 100% 
  354. IBM-compatible or your keyboard driver does not support them.  For example, on 
  355. some systems the F11 and F12 keys are not recognized; others may not support 
  356. unusual combinations like Ctrl-Tab.  These problems are rare; when they do 
  357. occur, they are usually due to OS/2 and not to any problem with 4OS2. 
  358.  
  359.  
  360. ΓòÉΓòÉΓòÉ 4. 16-Bit and 32-Bit Versions of 4OS2 ΓòÉΓòÉΓòÉ
  361.  
  362. 4OS2 comes in two versions:  32-bit (4OS2/32) and 16-bit (4OS2/16).  If you use 
  363. OS/2 version 2.1 or above, you will find that 4OS2/32 offers a few improvements 
  364. and runs a bit faster than 4OS2/16.  Normally, the correct version is selected 
  365. for you automatically by the 4OS2 INSTALL program.  If you are using a 
  366. downloaded copy of 4OS2, see the README.DOC file which came with your copy for 
  367. details on selecting the appropriate files for your system. 
  368.  
  369. Once the proper version is selected during installation, you generally don't 
  370. need to be concerned with which version you are using, as the two versions are 
  371. almost identical.  A few features are available only in the 32-bit version; 
  372. these are marked as such in this help text and in the manuals. 
  373.  
  374. If necessary, you can install the 16-bit or 32-bit version explicitly rather 
  375. than letting the installation program choose for you.  To do so, start the 
  376. installation program (see page 4) and select the Install 16-bit Version or 
  377. Install 32-bit Version option.  These options install only the files which 
  378. differ between the two versions:  4OS2.EXE, SHRALIAS.EXE, 4OS2A.ICO, and 
  379. 4OS2B.ICO. 
  380.  
  381. 4OS2/16 runs under OS/2 1.21, 1.3, 2.0, 2.1, 2.11, and 3.0 (including "OS/2 for 
  382. Windows").  4OS2/32 normally runs only under OS/2 2.1, 2.11, and 3.0 (also 
  383. including "OS/2 for Windows").  You can install it manually for OS/2 2.0 if you 
  384. wish, but some features may not work properly due to problems with 32-bit 
  385. support in some versions of OS/2 2.0. 
  386.  
  387.  
  388. ΓòÉΓòÉΓòÉ 5. ┬áStartup ΓòÉΓòÉΓòÉ
  389.  
  390. Each 4OS2 object on your OS/2 desktop represents a different 4OS2 session.  You 
  391. can configure any of these sessions to run in windowed or full-screen mode, and 
  392. you can set any necessary command line parameters for 4OS2, by adjusting the 
  393. properties of the desktop objects. 
  394.  
  395. To adjust the properties of an object you need to be familiar with how object 
  396. properties are set in your version of OS/2.  For details see your OS/2 
  397. documentation, or the 4OS2 Introduction and Installation Guide. 
  398.  
  399. When you configure a 4OS2 object, place an asterisk [*] in the Program Name 
  400. field, and put any startup options that you want passed to 4OS2 (e.g., 
  401. @inifile) in the Parameters field.  For example: 
  402.  
  403.      Path and file name:  *
  404.      Parameters:          @D:\START\4OS2.INI
  405.      Working directory:   C:\
  406.  
  407. (If 4OS2 is not set up as your default OS/2 shell in CONFIG.SYS, use the full 
  408. path and name for 4OS2.EXE as the program name, rather than the asterisk.) 
  409.  
  410. The 4OS2 command line does not need to contain any information.  When invoked 
  411. with an empty command line, 4OS2 will configure itself from the 4OS2.INI file, 
  412. run 4START, and then display a prompt and wait for you to type a command. 
  413. However, you may add options on the 4OS2 command line to change the way 4OS2 
  414. operates. 
  415.  
  416. 4OS2 recognizes several optional fields on the command line. All of the options 
  417. go on one line.  If you use more than one of these fields, their order is 
  418. important.  The syntax for the command line is: 
  419.  
  420.         [d:\path] [@d:\path\inifile] [//iniline]... [/L] [/LA] [/LD] [/LH] [/S] 
  421.         [/C | /K] [command] 
  422.  
  423.  The options are: 
  424.  
  425.         d:\path:  4OS2 will use this directory and path to set the COMSPEC 
  426.         environment variable for this session.  If this option is not used, 
  427.         COMSPEC is set from the location of 4OS2.EXE.  4OS2 always knows what 
  428.         drive and directory it was started from and can set COMSPEC 
  429.         accordingly.  This option is included only for compatibility with 
  430.         CMD.EXE. 
  431.  
  432.         @d:\path\inifile:  This option sets the path and name of the 4OS2.INI 
  433.         file.  You do not need this option if you aren't using a 4OS2.INI file, 
  434.         or if the file is named 4OS2.INI and is stored in the same subdirectory 
  435.         as 4OS2.EXE or in the root directory of the boot drive. 
  436.  
  437.         //iniline:  This option tells 4OS2 to treat the text appearing between 
  438.         the // and the next space or tab as a 4OS2.INI directive.  The 
  439.         directive should be in the same format as a line in 4OS2.INI, but it 
  440.         may not contain spaces, tabs, or comments.  This option overrides any 
  441.         corresponding directive in your 4OS2.INI file. 
  442.  
  443.         /L, /LA, /LD, and /LH:  These options force 4OS2 to to use a local 
  444.         alias, directory history, and / or command history list.  They can be 
  445.         used to override any LocalAlias=No, LocalDirHistory=No, or 
  446.         LocalHistory=No settings in 4OS2.INI.  This allows you to use global 
  447.         lists as the default, but start a specific 4OS2 session with local 
  448.         lists. See Command History for details on local and global history, 
  449.         Directory History Window for details on local and global directory 
  450.         history, and ALIAS for details on local and global aliases.  /LA forces 
  451.         local aliases, /LD forces local directory history, /LH forces local 
  452.         history, and /L forces all three. 
  453.  
  454.         /S:  This option tells 4OS2 that you do not want it to set up a Ctrl-C 
  455.         / Ctrl-Break handler.  It is included for compatibility with CMD.EXE, 
  456.         but it may cause the system to operate incorrectly if you use this 
  457.         option without other software to handle Ctrl-C and Ctrl-Break. 
  458.  
  459.         [/C | /K] command:  This option tells 4OS2 to run a command when it 
  460.         starts.  The command will be run after 4START has been executed and 
  461.         before any command prompt is displayed.  It can be any valid internal 
  462.         or external command, batch file, or alias; you may include multiple 
  463.         commands by using the command separator.  All other startup options 
  464.         must be placed before the command, because 4OS2 will treat characters 
  465.         after the command as part of the command and not as additional startup 
  466.         options. 
  467.  
  468.         When the command is preceded by a /C, 4OS2 will execute the command and 
  469.         then exit and return to the parent program or the OS/2 desktop without 
  470.         displaying a prompt. 
  471.  
  472.         The /K switch has no effect; using it is the same as placing the 
  473.         command (without a /C or /K) at the end of the startup command line. 
  474.         It is included only for compatibility with CMD.EXE. 
  475.  
  476.  To run a startup batch file for a particular 4OS2 session, include its name 
  477.  (with a path, if the batch file is not in the session's startup directory) as 
  478.  the last item in the Parameters field when you configure the desktop object. 
  479.  That batch file will be executed after any 4START file, but before the first 
  480.  prompt is displayed.  You can use the batch file to set environment variables 
  481.  and execute any other 4OS2 commands. 
  482.  
  483.  You can also execute any internal 4OS2 command, external command, or alias by 
  484.  placing its name in the Parameters field.  For example: 
  485.  
  486.        Path and file name:  *
  487.        Parameters:          D:\STARTOS2.CMD
  488.        Working directory:   C:\
  489.  
  490.  To execute an internal or external command, an alias, or a batch file and then 
  491.  exit (return to the desktop) when it is done, place /C command (rather than 
  492.  just command) as the last item in the Parameters field.  For example: 
  493.  
  494.        Path and file name:  *
  495.        Parameters:          /C COMFILES.BTM
  496.        Working directory:   C:\
  497.  
  498.  
  499. ΓòÉΓòÉΓòÉ 6. The Command Line ΓòÉΓòÉΓòÉ
  500.  
  501. 4OS2 displays a [c:\] prompt when it is waiting for you to enter a command. 
  502. (The actual text depends on the current drive and directory as well as your 
  503. PROMPT settings.)  This is called the command line and the prompt is asking you 
  504. to enter a command, an alias or batch file name, or the instructions necessary 
  505. to begin an application program. 
  506.  
  507. This section explains the features that will help you while you are typing in 
  508. commands, and how keystrokes are interpreted when you enter them at the command 
  509. line.  The keystrokes discussed here are the ones normally used by 4OS2.  If 
  510. you prefer using different keystrokes to perform these functions, you can 
  511. assign new ones with key mapping directives in 4OS2.INI. 
  512.  
  513. The command line features documented in this section are: 
  514.  
  515.             Command-Line Editing 
  516.             Command History and Recall 
  517.             Command History Window 
  518.             Filename Completion 
  519.             Directory History Window 
  520.             Automatic Directory Changes 
  521.             Multiple Commands 
  522.             Command-Line Length Limits 
  523.             Page and File Prompts 
  524.             Conditional Commands 
  525.             Command Grouping 
  526.             Escape Character 
  527.             Critical Errors 
  528.  
  529.  Additional command-line features are documented under Redirection and Piping 
  530.  and File Selection. 
  531.  
  532.  
  533. ΓòÉΓòÉΓòÉ 6.1. Command-Line Editing ΓòÉΓòÉΓòÉ
  534.  
  535. The command line works like a single-line word processor, allowing you to edit 
  536. any part of the command at any time before you press Enter to execute it, or 
  537. Esc to erase it.  The command line extends to a maximum of 1023 characters. 
  538.  
  539. You can use the following editing keys when you are typing a command (the words 
  540. Ctrl and Shift mean to press the Ctrl or Shift key together with the other key 
  541. named): 
  542.  
  543. Cursor Movement Keys: 
  544.  
  545.                        Move the cursor left one character. 
  546.                        Move the cursor right one character. 
  547.         Ctrl           Move the cursor left one word. 
  548.         Ctrl           Move the cursor right one word. 
  549.         Home            Move the cursor to the beginning of the line. 
  550.         End             Move the cursor to the end of the line. 
  551.  
  552.  Insert and Delete: 
  553.  
  554.         Ins             Toggle between insert and overtype mode. 
  555.         Del             Delete the character at the cursor. 
  556.         Backspace       Delete the character to the left of the cursor. 
  557.         Ctrl-L          Delete the word or partial word to the left of the 
  558.                         cursor. 
  559.         Ctrl-R          or Ctrl-Bksp  Delete the word or partial word to the 
  560.                         right of the cursor. 
  561.         Ctrl-Home       Delete from the beginning of the line to the cursor. 
  562.         Ctrl-End        Delete from the cursor to the end of the line. 
  563.         Esc             Delete the entire line. 
  564.         Ctrl-C          or Ctrl-Break  Cancel the command. 
  565.         Enter           Execute the command line. 
  566.  
  567.  4OS2 will prompt for additional command-line text when you include the escape 
  568.  character as the very last character of a typed command line.  The default 
  569.  escape character is the caret [^].  For example: 
  570.  
  571.           [c:\] echo The quick brown fox jumped over the lazy^
  572.           More? sleeping dog. > alphabet
  573.  
  574.  Sometimes you may want to enter one of the above keystrokes on the command 
  575.  line instead of performing the key's usual action.  For example, suppose you 
  576.  have a program that requires a Ctrl-R character on its command line.  Normally 
  577.  you couldn't type this keystroke at the prompt, because it would be 
  578.  interpreted as a "Delete word right" command. 
  579.  
  580.  To get around this problem, use the special keystroke Alt-255. You enter 
  581.  Alt-255 by holding down the Alt key while you type 255 on the numeric keypad, 
  582.  then releasing the Alt key (you must use the number keys on the numeric pad; 
  583.  the row of keys at the top of your keyboard won't work).  This forces 4OS2 to 
  584.  interpret the next keystroke literally and places it on the command line, 
  585.  ignoring any special meaning it would normally have as a command- line editing 
  586.  or history keystroke.  You can use Alt-255 to suppress the normal meaning of 
  587.  command-line editing keystrokes even if they have been reassigned with key 
  588.  mapping directives in the .INI file, and Alt-255 itself can be reassigned with 
  589.  the CommandEscape directive. 
  590.  
  591.  If you want your input at the command line to be in a different color from 
  592.  4OS2's prompts or output, you can use the InputColors directive in your .INI 
  593.  file. 
  594.  
  595.  Most of the command-line editing capabilities are also available when a 4OS2 
  596.  command prompts you for a line of input.  For example, you can use the 
  597.  command-line editing keys when DESCRIBE prompts for a file description, when 
  598.  INPUT prompts for input from an alias or batch file, or when LIST prompts you 
  599.  for a search string. 
  600.  
  601.  
  602. ΓòÉΓòÉΓòÉ 6.2. Command History and Recall ΓòÉΓòÉΓòÉ
  603.  
  604. Command History Keys: 
  605.  
  606.                        Recall the previous (or most recent) command, or the 
  607.                         most recent command that matches a partial command 
  608.                         line. 
  609.                        Recall the next (or oldest) command, or the oldest 
  610.                         command that matches a partial command line. 
  611.         F3              Fill in the rest of the command line from the previous 
  612.                         command, beginning at the current cursor position. 
  613.         Ctrl-D          Delete the currently displayed history list entry, 
  614.                         erase the command line, and display the previous 
  615.                         matching history list entry. 
  616.         Ctrl-E          Display the last entry in the history list. 
  617.         Ctrl-K          Save the current command line in the history list 
  618.                         without executing it, and then clear the command line. 
  619.         Ctrl-Enter      Copy the current command line to the end of the history 
  620.                         list even it has not been altered. 
  621.         @               As the first character in a line:  Do not save the 
  622.                         current line in the history list when it is executed, 
  623.                         and do not store it in the CMDLINE environment 
  624.                         variable. 
  625.  
  626.  Use the  key repeatedly to scan back through the history list.  When the 
  627.  desired command appears, press Enter to execute it again.  After you have 
  628.  found a command, you can edit it before pressing Enter. 
  629.  
  630.  The history list is "circular".  If you move to the last command in the list 
  631.  and then press the down arrow one more time, you'll see the first command in 
  632.  the list.  Similarly, if you move to the first command in the list and then 
  633.  press the up arrow one more time, you'll see the last command in the list. 
  634.  
  635.  You can search the command history list to find a previous command quickly 
  636.  using command completion.  Just enter the first few characters of the command 
  637.  you want to find and press . You only need to enter enough characters to 
  638.  identify the command that you want to find.  If you press the  key a second 
  639.  time, you will see the previous command that matches.  The system will beep if 
  640.  there are no matching commands.  The search process stops as soon as you type 
  641.  one of the editing keys, whether or not the line is changed.  At that point, 
  642.  the line you're viewing becomes the new line to match if you press  again. 
  643.  
  644.  You can specify the size of the command history list with the History 
  645.  directive in the .INI file.  When the list is full, the oldest commands are 
  646.  discarded to make room for new ones.  You can also use the HistMin directive 
  647.  in the .INI file to enable or disable history saves and to specify the 
  648.  shortest command line that will be saved. 
  649.  
  650.  You can prevent any command line from being saved in the history by beginning 
  651.  it with an at sign [@]. 
  652.  
  653.  Use Ctrl-Enter to organize the history list for repetitive tasks.  Instead of 
  654.  searching through the command history for the next command in a sequence, you 
  655.  can place all of the necessary commands next to each other and make them 
  656.  easier to repeat. 
  657.  
  658.  When you execute a command from the history, that command remains in the 
  659.  history list in its original position.  The command is not copied to the end 
  660.  of the list (unless you modify it).  If you want each command to be copied to 
  661.  the end of the list when it is re- executed, set HistCopy to Yes in your .INI 
  662.  file. 
  663.  
  664.  Local and Global Command History 
  665.  
  666.  The command history can be stored in either a "local" or "global" list. 
  667.  
  668.  With a local history list, any changes made to the history will only affect 
  669.  the current copy of 4OS2.  They will not be visible in other shells, or other 
  670.  sessions. 
  671.  
  672.  With a global history list, all copies of 4OS2 will share the same command 
  673.  history, and any changes made to the history in one copy will affect all other 
  674.  copies.  Global lists are the default for 4OS2. 
  675.  
  676.  You can control the type of history list with the LocalHistory directive in 
  677.  the .INI file, and with the /L and /LH options of the START command. 
  678.  
  679.  If you select a global history list for 4OS2 you can share the history among 
  680.  all copies of 4OS2 running in any session.  When you close all 4OS2 sessions, 
  681.  the memory for the global history list is released, and a new, empty history 
  682.  list is created the next time you start 4OS2.  If you want the history list to 
  683.  be retained in memory even when no command processor session is running, you 
  684.  need to load the SHRALIAS program, which performs this service for the global 
  685.  history and alias lists.  SHRALIAS is described in more detail under the ALIAS 
  686.  command. 
  687.  
  688.  
  689. ΓòÉΓòÉΓòÉ 6.3. Command History Window ΓòÉΓòÉΓòÉ
  690.  
  691. Command History Window Keys: 
  692.  
  693.         PgUp            (from the command line) Open the command history 
  694.                         window. 
  695.          or PgDn 
  696.                        Scroll the display up one line. 
  697.                        Scroll the display down one line. 
  698.                        Scroll the display left 4 columns. 
  699.                        Scroll the display right 4 columns. 
  700.         PgUp            (inside the window) Scroll the display up one page. 
  701.         PgDn            (inside the window) Scroll the display down one page. 
  702.         Ctrl-PgUp       Go to the beginning of the history list. 
  703.          or Home 
  704.         Ctrl-PgDn       Go to the end of the history list. 
  705.          or End 
  706.         Ctrl-D          Delete the selected line from the history list. 
  707.         Enter           Execute the selected line. 
  708.         Ctrl-Enter      Move the selected line to the command line for editing. 
  709.  
  710.  You can view the command history in a scrollable command history window, and 
  711.  select the command to modify or re-execute from those displayed in the window. 
  712.  To activate the command history window press PgUp or PgDn at the command line. 
  713.  A window will appear in the upper right corner of the screen, with the command 
  714.  you most recently executed marked with a highlight. (If you just finished 
  715.  re-executing a command from the history, then the next command in sequence 
  716.  will be highlighted.) 
  717.  
  718.  Once you have selected a command in the history window, press Enter to execute 
  719.  it immediately, or Ctrl-Enter to move the line to the prompt for editing (you 
  720.  cannot edit the line directly in the history window). 
  721.  
  722.  You can bring up a "filtered" history window by typing some characters on the 
  723.  command line, then pressing PgUp or PgDn. Only those commands matching the 
  724.  typed characters will be displayed in the window. 
  725.  
  726.  You can control the position and size of the history window with configuration 
  727.  directives in 4OS2.INI.  You can also change the keys used in the window with 
  728.  key mapping directives in the .INI file. 
  729.  
  730.  
  731. ΓòÉΓòÉΓòÉ 6.4. Filename Completion ΓòÉΓòÉΓòÉ
  732.  
  733. Filename Completion Keys: 
  734.  
  735.         F8                  Get the previous matching filename. 
  736.          or Shift-Tab 
  737.         F9                  Get the next matching filename. 
  738.          or Tab 
  739.         F10                 Keep the current matching filename and display the 
  740.                             next matching name immediately after the current 
  741.                             one. 
  742.  
  743.  Filename completion can help you by filling in a complete file name on the 
  744.  command line when you only remember part of the name.  For example, if you 
  745.  know the name of a file begins AU but you can't remember the rest of the name, 
  746.  type: 
  747.  
  748.           [c:\] copy au
  749.  
  750.  and then press the Tab key or F9 key.  4OS2 will search the current directory 
  751.  for filenames that begin AU and insert the first one onto the command line in 
  752.  place of the AU that you typed. 
  753.  
  754.  If this is the file that you want, simply complete the command.  If 4OS2 
  755.  didn't find the file that you were looking for, press Tab or F9 again to 
  756.  substitute the next filename that begins with AU.  When there are no more 
  757.  filenames that match your pattern, the system will beep each time you press 
  758.  Tab or F9. 
  759.  
  760.  If you go past the filename that you want, press Shift-Tab or F8 to back up 
  761.  and return to the previous matching filename. After you back up to the first 
  762.  filename, the system will beep each time you press Shift-Tab or F8. 
  763.  
  764.  If you want to enter more than one matching filename on the same command line, 
  765.  press F10 when each desired name appears.  This will keep that name and place 
  766.  the next matching filename after it on the command line.  You can then use Tab 
  767.  (or F9) and Shift-Tab (or F8) to move through the remaining matching files. 
  768.  
  769.  The pattern you use for matching may contain any valid filename characters, as 
  770.  well as wildcard characters and extended wildcards.  For example, you can copy 
  771.  the first matching .TXT file by typing 
  772.  
  773.           [c:\] copy *.txt
  774.  
  775.  and then pressing Tab. 
  776.  
  777.  If you don't specify part of a filename before pressing Tab, the matching 
  778.  pattern will be *.*.  If you type a filename without an extension, 4OS2 will 
  779.  add *.* to the name.  It will also place a "*" after a partial extension.  If 
  780.  you are typing a group of file names in an include list, the part of the 
  781.  include list at the cursor will be used as the pattern to match. 
  782.  
  783.  When filename completion is used at the start of the command line, it will 
  784.  only match directories, executable files, and files with executable 
  785.  extensions, since these are the only file names that it makes sense to use at 
  786.  the start of a command.  If a directory is found, a "\" will be appended to it 
  787.  to enable an automatic directory change. 
  788.  
  789.  Filename Completion Window 
  790.  
  791.  You can also view filenames in a scrollable filename completion window and 
  792.  select the file you want to work with.  To activate the window, press F7 or 
  793.  Ctrl-Tab at the command line.  You will see a window in the upper-right corner 
  794.  of the screen, with the names of files that match any partial filename you 
  795.  have entered on the command line.  If you haven't yet entered a file name, the 
  796.  window will contain the name of all files in the current directory. (Ctrl-Tab 
  797.  will work only if your keyboard and keyboard driver support it.  If it does 
  798.  not work on your system, use F7 instead.) 
  799.  
  800.  Filename Completion Window Keys: 
  801.  
  802.         F7                  (from the command line)  Open the filename 
  803.                             completion window. 
  804.          or Ctrl-Tab 
  805.                            Scroll the display up one line. 
  806.                            Scroll the display down one line. 
  807.                            Scroll the display left 4 columns. 
  808.                            Scroll the display right 4 columns. 
  809.         PgUp                Scroll the display up one page. 
  810.         PgDn                Scroll the display down one page. 
  811.         Ctrl-PgUp           Go to the beginning of the filename list. 
  812.          or Home 
  813.         Ctrl-PgDn           Go to the end of the filename list. 
  814.          or End 
  815.         Enter               Insert the selected filename into the command line. 
  816.  
  817.  
  818. ΓòÉΓòÉΓòÉ 6.5. Directory History Window ΓòÉΓòÉΓòÉ
  819.  
  820. Directory History Window Keys: 
  821.  
  822.         Ctrl-PgUp       (from the command line) Open the directory history 
  823.                         window. 
  824.          or Ctrl-PgDn 
  825.                        Scroll the display up one line. 
  826.                        Scroll the display down one line. 
  827.                        Scroll the display left 4 columns. 
  828.                        Scroll the display right 4 columns. 
  829.         PgUp            Scroll the display up one page. 
  830.         PgDn            Scroll the display down one page. 
  831.         Ctrl-PgUp       Go to the beginning of the directory list. 
  832.          or Home 
  833.         Ctrl-PgDn       Go to the end of the directory list. 
  834.          or End 
  835.         Ctrl-D          Delete the selected line from the directory list. 
  836.         Enter           Change to the selected drive and directory. 
  837.         Ctrl-Enter      Move the selected line to the command line for editing. 
  838.  
  839.  Every time you change to a new directory or drive, the current directory 
  840.  directory is recorded in an internal directory history list. You can set the 
  841.  size of the list with the DirHistory directive in 4OS2.INI.  As new entries 
  842.  are added, old entries are deleted from the list.  Directory changes are 
  843.  recorded whether you make them from the command line with the CD, CDD, PUSHD, 
  844.  or POPD commands, with an automatic directory change, or by typing a new drive 
  845.  letter followed by a colon. Directories are recorded whether you change from 
  846.  one to another at the command line, from within a batch file, or from within 
  847.  an alias.  In order to conserve space, each directory name is recorded just 
  848.  once in the directory history, even if you move into and out of that directory 
  849.  several times. 
  850.  
  851.  You can view the directory history from the scrollable directory history 
  852.  window and change to any drive and directory on the list. To activate the 
  853.  directory history window, press Ctrl-PgUp or Ctrl-PgDn at the command line. 
  854.  You can then select a new directory with the Enter key. 
  855.  
  856.  See also Local and Global Directory History. 
  857.  
  858.  
  859. ΓòÉΓòÉΓòÉ 6.5.1. Local and Global Directory History ΓòÉΓòÉΓòÉ
  860.  
  861. The directory history can be stored in either a "local" or "global" list. 
  862.  
  863. With a local directory history list, any changes made to the list will only 
  864. affect the current copy of the command processor.  They will not be visible in 
  865. other shells, or other sessions. 
  866.  
  867. With a global list, all copies of the command processor will share the same 
  868. directory history, and any changes made to the list in one copy will affect all 
  869. other copies. 
  870.  
  871. You can control the type of directory history list with the LocalDirHistory 
  872. directive in 4OS2.INI, and with the /L and /LD options of the START command. 
  873.  
  874. There is no fixed rule for deciding whether to use a local or global directory 
  875. history list.  Depending on your work style, you may find it most convenient to 
  876. use one type, or a mixture of types in different sessions or shells.  We 
  877. recommend that you start with the default, then modify it if you find a 
  878. situation where the default is not convenient. 
  879.  
  880. If you select a global directory list, you can share the list among all copies 
  881. of the command processor running in any session.  When you close all 4OS2 
  882. sessions, the memory for the global directory history list is released, and a 
  883. new, empty list is created the next time you start 4OS2.  If you want the list 
  884. to be retained in memory even when no command processor session is running, you 
  885. need to load the SHRALIAS program, which performs this service for the global 
  886. command history, directory history, and alias lists.  SHRALIAS is described in 
  887. more detail under the ALIAS command. 
  888.  
  889. Whenever you start a secondary shell which uses a local history list, it 
  890. inherits a copy of the directory history from the previous shell.  However, any 
  891. changes to the list made in the secondary shell will affect only that shell. 
  892. If you want changes made in a secondary shell to affect the previous shell, use 
  893. a global directory history list in both shells. 
  894.  
  895.  
  896. ΓòÉΓòÉΓòÉ 6.6. Automatic Directory Changes ΓòÉΓòÉΓòÉ
  897.  
  898. The automatic directory change feature gives you a quick method for changing 
  899. directories.  You can use an automatic directory change in place of the CD or 
  900. CDD command.  To do so, simply type the name of the directory you want to 
  901. change to at the prompt, with a backslash [\] at the end.  For example: 
  902.  
  903.         [c:\] 4os2\
  904.         [c:\4os2]
  905.  
  906. This feature can make directory changes very simple when it's combined with 
  907. CDPATH, a list of directories for the CD and CDD commands to search if the 
  908. directory you name does not exist below the current directory.  For example, 
  909. suppose CDPATH is set to C:\;D:\;E:\, and the directory WIN exists on drive E:. 
  910. You can change to this directory with a single word on the command line: 
  911.  
  912.         [c:\4os2] win\
  913.         [e:\win]
  914.  
  915. In executing the command shown above, 4OS2 first looks for a WIN subdirectory 
  916. of the current directory, i.e., C:\4OS2\WIN.  If no such directory exists it 
  917. looks for a WIN subdirectory in every directory in the CDPATH list, and changes 
  918. to the first one it finds. 
  919.  
  920. Internally, automatic directory changes use the CDD command, so the text before 
  921. the backslash can include a drive letter, a full path, or a partial path. 
  922. Commands like "....\" can be used to move up the directory tree quickly (see 
  923. Extended Parent Directory Names). Automatic directory changes save the current 
  924. directory, so it can be recalled with a "CDD -" or "CD -" command. 
  925.  
  926.  
  927. ΓòÉΓòÉΓòÉ 6.7. Multiple Commands ΓòÉΓòÉΓòÉ
  928.  
  929. You can type several commands on the same command line, separated by an 
  930. ampersand [&].  For example, if you know you want to copy all of your .TXT 
  931. files to drive A: and then run CHKDSK to be sure that drive A's file structure 
  932. is in good shape, you could enter the following command: 
  933.  
  934.         [c:\] copy *.txt a: & chkdsk a:
  935.  
  936. You may put as many commands on the command line as you wish, as long as the 
  937. total length of the command line does not exceed 1023 characters. 
  938.  
  939. You can use multiple commands in batch files and alias definitions as well as 
  940. from the command line. 
  941.  
  942. If you don't like using the default command separator, you can pick another 
  943. character using the SETDOS /C command or the CommandSep directive in the .INI 
  944. file.  If you plan to share aliases or batch files between 4DOS, 4OS2, and 
  945. 4DOS/NT, see 4DOS, 4OS2, and 4DOS/NT Compatibility for details about choosing 
  946. compatible command separators for two or more products. 
  947.  
  948.  
  949. ΓòÉΓòÉΓòÉ 6.8. Command-Line Length Limits ΓòÉΓòÉΓòÉ
  950.  
  951. When you first enter a command at the prompt or in an alias or batch file, it 
  952. can be up to 1,023 characters long. 
  953.  
  954. As 4OS2 scans the command line and substitutes the contents of aliases and 
  955. environment variables for their names, the line usually gets longer.  This 
  956. expanded line is stored in an internal buffer which allows each individual 
  957. command to grow to 1,023 characters during the expansion process.  In addition, 
  958. if you have multiple commands on a single line, during expansion the entire 
  959. line can grow to as much as 2,047 characters.  If your use of aliases or 
  960. environment variables causes the command line to exceed either of these limits 
  961. as it is expanded, you will see an error message and the remainder of the line 
  962. will not be executed. 
  963.  
  964.  
  965. ΓòÉΓòÉΓòÉ 6.9. Page and File Prompts ΓòÉΓòÉΓòÉ
  966.  
  967. Several 4OS2 commands can generate prompts, which wait for you to press a key 
  968. to view a new page or to perform a file activity. 
  969.  
  970. When 4OS2 is displaying information in page mode, for example with a DIR /P or 
  971. SET /P command, it displays the message 
  972.  
  973.         Press Esc to Quit or any other key to continue...
  974.  
  975. At this prompt, you can press Esc, Ctrl-C, or Ctrl- Break if you want to quit 
  976. the command.  You can press almost any other key to continue with the command 
  977. and see the next page of information. 
  978.  
  979. During file processing, if you have activated prompting with a command like DEL 
  980. /P, you will see this prompt before processing every file: 
  981.  
  982.         Y/N/R ?
  983.  
  984. You can answer this prompt by pressing "Y" for "Yes, process this file;"  "N" 
  985. for "No, do not process this file;" "R" for "process the Remainder of the files 
  986. without further prompting; or "Esc" for "cancel further processing for this 
  987. argument."  You can also press Ctrl-C or Ctrl-Break at this prompt to cancel 
  988. the remainder of the command. 
  989.  
  990.  
  991. ΓòÉΓòÉΓòÉ 6.10. Conditional Commands ΓòÉΓòÉΓòÉ
  992.  
  993. Conditional commands allow you to perform tasks based upon the previous 
  994. command's exit code.  Many programs return a 0 if they are successful and a 
  995. non-zero value if they encounter an error. 
  996.  
  997. If you separate two commands by && (AND), the second command will be executed 
  998. only if the first returns an exit code of 0.  For example, the following 
  999. command will only erase files if the BACKUP operation succeeds: 
  1000.  
  1001.         [c:\] backup c:\ a: && del c:\*.bak;*.lst
  1002.  
  1003. If you separate two commands by || (OR), the second command will be executed 
  1004. only if the first returns a non-zero exit code. For example, if the following 
  1005. BACKUP operation fails, then ECHO will display a message: 
  1006.  
  1007.         [c:\] backup c:\ a: || echo Error in the backup!
  1008.  
  1009. All internal commands return an exit code, but not all external programs do. 
  1010. Conditional commands will behave unpredictably if you use them with external 
  1011. programs which do not return an explicit exit code. 
  1012.  
  1013.  
  1014. ΓòÉΓòÉΓòÉ 6.11. Command Grouping ΓòÉΓòÉΓòÉ
  1015.  
  1016. Command grouping allows you to logically group a set of commands together by 
  1017. enclosing them in parentheses.  The parentheses are similar in function to the 
  1018. BEGIN and END block statements in some programming languages. 
  1019.  
  1020. There are two primary uses for command grouping.  One is to execute multiple 
  1021. commands in a place where normally only a single command is allowed.  For 
  1022. example, suppose you want to copy then rename all the .WKQ files on drives A: 
  1023. and B: using the FOR command.  You could do it like this: 
  1024.  
  1025.         [c:\] for %drv in (A B) do copy %drv:*.wkq d:\wksave\
  1026.         [c:\] for %drv in (A B) do ren %drv:*.wkq *.old
  1027.  
  1028. But with command grouping you can do the same thing in one command (enter this 
  1029. on one line): 
  1030.  
  1031.         [c:\] for %drv in (A B) do (copy %drv:*.wkq
  1032.              d:\wksave\ & ren %drv:*.wkq *.sav)
  1033.  
  1034. The COPY and REN commands enclosed in the parentheses appear to FOR as if they 
  1035. were a single command, so both commands are executed for every element of the 
  1036. FOR list. 
  1037.  
  1038. You can also use command grouping to redirect input or output for several 
  1039. commands without repeatedly using the redirection symbols.  For example, 
  1040. consider the following batch file fragment which uses the ECHO command to 
  1041. create a file (with >), and to append to the file (with >>): 
  1042.  
  1043.         echo Data files %_date > filelist
  1044.         dir *.dat >> filelist
  1045.         echo. >> filelist
  1046.         echo Text files %_date >> filelist
  1047.         dir *.txt >> filelist
  1048.  
  1049. Using command grouping, these commands can be written much more simply.  Enter 
  1050. this example on one line: 
  1051.  
  1052.         (echo Data files %_date & dir *.dat & echo. & echo Text files
  1053.         %_date & dir *.txt) > filelist
  1054.  
  1055. The redirection, which appears outside the parentheses, applies to all the 
  1056. commands within the parentheses.  Because the redirection is performed only 
  1057. once, the commands will run slightly faster than if each command was entered 
  1058. separately.  The same approach can be used for input redirection and for 
  1059. piping. 
  1060.  
  1061. You can also use command grouping in a batch file or at the prompt to split 
  1062. commands over several lines.  This last example is like the redirection example 
  1063. above, but is entered at the prompt.  4OS2 displays a "More?" prompt after each 
  1064. incomplete line: 
  1065.  
  1066.         [c:\] (echo Data files %_date
  1067.         More? dir *.dat
  1068.         More? echo.
  1069.         More? echo Text files %_date
  1070.         More? dir *.txt) > filelist
  1071.         [c:\]
  1072.  
  1073.  
  1074. ΓòÉΓòÉΓòÉ 6.12. Escape Character ΓòÉΓòÉΓòÉ
  1075.  
  1076. 4OS2 recognizes a user-definable escape character.  This character gives the 
  1077. following character a special meaning; it is not the same as the ASCII ESC that 
  1078. is often used in ANSI and printer control sequences. 
  1079.  
  1080. The default escape character is a caret [^]. 
  1081.  
  1082. If you don't like using the default escape character, you can pick another 
  1083. character using the SETDOS /E command or the EscapeChar directive in your .INI 
  1084. file.  If you plan to share aliases or batch files between 4DOS, 4OS2, and 
  1085. 4DOS/NT, see 4DOS, 4OS2, and 4DOS/NT Compatibility for details about choosing 
  1086. compatible escape characters for two or more products. 
  1087.  
  1088. Eight special characters are recognized when they are preceded by the escape 
  1089. character.  The combination of the escape character and one of these characters 
  1090. is translated to a single character, as shown below.  These are useful for 
  1091. redirecting codes to the printer; ^e is also useful to generate ANSI "escape 
  1092. sequences" in your PROMPT, ECHO, or other output commands; and ^r can be used 
  1093. in keystroke aliases.  The special characters which can follow the escape 
  1094. character are: 
  1095.  
  1096.         b   backspace 
  1097.         c   comma 
  1098.         e   the ASCII ESC character (ASCII 27) 
  1099.         f   form feed 
  1100.         n   line feed 
  1101.         r   carriage return 
  1102.         s   space 
  1103.         t   tab character 
  1104.  
  1105.  If you follow the escape character with any other character, the escape 
  1106.  character is removed and the second character is copied directly to the 
  1107.  command line.  This allows you to suppress the normal meaning of special 
  1108.  characters (such as ? * / \ | " ` > < and &). 
  1109.  
  1110.  For example, to send a form feed followed by the sequence ESC Y to the 
  1111.  printer, you can use this command: 
  1112.  
  1113.           [c:\] echos ^f^eY > prn
  1114.  
  1115.  
  1116. ΓòÉΓòÉΓòÉ 6.13. Critical Errors ΓòÉΓòÉΓòÉ
  1117.  
  1118. OS/2 watches for physical errors during input and output operations.  Physical 
  1119. errors are those due to hardware problems, such as trying to read a floppy disk 
  1120. while the drive door is open. 
  1121.  
  1122. These errors are called critical errors because OS/2, 4OS2, or your application 
  1123. program cannot proceed until the error is resolved. 
  1124.  
  1125. When a critical error occurs, you will see a popup window asking you to choose 
  1126. an error handling option.  The message comes from OS/2, and will typically 
  1127. offer you four choices: 
  1128.  
  1129.         Return error code to program.  Tell the program that the operation 
  1130.         failed.  This option returns an error code to 4OS2 or to the 
  1131.         application program that was running when the error occurred.  4OS2 
  1132.         generally stops the current command when an operation fails. 
  1133.  
  1134.         End program/command/operation.  Choose this option to stop the program 
  1135.         that was running when the error occurred.  Choosing this option after 
  1136.         an error in the 16-bit version of 4OS2 will abort the command, but not 
  1137.         4OS2 itself.  Choosing it after an error in the 32-bit version of 4OS2 
  1138.         will abort both the command and 4OS2. 
  1139.  
  1140.         Retry command or operation.  Choose this option if you have corrected 
  1141.         the problem. 
  1142.  
  1143.         Display help.  Display further information on the error. 
  1144.  
  1145.  
  1146. ΓòÉΓòÉΓòÉ 7. Redirection and Piping ΓòÉΓòÉΓòÉ
  1147.  
  1148. This section covers redirection and piping.  You can use these features to 
  1149. change how 4OS2 and some application programs handle input and output. 
  1150.  
  1151. Internal commands and many external programs get their input from the 
  1152. computer's standard input device and send their output to the standard output 
  1153. device.  Some programs also send special messages to the standard error device. 
  1154. Normally, the keyboard is used for standard input and the video screen for both 
  1155. standard output and standard error.  Redirection and piping allow you to change 
  1156. these assignments temporarily. 
  1157.  
  1158. Redirection 
  1159.  
  1160. Redirection assigns standard input, standard output, and standard error to a 
  1161. device like the printer or serial port, or to a file. 
  1162.  
  1163. Redirection always applies to a specific command, and lasts only for the 
  1164. duration of that command.  When the command is finished, the assignments for 
  1165. standard input, standard output, and standard error revert to whatever they 
  1166. were before the command. 
  1167.  
  1168. Here are the standard redirection options supported by 4OS2 (see below for 
  1169. additional redirection options using numeric file handles): 
  1170.  
  1171.         < filename          To get input from a file or device instead of from 
  1172.                             the keyboard 
  1173.         > filename          Redirect standard output to a file or device 
  1174.         >& filename         Redirect standard output and standard error to a 
  1175.                             file or device 
  1176.         >&> filename        Redirect standard error only to a file or device 
  1177.  
  1178.  To use redirection, place the redirection symbol and filename at the end of 
  1179.  the command line, after the command name and any parameters.  For example, to 
  1180.  redirect the output of the DIR command to a file called DIRLIST, you could use 
  1181.  a command line like this: 
  1182.  
  1183.           [c:\] dir /b *.dat > dirlist
  1184.  
  1185.  You can use both input and output redirection for the same command, if both 
  1186.  are appropriate: 
  1187.  
  1188.           [c:\] sort < dirlist > dirlist.srt
  1189.  
  1190.  If you redirect the output of a single internal command like DIR, the 
  1191.  redirection ends automatically when that command is done.  If you start a 
  1192.  batch file with redirection, all of the batch file's output is redirected, and 
  1193.  redirection ends when the batch file is done.  Similarly, if you use 
  1194.  redirection at the end of a command group, all of the output from the command 
  1195.  group is redirected, and redirection ends when the command group is done. 
  1196.  
  1197.  If you want to append output to the end of an existing file, rather than 
  1198.  creating a new file, replace the first ">" in the output redirection symbol 
  1199.  with ">>" (use >>, >>&, and >>&>). 
  1200.  
  1201.  When output is directed to a file with >, >&, or >&>, if the file already 
  1202.  exists, it will be overwritten.  You can protect existing files by using the 
  1203.  SETDOS /N1 command or the NoClobber directive in the .INI file. 
  1204.  
  1205.  When output is appended to a file with >>, >>&, or >>&>, the file will be 
  1206.  created if it doesn't already exist. Setting NoClobber will also prevent the 
  1207.  creation of a new file. 
  1208.  
  1209.  You can temporarily override the current setting of NoClobber by using an 
  1210.  exclamation mark [!] after the redirection symbol. For example, to redirect 
  1211.  the output of DIR to the file DIROUT, and allow overwriting of any existing 
  1212.  file despite the NoClobber setting: 
  1213.  
  1214.           [c:\] dir >! dirout
  1215.  
  1216.  Redirection is fully nestable.  For example, you can invoke a batch file and 
  1217.  redirect all of its output to a file or device.  Output redirection on a 
  1218.  command within the batch file will take effect for that command only; when the 
  1219.  command is completed, output will revert to the redirected output file or 
  1220.  device in use for the batch file as a whole. 
  1221.  
  1222.  You can use redirection if you need to create a zero-byte file.  To do so, 
  1223.  enter  >filename as a command, with no actual command before the > character. 
  1224.  
  1225.  In addition to the standard redirection options, 4OS2 also supports the OS/2 
  1226.  CMD.EXE syntax: 
  1227.  
  1228.         n>file      Redirect handle n to the named file 
  1229.         n>&m        Redirect handle n to the same place as handle m 
  1230.  
  1231.  [n] and [m] are one-digit file handles between 0 and 9.  You may not put any 
  1232.  spaces between the n and the >, or between the >, &, and m in the second form. 
  1233.  OS/2 interprets "0" as standard input, "1" as standard output, and "2" as 
  1234.  standard error.  Handles 3 to 9 will probably not be useful unless you have an 
  1235.  application which uses those handles for a specific, documented purpose, or 
  1236.  have opened a file with the %@FILEOPEN variable function and the file handle 
  1237.  is between 3 and 9. 
  1238.  
  1239.  Piping 
  1240.  
  1241.  You can create a "pipe" to send the standard output of one command to the 
  1242.  standard input of another command: 
  1243.  
  1244.         command1 | command2             Send the standard output of command1 to 
  1245.                                         the standard input of command2 
  1246.         command1 |& command2            Send the standard output and standard 
  1247.                                         error of command1 to the standard input 
  1248.                                         of command2 
  1249.  
  1250.  For example, to take the output of the SET command (which displays a list of 
  1251.  your environment variables and their values) and pipe it to the SORT utility 
  1252.  to generate a sorted list, you would use the command: 
  1253.  
  1254.           [c:\] set | sort
  1255.  
  1256.  To do the same thing and then pipe the sorted list to the internal LIST 
  1257.  command for full-screen viewing: 
  1258.  
  1259.           [c:\] set | sort | list /s
  1260.  
  1261.  The TEE and Y commands are "pipe fittings" which add more flexibility to 
  1262.  pipes. 
  1263.  
  1264.  Like redirection, pipes are fully nestable.  For example, you can invoke a 
  1265.  batch file and send all of its output to another command with a pipe.  A pipe 
  1266.  on a command within the batch file will take effect for that command only; 
  1267.  when the command is completed, output will revert to the pipe in use for the 
  1268.  batch file as a whole. 
  1269.  
  1270.  4OS2 implements pipes by starting a new process for the receiving program 
  1271.  instead of using temporary files.  The sending and receiving programs run 
  1272.  simultaneously; the sending program writes to the pipe and the receiving 
  1273.  program reads from the pipe.  When the receiving program finishes reading and 
  1274.  processing the piped data, it is ended automatically. 
  1275.  
  1276.  When you use pipes with 4OS2 make sure you think about any possible 
  1277.  consequences that can occur from using a separate process to run the receiving 
  1278.  program. 
  1279.  
  1280.  
  1281. ΓòÉΓòÉΓòÉ 8. File Selection ΓòÉΓòÉΓòÉ
  1282.  
  1283. Most internal commands (like COPY, DIR, etc.) work on a file or a group of 
  1284. files.  Besides typing the exact name of the file you want to work with, you 
  1285. can use several shorthand forms for naming or selecting files. 
  1286.  
  1287. The features explained in this section apply to 4OS2 commands only, and 
  1288. generally can not be used to pass file names to external programs unless those 
  1289. programs were specifically written to support these features. 
  1290.  
  1291. The file selection features are: 
  1292.  
  1293.             Extended Parent Directory Names 
  1294.             Wildcards 
  1295.             Date, Time, and Size Ranges 
  1296.             Multiple Filenames 
  1297.             Include Lists 
  1298.             Executable Extensions 
  1299.  
  1300.  
  1301. ΓòÉΓòÉΓòÉ 8.1. Extended Parent Directory Names ΓòÉΓòÉΓòÉ
  1302.  
  1303. 4OS2 allows you to extend the traditional syntax for naming the parent 
  1304. directory, by adding additional [.] characters.  Each additional [.] represents 
  1305. an additional directory level above the current directory.  For example, 
  1306. .\FILE.DAT refers to a file in the current directory, ..\FILE.DAT refers to a 
  1307. file one level up (in the parent directory), and ...\FILE.DAT refers to a file 
  1308. two levels up (in the parent of the parent directory).  If you are in the 
  1309. C:\DATA\FINANCE\JANUARY directory and want to copy the file LETTERS.DAT from 
  1310. the directory C:\DATA to drive A: 
  1311.  
  1312.         [C:\DATA\FINANCE\JANUARY] copy ...\LETTERS.DAT A:
  1313.  
  1314.  
  1315. ΓòÉΓòÉΓòÉ 8.2. Wildcards ΓòÉΓòÉΓòÉ
  1316.  
  1317. Wildcards let you specify a file or group of files by typing a partial 
  1318. filename.  The appropriate directory is scanned to find all of the files that 
  1319. match the partial name you have specified. 
  1320.  
  1321. There are two wildcard characters, the asterisk [*] and the question mark [?], 
  1322. plus a special method of specifying a range of permissible characters. 
  1323.  
  1324. An asterisk [*] in a filename means "any zero or more characters in this 
  1325. position."  For example, this command will display a list of all files in the 
  1326. current directory: 
  1327.  
  1328.         [c:\] dir *.*
  1329.  
  1330. If you want to see all of the files with a .TXT extension, you could type this: 
  1331.  
  1332.         [c:\] dir *.txt
  1333.  
  1334. If you know that the file you are looking for has a base name that begins with 
  1335. ST and an extension that begins with .D, you can find it this way.  Filenames 
  1336. such as STATE.DAT, STEVEN.DOC, and ST.D will all be displayed: 
  1337.  
  1338.         [c:\] dir st*.d*
  1339.  
  1340. With 4OS2, you can also use the asterisk to match filenames with specific 
  1341. letters somewhere inside the name.  The following example will display any file 
  1342. with a .TXT extension that has the letters AM together anywhere inside its base 
  1343. name.  It will, for example, display AMPLE.TXT, STAMP.TXT, CLAM.TXT, and AM.TXT 
  1344.  
  1345.         [c:\] dir *am*.txt
  1346.  
  1347. A question mark [?] matches any single filename character.  You can put the 
  1348. question mark anywhere in a filename and use as many question marks as you 
  1349. need.  The following example will display files with names like LETTER.DOC and 
  1350. LATTER.DAT, and LITTER.DU : 
  1351.  
  1352.         [c:\] dir l?tter.d??
  1353.  
  1354. The use of an asterisk wildcard before other characters, and of the character 
  1355. ranges discussed below, are enhancements to the standard wildcard syntax, and 
  1356. are not likely to work properly with software other than 4OS2. 
  1357.  
  1358. "Extra" question marks in your wildcard specification are ignored if the file 
  1359. name is shorter than the wildcard specification.  For example, if you have 
  1360. files called LETTER.DOC, LETTER1.DOC, and LETTERA.DOC, this command will 
  1361. display all three names: 
  1362.  
  1363.         [c:\] dir letter?.doc
  1364.  
  1365. The file LETTER.DOC is included in the display because the "extra" question 
  1366. mark at the end of "LETTER? " is ignored when matching the shorter name LETTER. 
  1367.  
  1368. In some cases, the question mark wildcard may be too general.  You can also 
  1369. specify what characters you want to accept (or exclude) in a particular 
  1370. position in the filename by using square brackets. Inside the brackets, you can 
  1371. put the individual acceptable characters or ranges of characters.  For example, 
  1372. if you wanted to match LETTER0.DOC through LETTER9.DOC, you could use this 
  1373. command: 
  1374.  
  1375.         [c:\] dir letter[0-9].doc
  1376.  
  1377. You could find all files that have a vowel as the second letter in their name 
  1378. this way.  This example also demonstrates how to mix the wildcard characters: 
  1379.  
  1380.         [c:\] dir ?[aeiouy]*.*
  1381.  
  1382. You can exclude a group of characters or a range of characters by using an 
  1383. exclamation mark [!] as the first character inside the brackets.  This example 
  1384. displays all filenames that are at least 2 characters long except those which 
  1385. have a vowel as the second letter in their names: 
  1386.  
  1387.         [c:\] dir ?[!aeiouy]*.*
  1388.  
  1389. The next example, which selects files such as AIP, BIP, and TIP but not NIP, 
  1390. demonstrates how you can use multiple ranges inside the brackets.  It will 
  1391. accept a file that begins with an A, B, C, D, T, U, or V: 
  1392.  
  1393.         [c:\] dir [a-dt-v]ip
  1394.  
  1395. You may use a question mark character inside the brackets, but its meaning is 
  1396. slightly different than a normal (unbracketed) question mark wildcard.  A 
  1397. normal question mark wildcard matches any character, but will be ignored when 
  1398. matching a name shorter than the wildcard specification, as described above.  A 
  1399. question mark inside brackets will match any character, but will not be 
  1400. discarded when matching shorter filenames.  For example: 
  1401.  
  1402.         [c:\] dir letter[?].doc
  1403.  
  1404. will display LETTER1.DOC and LETTERA.DOC, but not LETTER.DOC. 
  1405.  
  1406. A pair of brackets with no characters between them [], or an exclamation point 
  1407. and question mark together [!?], will match only if there is no character in 
  1408. that position.  For example, 
  1409.  
  1410.         [c:\] dir letter[].doc
  1411.  
  1412. will not display LETTER1.DOC or LETTERA.DOC, but will display LETTER.DOC.  This 
  1413. is most useful for commands like 
  1414.  
  1415.         [c:\] dir /I"[]" *.btm
  1416.  
  1417. which will display a list of all .BTM files which don't have a description. 
  1418.  
  1419. You can repeat any of the wildcard characters in any combination you desire 
  1420. within a single file name.  For example, the following command lists all files 
  1421. which have an A, B, or C as the third character, followed by zero or more 
  1422. additional characters, followed by a D, E, or F, followed optionally by some 
  1423. additional characters, and with an extension beginning with P or Q.  You 
  1424. probably won't need to do anything this complex, but we've included it to show 
  1425. you the flexibility of extended wildcards: 
  1426.  
  1427.         [c:\] dir ??[abc]*[def]*.[pq]*
  1428.  
  1429. You can also use the square bracket wildcard syntax to work around a conflict 
  1430. between HPFS filenames containing semicolons [;], and the use of a semicolon to 
  1431. indicate an include list. For example, if you have a file on an HPFS drive 
  1432. named C:\DATA\LETTER1;V2 and you enter this command: 
  1433.  
  1434.         [c:\] del \data\letter1;v2
  1435.  
  1436. you will not get the results you expect.  Instead of deleting the named file, 
  1437. 4OS2 will attempt to delete LETTER1 and then V2, because the semicolon 
  1438. indicates an include list.  However if you use square brackets around the 
  1439. semicolon it will be interpreted as a filename character, and not as an include 
  1440. list separator.  For example, this command would delete C:\DATA\LETTER1;V2 : 
  1441.  
  1442.         [c:\] del \data\letter1[;]v2
  1443.  
  1444.  
  1445. ΓòÉΓòÉΓòÉ 8.3. Date, Time, and Size Ranges ΓòÉΓòÉΓòÉ
  1446.  
  1447. Most internal commands which accept wild cards also allow date, time, and size 
  1448. ranges to further define the files that you wish to work with.  4OS2 will 
  1449. examine the files' timestamps (which record when the file was last modified), 
  1450. and the files' sizes, to determine which files meet the range criteria that you 
  1451. specify. 
  1452.  
  1453. A range begins with the switch character (/), followed by a left square bracket 
  1454. ("[") and a character that specifies the range type:  "s" for a size range, "d" 
  1455. for a date range, or "t" for a time range.  The "s", "d", or "t" is followed by 
  1456. a start value, and an optional comma and end value.  The range ends with a 
  1457. right square bracket ("]"). 
  1458.  
  1459. See the individual range types for details on specifying ranges: 
  1460.  
  1461.             Size Ranges 
  1462.             Date Ranges 
  1463.             Time Ranges 
  1464.  
  1465.  Using Ranges 
  1466.  
  1467.  If you combine two types of ranges, a file must satisfy both ranges to be 
  1468.  included.  For example, /[d2-8-95,2-9-95] /[s1024,2048] means files last 
  1469.  modified between February 8 and February 9, 1995, which are also between 1,024 
  1470.  and 2,048 bytes long. 
  1471.  
  1472.  When you use a date, time, or size range in a command, it should immediately 
  1473.  follow the command name.  Unlike some command switches which apply to only 
  1474.  part of the command line, the range usually applies to all file names 
  1475.  specified for the command.  Any exceptions are noted in the descriptions of 
  1476.  individual commands. 
  1477.  
  1478.  For example, to get a directory of all the *.C files dated October 1, 1994, 
  1479.  you could use this command: 
  1480.  
  1481.           [c:\] dir /[d10-1-94,+0] *.c
  1482.  
  1483.  To delete all of the 0-byte files on your hard disk, you could use this 
  1484.  command: 
  1485.  
  1486.           [c:\] del /[s0,0] *.* /s
  1487.  
  1488.  And to copy all of the non-zero byte files that you changed yesterday or today 
  1489.  to your floppy disk, you can use this command: 
  1490.  
  1491.           [c:\] copy /[d-1] /[s1] *.* a:
  1492.  
  1493.  The HPFS file system maintains 3 sets of dates and times for each file: 
  1494.  creation, last access, and last modification.  By default, date and time 
  1495.  ranges work with the last modification time stamp. You can use the "last 
  1496.  access" (a) or "created" (c) time stamp in a date or time range with the 
  1497.  syntax: 
  1498.  
  1499.           /[da...]  or  /[dc...]  or  /[ta...]  or  /[tc...]
  1500.  
  1501.  For example, to select files that were last accessed yesterday or today: 
  1502.  
  1503.           /[da-1]
  1504.  
  1505.  Date, time, and size ranges can be used with the ATTRIB, COPY, DEL, DESCRIBE, 
  1506.  DIR, EXCEPT, FFIND, FOR, LIST, MOVE, RD, REN, SELECT, and TYPE commands.  They 
  1507.  cannot be used with filename completion or in filename arguments for variable 
  1508.  functions. 
  1509.  
  1510.  
  1511. ΓòÉΓòÉΓòÉ 8.3.1. Size Ranges ΓòÉΓòÉΓòÉ
  1512.  
  1513. Size ranges simply select files whose size is between the limits given.  For 
  1514. example, /[s10000,20000] selects files between 10,000 and 20,000 bytes long. 
  1515.  
  1516. Either or both values in a size range can end with "k" to indicate thousands of 
  1517. bytes, "K" to indicate kilobytes (1,024 bytes), "m" to indicate millions of 
  1518. bytes, or "M" to indicate megabytes (1,048,576 bytes).  For example, the range 
  1519. above could be rewritten as /[s10k,20k]. 
  1520.  
  1521. All ranges are inclusive.  Both examples above will match files that are 
  1522. exactly 10,000 bytes and 20,000 bytes long, as well as all sizes in between. 
  1523.  
  1524. The second argument of a size range is optional.  If you use a single argument, 
  1525. like /[s10k], you will select files of that size or larger.  You can also 
  1526. precede the second argument with a plus sign [+]; when you do, it is added to 
  1527. the first value to determine the largest file size to include in the search. 
  1528. For example,  /[s10k,+1k] select files from 10,000 through 11,000 bytes in 
  1529. size. 
  1530.  
  1531. Some further examples of size ranges: 
  1532.  
  1533.         Specification       Selects Files
  1534.  
  1535.         /[s0,0]             of length zero (empty)
  1536.         /[s1M]              1 megabyte or more in length
  1537.         /[s10k,+200]        between 10,000 and 10,200 bytes
  1538.  
  1539.  
  1540. ΓòÉΓòÉΓòÉ 8.3.2. Date Ranges ΓòÉΓòÉΓòÉ
  1541.  
  1542. Date ranges select files that were created or last modified at any time between 
  1543. the two dates.  For example, /[d12-1-94,12-5-94] selects files that were last 
  1544. modified between December 1, 1994, and December 5, 1994. 
  1545.  
  1546. The time for the starting date defaults to 00:00:00 and the time for the ending 
  1547. date defaults to 23:59:59.  You can alter these defaults, if you wish, by 
  1548. including a start and stop time inside the date range.  The time is separated 
  1549. from the date with an at sign [@].  For example, the range 
  1550. /[d7-1-95@8:00a,7-3-95@6:00p] selects files that were modified at any time 
  1551. between 8:00 am on July 1, 1995 and 6:00 pm on July 3, 1995.  If you prefer, 
  1552. you can specify the times in 24-hour format (e.g., @18:00 for the end time in 
  1553. the previous example). 
  1554.  
  1555. If you omit the second argument in a date range, 4OS2 substitutes the current 
  1556. date and time.  For example, /[d10-1-94] selects files dated between October 1, 
  1557. 1994 and today. 
  1558.  
  1559. You can use an offset value for either the beginning or ending date, or both. 
  1560. An offset begins with a plus sign [+] or a minus sign [-] followed by an 
  1561. integer.  If you use an offset for the second value, it is calculated relative 
  1562. to the first.  If you use an offset for the first (or only) value, the current 
  1563. date is used as the basis for calculation.  For example: 
  1564.  
  1565.         Specification       Selects Files
  1566.  
  1567.         /[d10-27-94,+3]     modified between 10-27-94 and 10-30-94
  1568.         /[d10-27-94,-3]     modified between 10-24-94 and 10-27-94
  1569.         /[d-0]              modified today (from today minus zero days, to today)
  1570.         /[d-1]              modified yesterday or today (from today minus one day,
  1571.                             to today)
  1572.         /[d-1,+0]           modified yesterday (from today minus one day, to zero
  1573.                             days after that)
  1574.  
  1575. You cannot use offsets in the time portion of a date range (the part after an 
  1576. at sign), but you can combine a time with a date offset.  For example, 
  1577. /[d12-8-94@12:00,+2@12:00] selects files that were last modified between noon 
  1578. on December 8 and noon on December 10, 1994.  Similarly, /[d-2@15:00,+1] 
  1579. selects files last modified between 3:00 pm the day before yesterday and the 
  1580. end of the day one day after that, i.e., yesterday.  The second time defaults 
  1581. to the end of the day because no time is given. 
  1582.  
  1583. The HPFS file system maintains 3 sets of dates and times for each file: 
  1584. creation, last access, and last modification.  By default, date ranges work 
  1585. with the last modification date/time stamp.  You can use the "last access" (a) 
  1586. or "created" (c) date/time stamp in a date range with the syntax: 
  1587.  
  1588.         /[da...]  or  /[dc...]
  1589.  
  1590. For example, to select files that were last accessed yesterday or today: 
  1591.  
  1592.         /[da-1]
  1593.  
  1594.  
  1595. ΓòÉΓòÉΓòÉ 8.3.3. Time Ranges ΓòÉΓòÉΓòÉ
  1596.  
  1597. A time range specifies a file modification time without reference to the date. 
  1598. For example, to select files modified between noon and 2:00 pm on any date, use 
  1599. /[t12:00p,2:00p].  The times in a time range can either be in 12-hour format, 
  1600. with a trailing "a" for AM or "p" for PM, or in 24-hour format. 
  1601.  
  1602. If you omit the second argument in a time range, you will select files that 
  1603. were modified between the first time and the current time, on any date.  You 
  1604. can also use offsets, beginning with a plus sign [+] or a minus sign [-] for 
  1605. either or both of the arguments in a time range.  The offset values are 
  1606. interpreted as minutes.  Some examples: 
  1607.  
  1608.         Specification       Selects Files
  1609.  
  1610.         /[t12:00p,+120]     modified between noon and 2:00 PM on any date
  1611.         /[t-120,+120]       modified between two hours ago and the
  1612.                             current time on any date
  1613.         /[t0:00,11:59]      modified in the morning on any date
  1614. The HPFS file system maintains 3 sets of date and time for each file: creation, 
  1615. last access, and last modification.  By default, time ranges work with the last 
  1616. modification time stamp.  You can use the "last access" (a) or "created" (c) 
  1617. time stamp in a time range with the syntax: 
  1618.  
  1619.         /[ta...]  or  /[tc...]
  1620.  
  1621.  
  1622. ΓòÉΓòÉΓòÉ 8.4. Multiple Filenames ΓòÉΓòÉΓòÉ
  1623.  
  1624. Most file processing commands can work with multiple files at one time.  To use 
  1625. multiple file names, you simply list the files one after another on the command 
  1626. line, separated by spaces.  You can use wildcards in any or all of the 
  1627. filenames.  For example, to copy all .TXT and .DOC files from the current 
  1628. directory to drive A, you could use this command: 
  1629.  
  1630.         [c:\] copy *.txt *.doc a:
  1631.  
  1632. If the files you want to work with are not in the default directory, you must 
  1633. include the full path with each filename: 
  1634.  
  1635.         [c:\] copy a:\details\file1.txt a:\details\file1.doc c:
  1636.  
  1637. Multiple filenames are handy when you want to match a group of files which 
  1638. cannot be defined with a single filename and wildcards.  They let you be very 
  1639. specific about which files you want to work with in a command. 
  1640.  
  1641. When you use multiple filenames with a command that expects both a source and a 
  1642. destination, like COPY or MOVE, be sure that you always include a specific 
  1643. destination on the command line.  If you don't, the command will assume that 
  1644. the last filename is the destination and may overwrite important files. 
  1645.  
  1646. Like extended wildcards and include lists, the multiple filename feature will 
  1647. work with internal commands but not with external programs, unless those 
  1648. programs have been written to handle multiple file names on the command line. 
  1649.  
  1650. If you have a list of files to process that's too long to put on the command 
  1651. line or too time-consuming to type, see the SELECT command for another way of 
  1652. passing multiple file names to a command. 
  1653.  
  1654.  
  1655. ΓòÉΓòÉΓòÉ 8.5. Include Lists ΓòÉΓòÉΓòÉ
  1656.  
  1657. Any internal command that accepts multiple filenames will also accept one or 
  1658. more include lists.  An include list is simply a group of filenames, with or 
  1659. without wildcards, separated by semicolons [;].  All files in the include list 
  1660. must be in the same directory.  You may not add a space on either side of the 
  1661. semicolon. 
  1662.  
  1663. For example, you can shorten this command which uses multiple file names: 
  1664.  
  1665.         c:\> copy a:\details\file1.txt a:\details\file1.doc c:
  1666.  
  1667. to this using an include list: 
  1668.  
  1669.         c:\> copy a:\details\file1.txt;file1.doc c:
  1670.  
  1671. Multiple filenames and include lists are processed differently by the DIR and 
  1672. SELECT commands. If you use multiple filenames, all of the files matching the 
  1673. first filename are processed, then all of the files matching the second name, 
  1674. and so on.  When you use an include list, all files that match any entry in the 
  1675. include list are processed together, and will appear together in the directory 
  1676. display or SELECT list.  You can see this difference clearly if you experiment 
  1677. with both techniques and the DIR command.  For example, 
  1678.  
  1679.         [c:\] dir *.txt *.doc
  1680.  
  1681. will list all the .TXT files with a directory header, the file list, and a 
  1682. summary of the total number of files and bytes used.  Then it will do the same 
  1683. for the .DOC files.  However, 
  1684.  
  1685.         [c:\] dir *.txt;*.doc
  1686.  
  1687. will display all the files in one list. 
  1688.  
  1689. Like extended wildcards and multiple filenames, the include list feature will 
  1690. work with internal commands, but not with external programs (unless they have 
  1691. been programmed especially to support it). 
  1692.  
  1693.  
  1694. ΓòÉΓòÉΓòÉ 8.6. Executable Extensions ΓòÉΓòÉΓòÉ
  1695.  
  1696.  The syntax for creating an executable extension is: 
  1697.  
  1698.         set .ext=command [options]
  1699.  
  1700. This tells 4OS2 to run the specified command whenever you name a file with the 
  1701. extension .ext at the prompt. 
  1702.  
  1703. .EXT is the executable file extension; command is the name of the internal 
  1704. command, external program, alias, or batch file to run; and [options] are any 
  1705. command-line startup options you want to specify for the program, batch file, 
  1706. or alias. 
  1707.  
  1708. Normally, when you type a filename (as opposed to an alias or internal command 
  1709. name) as the first word on the command line, 4OS2 looks for a file with that 
  1710. name to execute.  The file's extension may be .EXE or .COM to indicate that it 
  1711. contains a program, it may have a batch file extension like .BTM, or the file's 
  1712. contents may indicate that it is executable. 
  1713.  
  1714. You can add to this default list of extensions, and have 4OS2 take the action 
  1715. you want with files that are not executable programs or batch files.  The 
  1716. action taken is always based on the file's extension.  For example, you could 
  1717. start your text editor whenever you type the name of a .DOC file, or start your 
  1718. database manager whenever you type the name of a .DAT file. 
  1719.  
  1720. Environment variables define the internal command, external program, batch 
  1721. file, or alias to run for each defined file extension.  To create an executable 
  1722. extension, use the SET command to create a new environment variable.  An 
  1723. environment variable is recognized as an executable extension if its name 
  1724. begins with a period. 
  1725.  
  1726. For example, if you want to run a word processor called EDITOR whenever you 
  1727. type the name of a file that has an extension of .EDT, you could use this 
  1728. command: 
  1729.  
  1730.         [c:\] set .edt=c:\edit\editor.exe
  1731.  
  1732. If the command specified in an executable extension is a batch file or external 
  1733. program, 4OS2 will search the PATH for it if necessary.  However, you can make 
  1734. sure that the correct program or batch file is used, and speed up the 
  1735. executable extension, by specifying the full name including drive, path, 
  1736. filename, and extension. 
  1737.  
  1738. Once an executable extension is defined, any time you name a file with that 
  1739. extension the corresponding program, batch file, or alias is started, with the 
  1740. name of your file passed to it as a parameter. 
  1741.  
  1742. The following example defines QBASIC.EXE as the processor for .BAS files: 
  1743.  
  1744.         [c:\] set .bas=c:\dos\qbasic.exe /run
  1745.  
  1746. With this definition, if you have a file named PUSHCART.BAS in the current 
  1747. directory and enter the command: 
  1748.  
  1749.         [c:\] pushcart
  1750.  
  1751. 4OS2 will execute the command: 
  1752.  
  1753.         c:\dos\qbasic.exe /run pushcart.bas
  1754.  
  1755. The next example defines B.EXE (the Brief text editor) as the processor for .C 
  1756. files: 
  1757.  
  1758.         [c:\] set .c=c:\brief\b.exe -Mxyz
  1759.  
  1760. Now, if you have a file called HELLO.C and enter the command 
  1761.  
  1762.         [c:\] hello -i30
  1763.  
  1764. This will be expanded to: 
  1765.  
  1766.         c:\brief\b.exe -Mxyz hello.c -i30
  1767.  
  1768. Notice that the text from the .C environment variable is inserted at the 
  1769. beginning of the line, including any options, followed by the original file 
  1770. name plus its extension, and then the remainder of the original command line. 
  1771.  
  1772. In order for executable extensions to work, the command, program, batch file, 
  1773. or alias must be able to interpret the command line properly.  For example, if 
  1774. a program you want to run doesn't accept a file name on its command line as 
  1775. shown in these examples, then executable extensions won't work with that 
  1776. program. 
  1777.  
  1778. Executable extensions may include wildcards, so you could, for example, run 
  1779. your text editor for any file with an extension beginning with T by defining an 
  1780. executable extension called .T*.  Extended wildcards (e.g., DO[CT] for .DOC and 
  1781. .DOT files) may also be used. 
  1782.  
  1783.  
  1784. ΓòÉΓòÉΓòÉ 9. Batch Files ΓòÉΓòÉΓòÉ
  1785.  
  1786. A batch file is a file that contains a list of commands to execute.  4OS2 reads 
  1787. and interprets each line as if it had been typed at the keyboard.  Like 
  1788. aliases, batch files are handy for automating computing tasks.  Unlike aliases, 
  1789. batch files can be as long as you wish.  Batch files take up separate disk 
  1790. space for each file, and can't usually execute quite as quickly as aliases, 
  1791. since they must be read from the disk. 
  1792.  
  1793. The topics included in this section are: 
  1794.  
  1795.             .BAT, .CMD, and .BTM Files 
  1796.             Echoing in Batch Files 
  1797.             Batch File Line Continuation 
  1798.             Batch File Parameters 
  1799.             Automatic Batch Files 
  1800.             Detecting 4OS2 
  1801.             Batch File Compression 
  1802.             Argument Quoting 
  1803.             4DOS, 4OS2, and 4DOS/NT Compatibility 
  1804.             REXX Support 
  1805.             EXTPROC Support 
  1806.  
  1807.  
  1808. ΓòÉΓòÉΓòÉ 9.1. .BAT, .CMD, and .BTM Files ΓòÉΓòÉΓòÉ
  1809.  
  1810. A batch file can run in two different modes.  In the first, traditional mode, 
  1811. each line of the batch file is read and executed individually.  In the second 
  1812. mode, the entire batch file is read into memory at once.  The second mode can 
  1813. be 5 to 10 times faster, especially if most of the commands in the batch file 
  1814. are internal commands.  However, only the first mode can be used for 
  1815. self-modifying batch files (which are rare), and for batch files larger than 
  1816. 64K bytes. 
  1817.  
  1818. The batch file's extension determines its mode.  Files with a .CMD extension 
  1819. are run in the slower, traditional mode.  Files with a .BTM extension are run 
  1820. in the faster, more efficient mode.  You can change the execution mode inside a 
  1821. batch file with the LOADBTM command. 
  1822.  
  1823.  
  1824. ΓòÉΓòÉΓòÉ 9.2. Echoing in Batch Files ΓòÉΓòÉΓòÉ
  1825.  
  1826. By default, each line in a batch file is displayed or "echoed" as it is 
  1827. executed.  You can change this behavior, if you want, in several different 
  1828. ways: 
  1829.  
  1830.         Any batch file line that begins with an [@] symbol will not be 
  1831.         displayed. 
  1832.  
  1833.         The display can be turned off and on within a batch file with the ECHO 
  1834.         OFF and ECHO ON commands. 
  1835.  
  1836.         The default setting can be changed with the SETDOS /V command or the 
  1837.         BatchEcho directive in the .INI file. 
  1838.  
  1839.  For example, the following line turns off echoing inside a batch file.  The 
  1840.  [@] symbol keeps the batch file from displaying the ECHO OFF command: 
  1841.  
  1842.           @echo off
  1843.  
  1844.  4OS2 also has a command line echo that is unrelated to the batch file echo 
  1845.  setting.  See ECHO for details about both settings. 
  1846.  
  1847.  
  1848. ΓòÉΓòÉΓòÉ 9.3. Batch File Line Continuation ΓòÉΓòÉΓòÉ
  1849.  
  1850. 4OS2 will combine multiple lines in the batch file into a single line for 
  1851. processing when you include the escape character as the very last character of 
  1852. each line to be combined (except the last). The default escape character is the 
  1853. caret [^].  For example: 
  1854.  
  1855.         echo The quick brown fox jumped over the lazy^
  1856.         sleeping^
  1857.         dog. > alphabet
  1858.  
  1859. You cannot use this technique to extend a batch file line beyond the normal 
  1860. line length limit of 1,023 characters. 
  1861.  
  1862.  
  1863. ΓòÉΓòÉΓòÉ 9.4. Batch File Parameters ΓòÉΓòÉΓòÉ
  1864.  
  1865. Like aliases and application programs, batch files can examine the command line 
  1866. that is used to invoke them.  The command tail (everything on the command line 
  1867. after the batch file name) is separated into individual parameters (also called 
  1868. arguments or batch variables) by scanning for the spaces, tabs, and commas that 
  1869. separate the parameters.  A batch file can work with the individual parameters 
  1870. or with the command tail as a whole. 
  1871.  
  1872. These parameters are numbered from %1 to %127.  %1 refers to the first 
  1873. parameter on the command line, %2 to the second, and so on.  It is up to the 
  1874. batch file to determine the meaning of each parameter.  You can use quotation 
  1875. marks to pass spaces, tabs, commas, and other special characters in a batch 
  1876. file parameter; see Argument Quoting for details. 
  1877.  
  1878. Parameters that are referred to in a batch file, but which are missing on the 
  1879. command line, appear as empty strings inside the batch file.  For example, if 
  1880. you start a batch file and put two parameters on the command line, any 
  1881. reference in the batch file to %3, or any higher-numbered parameter, will be 
  1882. interpreted as an empty string. 
  1883.  
  1884. A batch file can also work with three special parameters:  %0 contains the name 
  1885. of the batch file as it was entered on the command line, %# contains the number 
  1886. of command line arguments, and %n$ contains the complete command-line tail 
  1887. starting with argument number "n" (for example, %3$ means the third parameter 
  1888. and all those after it).  The default value of "n" is 1, so %$ contains the 
  1889. entire command tail.  The values of these special parameters will change if you 
  1890. use the SHIFT command. 
  1891.  
  1892. By default, 4DOS uses an ampersand [&] instead of a dollar sign [$] to indicate 
  1893. the remainder of the command tail.  For example, %& means all the parameters, 
  1894. and %2& means the second parameter and all those after it.  If you want to 
  1895. share batch files or aliases between 4DOS and 4OS2, you can select a new 
  1896. character for any product with the SETDOS /P command or the ParameterChar 
  1897. directive in your .INI file. 
  1898.  
  1899. For example, if your batch file interprets the first argument as a subdirectory 
  1900. name then the following line would move to the specified directory: 
  1901.  
  1902.         cd %1
  1903.  
  1904. Batch files can also use environment variables, internal variables, and 
  1905. variable functions. 
  1906.  
  1907.  
  1908. ΓòÉΓòÉΓòÉ 9.5. Automatic Batch Files ΓòÉΓòÉΓòÉ
  1909.  
  1910. Each time 4OS2 starts as either a primary or a secondary shell, it looks for an 
  1911. automatic batch file called 4START.BTM or 4START.CMD.  If the 4START batch file 
  1912. is not in the same directory as 4OS2 itself, you should use the 4StartPath 
  1913. directive in your .INI file to specify its location.  4START is optional, so 
  1914. 4OS2 will not display an error message if it cannot find the file. 
  1915.  
  1916. Whenever a 4OS2 shell ends, it runs a third automatic batch file called 
  1917. 4EXIT.BTM, 4EXIT.CMD.  This file, if you use it, should be in the same 
  1918. directory as your 4START batch file.  Like 4START, 4EXIT is optional.  It is 
  1919. not necessary in most circumstances, but it is a convenient place to put 
  1920. commands to save information such as a history list before a shell ends, or LOG 
  1921. the end of the shell. 
  1922.  
  1923.  
  1924. ΓòÉΓòÉΓòÉ 9.6. Detecting 4OS2 ΓòÉΓòÉΓòÉ
  1925.  
  1926. From a batch file, you can determine if 4OS2 is loaded by testing for the 
  1927. variable function @EVAL, with a test like this: 
  1928.  
  1929.         if "%@eval[2+2]" == "4" echo 4OS2 is loaded!
  1930.  
  1931. This test can never succeed in CMD.EXE. Other variable functions could be used 
  1932. for the same purpose. 
  1933.  
  1934.  
  1935. ΓòÉΓòÉΓòÉ 9.7. Batch File Compression ΓòÉΓòÉΓòÉ
  1936.  
  1937. You can compress your .BTM files with a program called BATCOMP.EXE, which is 
  1938. distributed with 4OS2.  This program condenses batch files by about a third and 
  1939. makes them unreadable with the LIST command and similar utilities.  Compressed 
  1940. batch files run at approximately the same speed as regular .BTM files. 
  1941.  
  1942. You may want to consider compressing batch files if you need to distribute them 
  1943. to others and keep your original code secret or prevent your users from 
  1944. altering them.  You may also want to consider compressing batch files to save 
  1945. some disk space on the systems where the compressed files are used. 
  1946.  
  1947. The full syntax for the batch compression program is 
  1948.  
  1949.         BATCOMP [/O] input file [output file ]
  1950.  
  1951. You must specify the full name of the input file, including its extension, on 
  1952. the BATCOMP command line.  If you do not specify the output file, BATCOMP will 
  1953. use the same base name as the input file and add a .BTM extension.  BATCOMP 
  1954. will also add a .BTM extension if you specify a base name for the output file 
  1955. without an extension.  For example, to compress MYBATCH.CMD and save the result 
  1956. as MYBATCH.BTM, you can use any of these three commands: 
  1957.  
  1958.         [c:\] batcomp mybatch.cmd
  1959.         [c:\] batcomp mybatch.cmd mybatch
  1960.         [c:\] batcomp mybatch.cmd mybatch.btm
  1961.  
  1962. If the output file (MYBATCH.BTM in the examples above) already exists, BATCOMP 
  1963. will prompt you before overwriting the file.  You can disable the prompt by 
  1964. including /O on the BATCOMP command line immediately before the input file 
  1965. name.  Even if you use the /O option, BATCOMP will not compress a file into 
  1966. itself. 
  1967.  
  1968. JP Software does not provide a decompression utility to uncompress batch files. 
  1969. If you use BATCOMP.EXE, make sure that you also keep a copy of the original 
  1970. batch file for future inspection or modification. 
  1971.  
  1972. Each of our command processors includes its own version of BATCOMP.EXE, set up 
  1973. to run under the corresponding operating system. However, the output produced 
  1974. by each program is the same, so a batch file compressed with any version of 
  1975. BATCOMP can be used with any JP Software command processor. 
  1976.  
  1977. If you plan to distribute batch files to users of different platforms, see 
  1978. 4DOS, 4OS2, and 4DOS/NT Compatibility. 
  1979.  
  1980.  
  1981. ΓòÉΓòÉΓòÉ 9.8. Argument Quoting ΓòÉΓòÉΓòÉ
  1982.  
  1983. As it parses the command line, 4OS2 looks for the ampersand [&] command 
  1984. separator, conditional commands (|| or &&), white space (spaces, tabs, and 
  1985. commas), percent signs [%] which indicate variables to be expanded, and 
  1986. redirection and piping characters (>, <, or |). 
  1987.  
  1988. Normally, these special characters cannot be passed to a command as part of an 
  1989. argument.  However, you can include any of the special characters in an 
  1990. argument by enclosing the entire argument in single back quotes [`] or double 
  1991. quotes ["].  Although both back quotes and double quotes will let you build 
  1992. arguments that include special characters, they do not work the same way. 
  1993.  
  1994. No alias or variable expansion is performed on an argument enclosed in back 
  1995. quotes.  Redirection symbols inside the back quotes are ignored.  The back 
  1996. quotes are removed from the command line before the command is executed. 
  1997.  
  1998. No alias expansion is performed on expressions enclosed in double quotes. 
  1999. Redirection symbols inside double quotes are ignored. However, variable 
  2000. expansion is performed on expressions inside double quotes.  The double quotes 
  2001. themselves will be passed to the command as part of the argument. 
  2002.  
  2003. For example, suppose you have a batch file CHKNAME.BTM which expects a name as 
  2004. its first parameter (%1).  Normally the name is a single word.  If you need to 
  2005. pass a two-word name with a space in it to this batch file you could use the 
  2006. command: 
  2007.  
  2008.         [c:\] chkname `MY NAME`
  2009.  
  2010. Inside the batch file, %1 will have the value MY NAME, including the space. 
  2011. The back quotes caused 4OS2 to pass the string to the batch file as a single 
  2012. argument.  The quotes keep characters together and reduce the number of 
  2013. arguments in the line. 
  2014.  
  2015. When an alias is defined in a batch file or from the command line, its argument 
  2016. can be enclosed in back quotes to prevent the expansion of replaceable 
  2017. parameters, variables, and multiple commands until the alias is invoked.  See 
  2018. ALIAS for details. 
  2019.  
  2020. You can disable and re-enable back quotes and double quotes with the SETDOS /X 
  2021. command. 
  2022.  
  2023.  
  2024. ΓòÉΓòÉΓòÉ 9.9. 4DOS, 4OS2, and 4DOS/NT Compatibility ΓòÉΓòÉΓòÉ
  2025.  
  2026. If you use two or more of our products, or if you want to share aliases and 
  2027. batch files with users of different products, you need to be aware of the 
  2028. differences in three important characters:  the Command Separator (see Multiple 
  2029. Commands), the Escape Character (see Escape Character), and the Parameter 
  2030. Character (see Batch File Parameters). 
  2031.  
  2032. The default values of each of these characters in each product is shown in the 
  2033. following chart (in this section, <Ctrl-X> stands for the ASCII Ctrl-X 
  2034. character, numeric value 24.  This character appears on your screen as an 
  2035. up-arrow [].): 
  2036.  
  2037.         Character           4DOS Default   4OS2 and 4NT Default
  2038.  
  2039.         Command Separator        ^              &
  2040.         Escape Character         <Ctrl-X>       ^
  2041.         Parameter Character      &              $
  2042.  
  2043. [JP Software's graphical command processors (Take Command/16 for Windows 3.x, 
  2044. Take Command/32 for Windows NT and Windows 95, and Take Command for OS/2) use 
  2045. the same default characters.  Take Command/16 uses the 4DOS characters, and 
  2046. Take Command/32 and Take Command for OS/2 use the 4OS2 and 4DOS/NT characters.] 
  2047.  
  2048. In your batch files and aliases, and even at the command line, you can smooth 
  2049. over these differences in two ways: 
  2050.  
  2051.         *   Select a consistent set of characters with .INI file configuration 
  2052.             directives or the SETDOS command.  For example, to set the 4OS2 
  2053.             characters to match 4DOS, use: 
  2054.  
  2055.                                 CommandSep = ^
  2056.                                 EscapeChar = <Ctrl-X>
  2057.                                 ParameterChar = &
  2058.  
  2059.             in 4OS2.INI. 
  2060.  
  2061.         *   Use internal variables that contain the current special character, 
  2062.             rather than using the character itself (see + and =).  For example, 
  2063.             this command: 
  2064.  
  2065.                                 if "%1" == "" (echo Argument missing! ^ quit)
  2066.  
  2067.             will only work if the command separator is a caret. However, this 
  2068.             version works regardless of the current command separator: 
  2069.  
  2070.                                 if "%1" == "" (echo Argument missing! %+ quit)
  2071.  
  2072.  
  2073.  The following chart shows the correspondence between the appropriate SETDOS 
  2074.  command options, .INI file directives, and internal variables: 
  2075.  
  2076.           Special                 SETDOS   INI File     Internal
  2077.           Character               Switch   Directive    Variable
  2078.  
  2079.           Command Separator        /C      CommandSep     %+
  2080.           Escape Character         /E      EscapeChar     %=
  2081.           Parameter Character      /P      ParameterChar  (none)
  2082.  
  2083.  
  2084. ΓòÉΓòÉΓòÉ 9.10. REXX Support ΓòÉΓòÉΓòÉ
  2085.  
  2086. REXX is a a powerful file and text processing language developed by IBM, and 
  2087. available on many PC and other platforms.  REXX is an ideal extension to the 
  2088. 4OS2 batch language, especially if you need advanced string processing 
  2089. capabilities. 
  2090.  
  2091. The REXX language is not built into 4OS2.  Under IBM OS/2 1.3 and above you can 
  2092. use the built-in REXX language provided by IBM, or use Personal REXX for OS/2, 
  2093. developed by Quercus Systems of Saratoga, CA.  (Personal REXX is available from 
  2094. JP Software or directly from Quercus Systems.) 
  2095.  
  2096. REXX programs are stored in .CMD files.  4OS2 checks to see if the first two 
  2097. characters on the first line of a .CMD file are [/*], the beginning of a REXX 
  2098. comment.  If so, it passes the file to OS/2's built-in REXX facility for 
  2099. processing.  If Personal REXX for OS/2 is installed, it automatically replaces 
  2100. OS/2's built-in REXX, and handles all REXX commands passed by 4OS2. 
  2101.  
  2102. Both Personal REXX and OS/2's built-in REXX extend the interface between REXX 
  2103. and 4OS2 by allowing you to invoke 4OS2 commands from within a REXX program. 
  2104. For details, or for more information on any aspect of REXX, see your Personal 
  2105. REXX or OS/2 REXX documentation. 
  2106.  
  2107. You can run additional batch files from within your REXX program. .CMD files 
  2108. can be run by placing the name of the file on a line by itself in single 
  2109. quotes, for example: 
  2110.  
  2111.         `mybatch.cmd`
  2112.  
  2113. .BTM files cannot be run with this method, because the REXX processor does not 
  2114. recognize the .BTM extension (this is not a limitation of 4OS2).  To start a 
  2115. .BTM file from a REXX file, use the CALL command, for example: 
  2116.  
  2117.         `call mybatch.btm`
  2118.  
  2119.  
  2120. ΓòÉΓòÉΓòÉ 9.11. EXTPROC Support ΓòÉΓòÉΓòÉ
  2121.  
  2122. 4OS2 offers an external processor (EXTPROC) option for batch files that lets 
  2123. you define an external program to process a particular .CMD file.  To identify 
  2124. a .CMD file to be used with an external processor, place the string "EXTPROC" 
  2125. as the first word on the first line of the file, followed by the name of the 
  2126. external program that should be called.  4OS2 will start the program and pass 
  2127. it the name of the .CMD file and any command-line arguments that were entered. 
  2128.  
  2129. For example, suppose GETDATA.CMD contains the following lines: 
  2130.  
  2131.         EXTPROC D:\DATAACQ\DATALOAD.EXE
  2132.         OPEN PORT1
  2133.         READ 4000
  2134.         DISKWRITE D:\DATAACQ\PORT1\RAW
  2135.  
  2136. Then if you entered the command: 
  2137.  
  2138.         [d:\dataacq] getdata /p17
  2139.  
  2140. 4OS2 would read the GETDATA.CMD file, determine that it began with an EXTPROC 
  2141. command, read the name of the processor program, and then execute the command: 
  2142.  
  2143.         D:\DATAACQ\DATALOAD.EXE D:\DATAACQ\GETDATA.CMD /p17
  2144.  
  2145. The hypothetical DATALOAD.EXE program would then be responsible for reopening 
  2146. the GETDATA.CMD file, ignoring the EXTPROC line at the start, and interpreting 
  2147. the other instructions in the file. It would also have to respond appropriately 
  2148. to the command-line parameter entered (/p17). 
  2149.  
  2150. Do not try to use 4OS2 as the external processor named on the EXTPROC line in 
  2151. the .CMD file.  It will interpret the EXTPROC line as a command to re-open 
  2152. themselves.  The result will be an infinite loop that will continue until the 
  2153. computer runs out of resources and locks up. 
  2154.  
  2155.  
  2156. ΓòÉΓòÉΓòÉ 10. The Environment ΓòÉΓòÉΓòÉ
  2157.  
  2158. The environment is a collection of information about your computer that every 
  2159. program receives.  Each entry in the environment consists of a variable name, 
  2160. followed by an equal sign and a string of text.  You can automatically 
  2161. substitute the text for the variable name in any command.  To create the 
  2162. substitution, include a percent sign [%] and a variable name on the command 
  2163. line or in an alias or batch file. 
  2164.  
  2165. The following environment variables have special meanings in 4OS2: 
  2166.  
  2167.             CDPATH 
  2168.             CMDLINE 
  2169.             COLORDIR 
  2170.             COMSPEC 
  2171.             PATH 
  2172.             PROMPT 
  2173.  
  2174.  4OS2 also supports two special types of variables.  Internal variables are 
  2175.  similar to environment variables, but are stored internally within 4OS2, and 
  2176.  are not visible in the environment.  They provide information about your 
  2177.  system for use in batch files and aliases.  Variable functions are referenced 
  2178.  like environment variables, but perform additional functions like file 
  2179.  handling, string manipulation and arithmetic calculations. 
  2180.  
  2181.  The SET command is used to create environment variables. For example, you can 
  2182.  create a variable named BACKUP like this: 
  2183.  
  2184.           [c:\] set BACKUP=*.bak;*.bk!;*.bk
  2185.  
  2186.  If you then type 
  2187.  
  2188.           [c:\] del %BACKUP
  2189.  
  2190.  it is equivalent to the following command: 
  2191.  
  2192.           del *.bak;*.bk!;*.bk
  2193.  
  2194.  The variable names you use this way may contain any alphabetic or numeric 
  2195.  characters, the underscore character [_], and the dollar sign [$].  You can 
  2196.  force acceptance of other characters by including the full variable name in 
  2197.  square brackets, like this: %[AB##2].  You can also "nest" environment 
  2198.  variables using square brackets.  For example %[%var1] means "the contents of 
  2199.  the variable whose name is stored in VAR1".  A variable referenced with this 
  2200.  technique cannot contain more than 255 characters of information.  Nested 
  2201.  variable expansion can be disabled with the SETDOS /X command. 
  2202.  
  2203.  In 4OS2 the size of the environment is set automatically, and increased as 
  2204.  needed when you add variables. 
  2205.  
  2206.  The trailing percent sign that was traditionally required for environment 
  2207.  variable names is not usually required in 4OS2, which accept any character 
  2208.  that cannot be part of a variable name as the terminator.  However, the 
  2209.  trailing percent can be used to maintain compatibility. 
  2210.  
  2211.  The trailing percent sign is needed if you want to join two variable values. 
  2212.  The following examples show the possible interactions between variables and 
  2213.  literal strings.  First, create two environment variables called ONE and TWO 
  2214.  this way: 
  2215.  
  2216.           [c:\] set ONE=abcd
  2217.           [c:\] set TWO=efgh
  2218.  
  2219.  Now the following combinations produce the output text shown: 
  2220.  
  2221.           %ONE%TWO            abcdTWO   ("%ONE%" + "TWO")
  2222.           %ONE%TWO%           abcdTWO   ("%ONE%" + "TWO%")
  2223.           %ONE%%TWO           abcdefgh  ("%ONE%" + "%TWO")
  2224.           %ONE%%TWO%          abcdefgh  ("%ONE%" + "%TWO%")
  2225.           %ONE%[TWO]          abcd[TWO] ("%ONE%" + "[TWO]")
  2226.           %ONE%[TWO]%         abcd[TWO] ("%ONE%" + "[TWO]%")
  2227.           %[ONE]%TWO          abcdefgh  ("%[ONE]" + "%TWO")
  2228.           %[ONE]%TWO%         abcdefgh  ("%[ONE]" + "%TWO%")
  2229.  
  2230.  If you want to pass a percent sign to a command, or a string which includes a 
  2231.  percent sign, you must use two percent signs in a row. Otherwise, the single 
  2232.  percent sign will be seen as the beginning of a variable name and will not be 
  2233.  passed on to the command.  For example, to display the string "We're with you 
  2234.  100%" you would use the command: 
  2235.  
  2236.           echo We're with you 100%%
  2237.  
  2238.  You can also use back quotes around the text, rather than a double percent 
  2239.  sign.  See Argument Quoting for details. 
  2240.  
  2241.  
  2242. ΓòÉΓòÉΓòÉ 10.1. CDPATH ΓòÉΓòÉΓòÉ
  2243.  
  2244. CDPATH tells 4OS2 where to search for directories specified by the CD, CDD, and 
  2245. PUSHD commands and in automatic directory changes.  (_CDPATH can be used as an 
  2246. alternative to CDPATH if you are using Microsoft Bookshelf, which uses a CDPATH 
  2247. variable for its own purposes.) 
  2248.  
  2249. CDPATH is composed of a list of directories, separated by semicolons [;].  If 
  2250. CD, CDD, PUSHD, or an automatic directory change can't locate the specified 
  2251. directory to change to, they will append the specified directory name to each 
  2252. directory in CDPATH and attempt to change to that drive and directory, until 
  2253. the first match or the end of the CDPATH argument.  This allows you to use 
  2254. CDPATH as a quick way to find commonly used subdirectories which have unique 
  2255. names.  For example, if you are currently in the directory 
  2256. C:\WP\LETTERS\JANUARY and you'd like to change to D:\SOFTWARE\UTIL, you could 
  2257. enter the command: 
  2258.  
  2259.         [c:\wp\letters\january] cdd d:\software\util
  2260.  
  2261. However, if the D:\SOFTWARE directory is listed in your CDPATH variable, and is 
  2262. the first directory in the list with a UTIL subdirectory, you can simply enter 
  2263. the command 
  2264.  
  2265.         [c:\wp\letters\january] cdd util
  2266.  
  2267. to change to D:\SOFTWARE\UTIL. 
  2268.  
  2269. You can create CDPATH with the SET command.  For example, if you want the 
  2270. directory change commands to search the C:\DATA directory, the D:\SOFTWARE 
  2271. directory, and the root directory of drive E:\ for the subdirectories that you 
  2272. name, you should create CDPATH with this command: 
  2273.  
  2274.         [c:\] set cdpath=c:\data;d:\software;e:\
  2275.  
  2276.  
  2277. ΓòÉΓòÉΓòÉ 10.2. CMDLINE ΓòÉΓòÉΓòÉ
  2278.  
  2279. CMDLINE is the fully expanded text of the currently executing command line. 
  2280. CMDLINE is set just before invoking any .COM, .EXE, .BTM, .BAT, or .CMD file. 
  2281. If a command line is prefaced with an "@" to prevent echoing, it will not be 
  2282. put in CMDLINE, and any previous CMDLINE variable will be removed from the 
  2283. environment. 
  2284.  
  2285.  
  2286. ΓòÉΓòÉΓòÉ 10.3. ┬áCOLORDIR ΓòÉΓòÉΓòÉ
  2287.  
  2288. COLORDIR controls directory display colors used by DIR and SELECT.  See 
  2289. Color-Coded Directories for a complete description of the format of this 
  2290. variable. 
  2291.  
  2292.  
  2293. ΓòÉΓòÉΓòÉ 10.4. COMSPEC ΓòÉΓòÉΓòÉ
  2294.  
  2295. COMSPEC contains the full path and name of 4OS2.  For example, if 4OS2 is 
  2296. stored in the directory C:\4OS2, the COMSPEC variable should be set to 
  2297. C:\4OS2\4OS2.EXE.  COMSPEC is used by applications which need to find 4OS2 to 
  2298. implement a "shell to the command prompt" feature. 
  2299.  
  2300. You can set the COMSPEC variable by specifying the COMSPEC path with a SET 
  2301. COMSPEC command in CONFIG.SYS, or including the COMSPEC path on the 4OS2 
  2302. startup command line. 
  2303.  
  2304.  
  2305. ΓòÉΓòÉΓòÉ 10.5. ┬áPATH ΓòÉΓòÉΓòÉ
  2306.  
  2307. PATH is a list of directories that 4OS2 will search for executable files that 
  2308. aren't in the current directory.  PATH may also be used by some application 
  2309. programs to find their own files. See the PATH command for a full description 
  2310. of this variable. 
  2311.  
  2312.  
  2313. ΓòÉΓòÉΓòÉ 10.6. ┬áPROMPT ΓòÉΓòÉΓòÉ
  2314.  
  2315. PROMPT defines the command-line prompt.  It can be set or changed with the 
  2316. PROMPT command. 
  2317.  
  2318.  
  2319. ΓòÉΓòÉΓòÉ 11. Internal Variables ΓòÉΓòÉΓòÉ
  2320.  
  2321. Internal variables are special variables built into 4OS2 to provide information 
  2322. about your system.  They are not actually stored in the environment, but can be 
  2323. used in commands, aliases, and batch files just like any environment variable. 
  2324. The values of these variables are stored internally in 4OS2, and cannot be 
  2325. changed with the SET, UNSET, or ESET command.  However, you can override any of 
  2326. these variables by defining a new variable with the same name. 
  2327.  
  2328. The list below gives a one-line description of each variable, and a 
  2329. cross-reference which selects a full screen help topic on that variable. Most 
  2330. of the variables are simple enough that the one-line description is sufficient. 
  2331. However, for those variables marked with an asterisk [*], the cross-reference 
  2332. topic contains some additional information you may wish to review.  You can 
  2333. also obtain help on any variable with a HELP variablename command at the prompt 
  2334. (this is why each variable has its own topic, in addition to its appearance in 
  2335. the list below). 
  2336.  
  2337. See the discussion after the variable list for some additional information, and 
  2338. examples of how these variables can be used. 
  2339.  
  2340. The variables are: 
  2341.  
  2342. Hardware status 
  2343.  
  2344.         _CPU            CPU type (86, 186, 200, 386, 486, 586) 
  2345.         _MONITOR        Monitor type (mono or color) 
  2346.         _NDP            Coprocessor type (0, 87, 287, 387) 
  2347.         _VIDEO          Video board type (mono, cga, ega, vga, xga, 8514, or 
  2348.                         IA/A) 
  2349.  
  2350.  Operating system and software status 
  2351.  
  2352.         _ANSI           ANSI status (always 1 in 4OS2) 
  2353.         _BOOT           Boot drive letter, without a colon 
  2354.         _CI             Current cursor shape in insert mode 
  2355.         _CO             Current cursor shape in overstrike mode 
  2356.         _CODEPAGE       Current code page number 
  2357.         _COUNTRY        Current country code 
  2358.         _DOS            * Operating system (DOS, OS2, or NT) 
  2359.         _DOSVER         * Operating system version (2.1, 3.0, etc.) 
  2360.         _KBHIT          Keystroke waiting in buffer (0 or 1) 
  2361.         _MOUSE          Mouse driver flag (always 1 in 4OS2) 
  2362.  
  2363.  Command processor status 
  2364.  
  2365.         _4VER           4OS2 version (2.5, 2.51, etc.) 
  2366.         _BATCH          Batch nesting level 
  2367.         _BATCHLINE      Current line number in current batch file 
  2368.         _BATCHNAME      Name of current batch file 
  2369.         _DNAME          Name of file used to store file descriptions 
  2370.         _HLOGFILE       Current history log file name 
  2371.         _LOGFILE        Current log file name 
  2372.         _PID            4OS2 process ID (numeric) 
  2373.         _PIPE           Whether running in a pipe 
  2374.         _PPID           Parent process ID (numeric) 
  2375.         _PTYPE          OS/2 session type (AVIO, DT, FS, PM) 
  2376.         _SHELL          Shell level (0, 1, 2, ...) 
  2377.         _SID            Current OS/2 session ID 
  2378.         _TRANSIENT      * Transient shell flag (0 or 1) 
  2379.         _WINTITLE       Current window title 
  2380.  
  2381.  Screen and color 
  2382.  
  2383.         _BG             Background color at cursor position 
  2384.         _COLUMN         Current cursor column 
  2385.         _COLUMNS        Screen width 
  2386.         _FG             Foreground color at cursor position 
  2387.         _ROW            Current cursor row 
  2388.         _ROWS           Screen height 
  2389.  
  2390.  Drives and directories 
  2391.  
  2392.         _CWD            Current drive and directory (d:\path) 
  2393.         _CWDS           Current drive and directory with trailing \ (d:\path\) 
  2394.         _CWP            Current directory (\path) 
  2395.         _CWPS           Current directory with trailing \ (\path\) 
  2396.         _DISK           Current drive (C, D, etc.) 
  2397.         _LASTDISK       Last possible drive (E, F, etc.) 
  2398.  
  2399.  Dates and times 
  2400.  
  2401.         _DATE           * Current date (mm-dd-yy) 
  2402.         _DAY            Day of the month (1 - 31) 
  2403.         _DOW            Day of the week (Mon, Tue, Wed, etc.) 
  2404.         _DOY            Day of the year (1 - 366) 
  2405.         _HOUR           Hour (0 - 23) 
  2406.         _MINUTE         Minute (0 - 59) 
  2407.         _MONTH          Month of the year (1 - 12) 
  2408.         _SECOND         Second (0 - 59) 
  2409.         _TIME           * Current time (hh:mm:ss) 
  2410.         _YEAR           Year (1980 - 2099) 
  2411.  
  2412.  Error codes 
  2413.  
  2414.         ?               * Exit code, last external program 
  2415.         _?              * Exit code, last internal command 
  2416.         _SYSERR         * Last OS/2 error code 
  2417.  
  2418.  Compatibility 
  2419.  
  2420.         =               * Substitutes escape character 
  2421.         +               * Substitutes command separator 
  2422.  
  2423.  Examples 
  2424.  
  2425.  You can use these variables in a wide variety of ways depending on your needs. 
  2426.  Here are just a few examples.  Some of these examples rely on the IF and IFF 
  2427.  commands to test the value of a variable and perform different actions based 
  2428.  on that value. 
  2429.  
  2430.  In a batch file, set the color based on the video card type: 
  2431.  
  2432.           iff "%_video"=="mono" then
  2433.             color bright white on black
  2434.           else
  2435.             color bright white on blue
  2436.           endiff
  2437.  
  2438.  Store the current date and time in a file, then save the output of a DIR 
  2439.  command in the same file: 
  2440.  
  2441.           echo Directory as of %_date %_time > dirsave
  2442.           dir >> dirsave
  2443.  
  2444.  Set up a prompt for the primary shell which displays the time and current 
  2445.  directory, and a different one for secondary shells which includes the shell 
  2446.  level rather than the time (see PROMPT for details about setting the prompt). 
  2447.  Also set different background colors for the two shells, without changing the 
  2448.  foreground color.  You might use a sequence like this in your 4START file (see 
  2449.  Automatic Batch Files): 
  2450.  
  2451.           iff %_shell==0 then
  2452.             prompt $t $p$g
  2453.             color %_fg on blue
  2454.           else
  2455.             prompt [$z] $p$g
  2456.             color %_fg on cyan
  2457.           endiff
  2458.  
  2459.  
  2460. ΓòÉΓòÉΓòÉ 11.1. ┬á? ΓòÉΓòÉΓòÉ
  2461.  
  2462. ? contains the exit code of the last external command.  Many programs return a 
  2463. "0" to indicate success and a non-zero value to signal an error.  However, not 
  2464. all programs return an exit code.  If no explicit exit code is returned, the 
  2465. value of %? is undefined. 
  2466.  
  2467.  
  2468. ΓòÉΓòÉΓòÉ 11.2. _? ΓòÉΓòÉΓòÉ
  2469.  
  2470. _? contains the exit code of the last internal command.  It is set to "0" if 
  2471. the command was successful, "1" if a usage error occurred, "2" if another 
  2472. command processor error or an operating system error occurred, or "3" if the 
  2473. command was interrupted by Ctrl-C or Ctrl-Break.  You must use or save this 
  2474. value immediately, because it is set by every internal command. 
  2475.  
  2476.  
  2477. ΓòÉΓòÉΓòÉ 11.3. = ΓòÉΓòÉΓòÉ
  2478.  
  2479. = returns the current escape character.  Use this variable, instead of the 
  2480. actual escape character, if you want your batch files and aliases to work 
  2481. regardless of how the escape character is defined.  For example, if the escape 
  2482. character is a caret [^] (the default in 4OS2) both of the commands below will 
  2483. send a form feed to the printer.  However, if the escape character has been 
  2484. changed,  the first command will send the string "^f" to the printer, while the 
  2485. second command will continue to work as intended. 
  2486.  
  2487.         echos ^f > prn
  2488.         echos %=f > prn
  2489.  
  2490.  
  2491. ΓòÉΓòÉΓòÉ 11.4. + ΓòÉΓòÉΓòÉ
  2492.  
  2493. + returns the current command separator.  Use this variable, instead of the 
  2494. actual command separator, if you want your batch files and aliases to work 
  2495. regardless of how the command separator is defined.  For example, if the 
  2496. command separator is an ampersand [&] (the default in 4OS2) both of the 
  2497. commands below will display "Hello" on one line and "world" on the next. 
  2498. However, if the command separator has been changed the first command will 
  2499. display "Hello & echo world", while the second command will continue to work as 
  2500. intended. 
  2501.  
  2502.         echo Hello & echo world
  2503.         echo Hello %+ echo world
  2504.  
  2505.  
  2506. ΓòÉΓòÉΓòÉ 11.5. _4VER ΓòÉΓòÉΓòÉ
  2507.  
  2508. _4VER is the current 4OS2 version (for example, "2.5"). 
  2509.  
  2510.  
  2511. ΓòÉΓòÉΓòÉ 11.6. _ANSI ΓòÉΓòÉΓòÉ
  2512.  
  2513. _ANSI is always "1" in 4OS2.  (4OS2 enables OS/2's ANSI support, and assumes 
  2514. that it remains enabled.) 
  2515.  
  2516.  
  2517. ΓòÉΓòÉΓòÉ 11.7. _BATCH ΓòÉΓòÉΓòÉ
  2518.  
  2519. _BATCH is the current batch nesting level.  It is "0" if no batch file is 
  2520. currently being processed. 
  2521.  
  2522.  
  2523. ΓòÉΓòÉΓòÉ 11.8. _BATCHLINE ΓòÉΓòÉΓòÉ
  2524.  
  2525. _BATCHLINE is the current line number in the current batch file.  It is "-1" if 
  2526. no batch file is currently being processed. 
  2527.  
  2528.  
  2529. ΓòÉΓòÉΓòÉ 11.9. _BATCHNAME ΓòÉΓòÉΓòÉ
  2530.  
  2531. _BATCHNAME is the full pathname of the current batch file.  It is an empty 
  2532. string if no batch file is currently being processed. 
  2533.  
  2534.  
  2535. ΓòÉΓòÉΓòÉ 11.10. _BG ΓòÉΓòÉΓòÉ
  2536.  
  2537. _BG is a string containing the first three characters of the screen background 
  2538. color at the current cursor location (for example, "Bla"). 
  2539.  
  2540.  
  2541. ΓòÉΓòÉΓòÉ 11.11. _BOOT ΓòÉΓòÉΓòÉ
  2542.  
  2543. _BOOT is the boot drive letter, without a colon. 
  2544.  
  2545.  
  2546. ΓòÉΓòÉΓòÉ 11.12. _CI ΓòÉΓòÉΓòÉ
  2547.  
  2548. _CI is the current shape of the cursor in insert mode, as a percentage. 
  2549.  
  2550.  
  2551. ΓòÉΓòÉΓòÉ 11.13. _CO ΓòÉΓòÉΓòÉ
  2552.  
  2553. _CO is the current shape of the cursor in overstrike mode, as a percentage. 
  2554.  
  2555.  
  2556. ΓòÉΓòÉΓòÉ 11.14. _CODEPAGE ΓòÉΓòÉΓòÉ
  2557.  
  2558. _CODEPAGE is the current code page number (see CHCP). 
  2559.  
  2560.  
  2561. ΓòÉΓòÉΓòÉ 11.15. _COLUMN ΓòÉΓòÉΓòÉ
  2562.  
  2563. _COLUMN is the current cursor column (for example, "0" for the left side of the 
  2564. screen). 
  2565.  
  2566.  
  2567. ΓòÉΓòÉΓòÉ 11.16. _COLUMNS ΓòÉΓòÉΓòÉ
  2568.  
  2569. _COLUMNS is the current number of screen columns (for example, "80"). 
  2570.  
  2571.  
  2572. ΓòÉΓòÉΓòÉ 11.17. _COUNTRY ΓòÉΓòÉΓòÉ
  2573.  
  2574. _COUNTRY is the current country code. 
  2575.  
  2576.  
  2577. ΓòÉΓòÉΓòÉ 11.18. _CPU ΓòÉΓòÉΓòÉ
  2578.  
  2579. _CPU is the CPU type: 
  2580.  
  2581.         86      8086 and 8088 
  2582.         186     80186 and 80188 
  2583.         200     NEC V20 and V30 
  2584.         286     80286 
  2585.         386     i386 
  2586.         486     i486 
  2587.         586     Pentium 
  2588.  
  2589.  
  2590. ΓòÉΓòÉΓòÉ 11.19. _CWD ΓòÉΓòÉΓòÉ
  2591.  
  2592. _CWD is the current working directory in the format d:\pathname. 
  2593.  
  2594.  
  2595. ΓòÉΓòÉΓòÉ 11.20. _CWDS ΓòÉΓòÉΓòÉ
  2596.  
  2597. _CWDS has the same value as CWD, except it ends the pathname with a backslash 
  2598. [\]. 
  2599.  
  2600.  
  2601. ΓòÉΓòÉΓòÉ 11.21. _CWP ΓòÉΓòÉΓòÉ
  2602.  
  2603. _CWP is the current working directory in the format \pathname. 
  2604.  
  2605.  
  2606. ΓòÉΓòÉΓòÉ 11.22. _CWPS ΓòÉΓòÉΓòÉ
  2607.  
  2608. _CWPS has the same value as CWP, except it ends the pathname with a backslash 
  2609. [\]. 
  2610.  
  2611.  
  2612. ΓòÉΓòÉΓòÉ 11.23. _DATE ΓòÉΓòÉΓòÉ
  2613.  
  2614. _DATE contains the current system date, in the format mm-dd-yy (U.S.), dd-mm-yy 
  2615. (Europe), or yy-mm-dd (Japan). 
  2616.  
  2617.  
  2618. ΓòÉΓòÉΓòÉ 11.24. _DAY ΓòÉΓòÉΓòÉ
  2619.  
  2620. _DAY is the day of the month (1 to 31). 
  2621.  
  2622.  
  2623. ΓòÉΓòÉΓòÉ 11.25. _DISK ΓòÉΓòÉΓòÉ
  2624.  
  2625. _DISK is the current disk drive, without a colon (for example, "C"). 
  2626.  
  2627.  
  2628. ΓòÉΓòÉΓòÉ 11.26. _DOS ΓòÉΓòÉΓòÉ
  2629.  
  2630. _DOS is the operating system type ("DOS", "OS2", or "NT").  4DOS always returns 
  2631. "DOS", 4OS2 always returns "OS2", and 4DOS/NT always returns "NT".  This may be 
  2632. useful if you have batch files running under more than one operating system. 
  2633.  
  2634.  
  2635. ΓòÉΓòÉΓòÉ 11.27. _DNAME ΓòÉΓòÉΓòÉ
  2636.  
  2637. _DNAME is the name of the file used to store file descriptions.  It can be 
  2638. changed with the DescriptionName directive in 4OS2.INI or the SETDOS /D 
  2639. command. 
  2640.  
  2641.  
  2642. ΓòÉΓòÉΓòÉ 11.28. _DOSVER ΓòÉΓòÉΓòÉ
  2643.  
  2644. _DOSVER is the current operating system version (for example, "3.0"). 
  2645.  
  2646.  
  2647. ΓòÉΓòÉΓòÉ 11.29. _DOW ΓòÉΓòÉΓòÉ
  2648.  
  2649. _DOW is the first three characters of the current day of the week ("Mon", 
  2650. "Tue", "Wed", etc.). 
  2651.  
  2652.  
  2653. ΓòÉΓòÉΓòÉ 11.30. _DOY ΓòÉΓòÉΓòÉ
  2654.  
  2655. _DOY is the day of the year (1 to 366). 
  2656.  
  2657.  
  2658. ΓòÉΓòÉΓòÉ 11.31. _FG ΓòÉΓòÉΓòÉ
  2659.  
  2660. _FG is a string containing the first three letters of the screen foreground 
  2661. color at the current cursor position (for example, "Whi"). 
  2662.  
  2663.  
  2664. ΓòÉΓòÉΓòÉ 11.32. _HLOGFILE ΓòÉΓòÉΓòÉ
  2665.  
  2666. _HLOGFILE  returns the name of the current history log file (or an empty string 
  2667. if LOG /H is OFF). 
  2668.  
  2669.  
  2670. ΓòÉΓòÉΓòÉ 11.33. _HOUR ΓòÉΓòÉΓòÉ
  2671.  
  2672. _HOUR is the current hour (0 - 23). 
  2673.  
  2674.  
  2675. ΓòÉΓòÉΓòÉ 11.34. _KBHIT ΓòÉΓòÉΓòÉ
  2676.  
  2677. _KBHIT returns 1 if one or more keystrokes are waiting in the keyboard buffer, 
  2678. or 0 if the keyboard buffer is empty. 
  2679.  
  2680.  
  2681. ΓòÉΓòÉΓòÉ 11.35. _LASTDISK ΓòÉΓòÉΓòÉ
  2682.  
  2683. _LASTDISK is the last valid drive letter, without a colon. 
  2684.  
  2685.  
  2686. ΓòÉΓòÉΓòÉ 11.36. _LOGFILE ΓòÉΓòÉΓòÉ
  2687.  
  2688. _LOGFILE  returns the name of the current log file (or an empty string if LOG 
  2689. is OFF). 
  2690.  
  2691.  
  2692. ΓòÉΓòÉΓòÉ 11.37. _MINUTE ΓòÉΓòÉΓòÉ
  2693.  
  2694. _MINUTE is the current minute (0 - 59). 
  2695.  
  2696.  
  2697. ΓòÉΓòÉΓòÉ 11.38. _MONITOR ΓòÉΓòÉΓòÉ
  2698.  
  2699. _MONITOR is the monitor type ("mono" or "color"). 
  2700.  
  2701.  
  2702. ΓòÉΓòÉΓòÉ 11.39. _MONTH ΓòÉΓòÉΓòÉ
  2703.  
  2704. _MONTH is the month of the year (1 to 12). 
  2705.  
  2706.  
  2707. ΓòÉΓòÉΓòÉ 11.40. _MOUSE ΓòÉΓòÉΓòÉ
  2708.  
  2709. _MOUSE always returns "1" in 4OS2. 
  2710.  
  2711.  
  2712. ΓòÉΓòÉΓòÉ 11.41. _NDP ΓòÉΓòÉΓòÉ
  2713.  
  2714. _NDP is the coprocessor type: 
  2715.  
  2716.         0       no coprocessor is installed 
  2717.         87      8087 
  2718.         287     80287 
  2719.         387     80387, 80486DX, or Pentium 
  2720.  
  2721.  
  2722. ΓòÉΓòÉΓòÉ 11.42. _PID ΓòÉΓòÉΓòÉ
  2723.  
  2724. _PID is the current process ID number. 
  2725.  
  2726.  
  2727. ΓòÉΓòÉΓòÉ 11.43. _PIPE ΓòÉΓòÉΓòÉ
  2728.  
  2729. _PIPE returns 1 if the current process is running inside a pipe or 0 otherwise. 
  2730.  
  2731.  
  2732. ΓòÉΓòÉΓòÉ 11.44. _PPID ΓòÉΓòÉΓòÉ
  2733.  
  2734. _PPID is the process ID number of the parent process. 
  2735.  
  2736.  
  2737. ΓòÉΓòÉΓòÉ 11.45. _PTYPE ΓòÉΓòÉΓòÉ
  2738.  
  2739. _PTYPE is the current OS/2 process type: 
  2740.  
  2741.         AVIO    Character mode, windowed 
  2742.         DT      Detached (no screen in use) 
  2743.         FS      Character mode, full-screen 
  2744.         PM      Presentation Manager 
  2745.  
  2746.  
  2747. ΓòÉΓòÉΓòÉ 11.46. _ROW ΓòÉΓòÉΓòÉ
  2748.  
  2749. _ROW is the current cursor row (for example, "0" for the top of the screen). 
  2750.  
  2751.  
  2752. ΓòÉΓòÉΓòÉ 11.47. _ROWS ΓòÉΓòÉΓòÉ
  2753.  
  2754. _ROWS is the current number of screen rows (for example, "25"). 
  2755.  
  2756.  
  2757. ΓòÉΓòÉΓòÉ 11.48. _SECOND ΓòÉΓòÉΓòÉ
  2758.  
  2759. _SECOND is the current second (0 - 59). 
  2760.  
  2761.  
  2762. ΓòÉΓòÉΓòÉ 11.49. _SHELL ΓòÉΓòÉΓòÉ
  2763.  
  2764. _SHELL is the current shell nesting level.  The primary shell is level "0", and 
  2765. each subsequent secondary shell increments the level by 1. 
  2766.  
  2767.  
  2768. ΓòÉΓòÉΓòÉ 11.50. _SID ΓòÉΓòÉΓòÉ
  2769.  
  2770. _SID is the session ID number. 
  2771.  
  2772.  
  2773. ΓòÉΓòÉΓòÉ 11.51. _SYSERR ΓòÉΓòÉΓòÉ
  2774.  
  2775. _SYSERR is the error code of the last operating system error. You will need a 
  2776. technical or programmer's manual to understand these error values. 
  2777.  
  2778.  
  2779. ΓòÉΓòÉΓòÉ 11.52. _TIME ΓòÉΓòÉΓòÉ
  2780.  
  2781. _TIME contains the current system time in the format hh:mm:ss. The separator 
  2782. character may vary depending upon your country information. 
  2783.  
  2784.  
  2785. ΓòÉΓòÉΓòÉ 11.53. _TRANSIENT ΓòÉΓòÉΓòÉ
  2786.  
  2787. _TRANSIENT is "1" if the current shell is transient (started with a /C, see 
  2788. Startup Options for details), or "0" otherwise. 
  2789.  
  2790.  
  2791. ΓòÉΓòÉΓòÉ 11.54. _VIDEO ΓòÉΓòÉΓòÉ
  2792.  
  2793. _VIDEO is the video card type ("mono", "cga", "ega", "vga", "xga", "8514", or 
  2794. "IA/A"). 
  2795.  
  2796.  
  2797. ΓòÉΓòÉΓòÉ 11.55. _WINTITLE ΓòÉΓòÉΓòÉ
  2798.  
  2799. _WINTITLE returns the title of the current window. 
  2800.  
  2801.  
  2802. ΓòÉΓòÉΓòÉ 11.56. _YEAR ΓòÉΓòÉΓòÉ
  2803.  
  2804. _YEAR is the current year (1980 to 2099). 
  2805.  
  2806.  
  2807. ΓòÉΓòÉΓòÉ 12. Variable Functions ΓòÉΓòÉΓòÉ
  2808.  
  2809. Variable functions are like internal variables, but they take one or more 
  2810. arguments (which can be environment variables or even other variable functions) 
  2811. and they return a value. 
  2812.  
  2813. The list below gives a one-line description of each function, and a 
  2814. cross-reference which selects a full screen help topic on that function.  A few 
  2815. of the variables are simple enough that the one-line description is sufficient, 
  2816. but in most cases you should check for any additional information in the 
  2817. cross-reference topic if you are not already familiar with a function.  You can 
  2818. also obtain help on any function with a HELP @functionname command at the 
  2819. prompt. 
  2820.  
  2821. See the discussion after the function list for additional information and 
  2822. examples. 
  2823.  
  2824. The variable functions are: 
  2825.  
  2826. System status 
  2827.  
  2828.         @DOSMEM[b|k|m]                      Size of largest free memory block 
  2829.         @READSCR[row,col,len]               Read characters from the screen 
  2830.  
  2831.  Drives and devices 
  2832.  
  2833.         @CDROM[d:]                          CD-ROM drive detection (0 or 1) 
  2834.         @DEVICE[name]                       Character device detection 
  2835.         @DISKFREE[d:,b|k|m]                 Free disk space 
  2836.         @DISKTOTAL[d:,b|k|m]                Total disk space 
  2837.         @DISKUSED[d:,b|k|m]                 Used disk space 
  2838.         @FSTYPE[d:]                         File system type (FAT, HPFS, CDFS, 
  2839.                                             etc.) 
  2840.         @LABEL[d:]                          Volume label 
  2841.         @READY[d:]                          Drive ready status (0 or 1) 
  2842.         @REMOTE[d:]                         Remote (network) drive detection (0 
  2843.                                             or 1) 
  2844.         @REMOVABLE[d:]                      Removable drive detection (0 or 1) 
  2845.  
  2846.  Files 
  2847.  
  2848.         @ATTRIB[filename,[nrhsda]]          File attribute test (0 or 1) 
  2849.         @DESCRIPT[filename]                 File description 
  2850.         @EXETYPE[filename]                  Executable file type (DOS, PM, WIN, 
  2851.                                             etc.) 
  2852.         @FILEAGE[filename]                  File age (date and time) 
  2853.         @FILECLOSE[n]                       Close a file 
  2854.         @FILEDATE[filename]                 File date 
  2855.         @FILEOPEN[filename,mode]            Open a file 
  2856.         @FILEREAD[n [,length]]              Read next line from a file 
  2857.         @FILES[filename [, -nrhsda]]        Count files matching a wildcard 
  2858.         @FILESEEK[n,offset,start]           Move a file pointer to an offset 
  2859.         @FILESEEKL[n,offset,start]          Move a file pointer to a line 
  2860.                                             number 
  2861.         @FILESIZE[filename,b|k|m]           Size of files matching a wildcard 
  2862.         @FILETIME[filename]                 File time 
  2863.         @FILEWRITE[n,text]                  Write next line to a file 
  2864.         @FILEWRITEB[n,length,string]        Write bytes from a string to a file 
  2865.         @FINDFIRST[filename,nrhsda]         Find first matching file 
  2866.         @FINDNEXT[filename,nrhsda]          Find next matching file 
  2867.         @LINE[filename,n]                   Read a random line from a file 
  2868.         @LINES[filename]                    Count lines in a file 
  2869.         @SEARCH[filename]                   Path search 
  2870.         @UNIQUE[d:\path]                    Create file with unique name 
  2871.  
  2872.  File names 
  2873.  
  2874.         @EXT[filename]                      File extension 
  2875.         @FILENAME[filename]                 File name and extension 
  2876.         @FULL[filename]                     Full file name with path 
  2877.         @NAME[filename]                     File name without path or extension 
  2878.         @PATH[filename]                     File path without name 
  2879.  
  2880.  Strings and characters 
  2881.  
  2882.         @ASCII[c]                           Numeric ASCII value for a character 
  2883.         @CHAR[n]                            Character value for numeric ASCII 
  2884.         @FORMAT[[-][x][.y],string]          Formats (justifies) a string 
  2885.         @INDEX[string1,string2]             Position of one string in another 
  2886.         @INSTR[start,length,string]         Extract a substring 
  2887.         @LEN[string]                        Length of a string 
  2888.         @LOWER[string]                      Convert string to lower case 
  2889.         @ REPEAT[c,n]                       Repeat a character 
  2890.         @SUBSTR[string,start,length]        Extract a substring 
  2891.         @TRIM[string]                       Remove blanks from a string 
  2892.         @UPPER[string]                      Convert string to upper case 
  2893.         @WORD[["sep",]n,string]             Extract a word from a string 
  2894.         @WORDS[["sep",]string]              Counts number of words in a string 
  2895.  
  2896.  Numbers and arithmetic 
  2897.  
  2898.         @COMMA[n]                           Inserts commas in a number 
  2899.         @DEC[%var]                          Decremented value of a variable 
  2900.         @EVAL[expression]                   Arithmetic calculations 
  2901.         @INC[%var]                          Incremented value of a variable 
  2902.         @INT[n]                             Integer part of a number 
  2903.         @NUMERIC[string]                    Test if a string is numeric 
  2904.         @RANDOM[min,max]                    Generate a random integer 
  2905.  
  2906.  Dates and times 
  2907.  
  2908.         @DATE[mm-dd-yy]                     Convert date to number of days 
  2909.         @MAKEAGE[n]                         Convert date/time to file date/time 
  2910.         @MAKEDATE[n]                        Convert number of days to date 
  2911.         @MAKETIME[n]                        Convert number of seconds to time 
  2912.         @TIME[hh:mm:ss]                     Convert time to number of seconds 
  2913.         @TIMER[n]                           Elapsed time of specified timer 
  2914.  
  2915.  Utility 
  2916.  
  2917.         @ALIAS[name]                        Value of an alias 
  2918.         @IF[condition,true,false]           Evaluates a test condition 
  2919.         @EXEC[command]                      Execute a command 
  2920.         @REXX[expr]                         Execute a REXX expression 
  2921.         @SELECT[file,t,l,b,r,title]         Menu selection 
  2922.  
  2923.  Like all environment variables, these variable functions must be preceded by a 
  2924.  percent sign (%@EVAL, %@LEN, etc.).  All variable functions must have square 
  2925.  brackets enclosing their argument(s).  The argument(s) to a variable function 
  2926.  cannot exceed 255 characters in length for all arguments taken as a group. 
  2927.  
  2928.  Some variable functions, like @DISKFREE, are shown with "b|k|m" as one of 
  2929.  their arguments.  Those functions return a number of bytes, kilobytes, or 
  2930.  megabytes based on the "b|k|m" argument: 
  2931.  
  2932.         b   return the number of bytes 
  2933.         K   return the number of kilobytes (bytes / 1,024) 
  2934.         k   return the number of thousands of bytes (bytes / 1,000) 
  2935.         M   return the number of megabytes (bytes / 1,048,576) 
  2936.         m   return the number of millions of bytes (bytes / 1,000,000) 
  2937.  
  2938.  You can include commas in the results from a "b|k|m" function by appending a 
  2939.  "c" to the argument.  For example, to add commas to a "b" or number of bytes 
  2940.  result, enter "bc" as the argument. 
  2941.  
  2942.  In variable functions which take a drive letter as an argument, like @DISKFREE 
  2943.  or @READY, the drive letter must be followed by a colon.  The function will 
  2944.  not work properly if you use the drive letter without the colon. 
  2945.  
  2946.  The @FILEREAD, @FILEWRITE, @FILESEEK, and @FILECLOSE functions allow you to 
  2947.  access files based on their file handle.  These functions should only be used 
  2948.  with file handles returned by @FILEOPEN!  If you use them with any other file 
  2949.  handle you may damage other files opened by 4OS2 (or, in a secondary shell, 
  2950.  the program which started 4OS2), or hang your system. 
  2951.  
  2952.  Examples 
  2953.  
  2954.  You can use variable functions in a wide variety of ways depending on your 
  2955.  needs.  We've included a few examples below to give you an idea of what's 
  2956.  possible. 
  2957.  
  2958.  To set the prompt to show the amount of free memory (see PROMPT for details on 
  2959.  including variable functions in your prompt): 
  2960.  
  2961.           [c:\] prompt (%%@dosmem[K]K) $p$g
  2962.  
  2963.  Set up a simple command-line calculator.  The calculator is used with a 
  2964.  command like CALC 3 * (4 + 5): 
  2965.  
  2966.           [c:\] alias calc `echo The answer is:  %@eval[%&]`
  2967.  
  2968.  The following batch file uses variable functions to implement "once a day" 
  2969.  execution of a group of commands.  It works by constructing a 6-digit number 
  2970.  "yymmdd" from today's date, and comparing that to a number of the same type 
  2971.  stored in the file C:\ONCEADAY.DAT. If today's date is numerically larger than 
  2972.  the saved date, and the time is after 6:00 AM, then the "once a day" commands 
  2973.  are run, and today's date is saved in the file as the new date for comparison. 
  2974.  Otherwise, no action is taken.  You can make this file simpler using the 
  2975.  %@DATE and %@TIME functions instead of using %@SUBSTR to extract substrings of 
  2976.  the %_DATE and %_TIME variables; we used the approach shown to demonstrate the 
  2977.  use of %@SUBSTR. 
  2978.  
  2979.           rem  Temporary variables used to shorten example lines:
  2980.           rem    DD is _date, DY is yymmdd date, TM is _time
  2981.           set dd=%_date
  2982.           set dy=%@substr[%dd,6,2]%@substr[%dd,0,2]%@substr[%dd,3,2]
  2983.           set lastdate=0
  2984.           iff exist c:\onceaday.dat then
  2985.              set lastdate=%@line[onceaday.dat,0]
  2986.           endiff
  2987.           iff %dy gt %lastdate then
  2988.              set tm=%_time
  2989.              iff "%@substr[%tm,0,2]%@substr[%tm,3,2]" gt "0600" then
  2990.                 rem Commands to be executed once a day go here
  2991.                 echo %dy > c:\onceaday.dat
  2992.              endiff
  2993.           endiff
  2994.  
  2995.  
  2996. ΓòÉΓòÉΓòÉ 12.1. @ALIAS ΓòÉΓòÉΓòÉ
  2997.  
  2998. @ALIAS[name]:  Returns the contents of the specified alias as a string, or a 
  2999. null string if the alias doesn't exist.  When manipulating strings returned by 
  3000. @ALIAS you may need to disable certain special characters with the SETDOS /X 
  3001. command. Otherwise, command separators, redirection characters, and other 
  3002. similar "punctuation" in the alias may be interpreted as part of the current 
  3003. command, rather than part of a simple text string. 
  3004.  
  3005.  
  3006. ΓòÉΓòÉΓòÉ 12.2. @ASCII ΓòÉΓòÉΓòÉ
  3007.  
  3008. @ASCII[c]:  Returns the numeric value of the specified ASCII character as a 
  3009. string.  For example %@ASCII[A] returns 65.  You can put an escape character 
  3010. [^] before the actual character to process.  This allows quotes and other 
  3011. special characters as the argument (e.g., %@ASCII[^`]). 
  3012.  
  3013.  
  3014. ΓòÉΓòÉΓòÉ 12.3. @ATTRIB ΓòÉΓòÉΓòÉ
  3015.  
  3016. @ATTRIB[filename,[nrhsda]]:  Returns a "1" if the specified file has the 
  3017. matching attribute(s); otherwise returns a "0".  The attributes are: 
  3018.  
  3019.         N   Normal (no attributes set) 
  3020.         R   Read-only 
  3021.         H   Hidden 
  3022.         S   System 
  3023.         D   Directory 
  3024.         A   Archive 
  3025.  
  3026.  The attributes (other than N) can be combined (for example 
  3027.  %@ATTRIB[MYFILE,HS]).  Normally ATTRIB will only return a "1" if all of the 
  3028.  attributes match.  However, if a final ,p is included (for partial match), 
  3029.  then @ATTRIB will return a "1" if any of the attributes match.  For example, 
  3030.  %@ATTRIB[MYFILE,HS,p] will return a "1" if MYFILE has the hidden, system, or 
  3031.  both attributes.  Without ,p the function will return a "1" only if MYFILE has 
  3032.  both attributes. 
  3033.  
  3034.  If you do not specify any attributes, @ATTRIB will return the attributes of 
  3035.  the specified file in the format RHSAD, rather than a "0" or "1".  Attributes 
  3036.  which are not set will be replaced with an underscore.  For example, if 
  3037.  SECURE.DAT has the read-only, hidden, and archive attributes set, 
  3038.  %@ATTRIB[SECURE.DAT] would return RH_A_. 
  3039.  
  3040.  
  3041. ΓòÉΓòÉΓòÉ 12.4. @CDROM ΓòÉΓòÉΓòÉ
  3042.  
  3043. @CDROM[d:]:  Returns "1" if the drive is a CD-ROM or "0" otherwise. 
  3044.  
  3045.  
  3046. ΓòÉΓòÉΓòÉ 12.5. @CHAR ΓòÉΓòÉΓòÉ
  3047.  
  3048. @CHAR[n]:  Returns the character corresponding to an ASCII numeric value.  For 
  3049. example %@CHAR[65] returns A. 
  3050.  
  3051.  
  3052. ΓòÉΓòÉΓòÉ 12.6. @DATE ΓòÉΓòÉΓòÉ
  3053.  
  3054. @DATE[mm-dd-yy]:  Returns the number of days since January 1, 1980 for the 
  3055. specified date.  DATE uses the date format and separators mandated by your 
  3056. country code (for example dd.mm.yy in Germany, or  yy-mm-dd in Japan). 
  3057.  
  3058.  
  3059. ΓòÉΓòÉΓòÉ 12.7. @COMMA ΓòÉΓòÉΓòÉ
  3060.  
  3061. @COMMA[n]:  Inserts commas, or the "thousands separator" character for your 
  3062. country ID, into a numeric string. 
  3063.  
  3064.  
  3065. ΓòÉΓòÉΓòÉ 12.8. @DEC ΓòÉΓòÉΓòÉ
  3066.  
  3067. @DEC[%var]:  Returns the same value as @EVAL[%var - 1].  That is, it retrieves 
  3068. and decrements the value of a variable.  The variable itself is not changed; to 
  3069. do so, use a command like this: 
  3070.  
  3071.         set var=%@dec[%var]
  3072.  
  3073.  
  3074. ΓòÉΓòÉΓòÉ 12.9. @DESCRIPT ΓòÉΓòÉΓòÉ
  3075.  
  3076. @DESCRIPT[filename]:  Returns the file description for the specified filename 
  3077. (see DESCRIBE). 
  3078.  
  3079.  
  3080. ΓòÉΓòÉΓòÉ 12.10. @DEVICE ΓòÉΓòÉΓòÉ
  3081.  
  3082. @DEVICE[name]:  Returns "1" if the specified name is a character device (such 
  3083. as a printer or serial port), or "0" if not. 
  3084.  
  3085.  
  3086. ΓòÉΓòÉΓòÉ 12.11. @DISKFREE ΓòÉΓòÉΓòÉ
  3087.  
  3088. @DISKFREE[d:,b|k|m]: Returns the amount of free disk space on the specified 
  3089. drive. 
  3090.  
  3091.  
  3092. ΓòÉΓòÉΓòÉ 12.12. @DISKTOTAL ΓòÉΓòÉΓòÉ
  3093.  
  3094. @DISKTOTAL[d:,b|k|m]:  Returns the total disk space on the specified drive. 
  3095.  
  3096.  
  3097. ΓòÉΓòÉΓòÉ 12.13. @DISKUSED ΓòÉΓòÉΓòÉ
  3098.  
  3099. @DISKUSED[d:,b|k|m]:  Returns the amount of disk space in use by files and 
  3100. directories on the specified drive. 
  3101.  
  3102.  
  3103. ΓòÉΓòÉΓòÉ 12.14. @DOSMEM ΓòÉΓòÉΓòÉ
  3104.  
  3105. @DOSMEM[b|k|m]:  Returns the size of the largest free memory block (either in 
  3106. physical or virtual memory). 
  3107.  
  3108.  
  3109. ΓòÉΓòÉΓòÉ 12.15. @EVAL ΓòÉΓòÉΓòÉ
  3110.  
  3111. @EVAL[expression]:  Evaluates an arithmetic expression.  @EVAL supports 
  3112. addition (+), subtraction (-), multiplication (*), division (/), integer 
  3113. division (\, returns the integer part of the quotient), modulo (%%), and 
  3114. integer exponentiation (**).  The expression can contain environment variables 
  3115. and other variable functions.  @EVAL also supports parentheses, commas, and 
  3116. decimals.  Parentheses can be nested.  @EVAL will strip leading and trailing 
  3117. zeros from the result. When evaluating expressions, **, *, /, and %% take 
  3118. precedence over + and -.  For example, 3 + 4 * 2 will be interpreted as 3 + 8, 
  3119. not as 7 * 2.  To change this order of evaluation, use parentheses to specify 
  3120. the order you want. Also see @DEC and @INC. 
  3121.  
  3122. The maximum precision is 16 digits to the left of the decimal point and 8 
  3123. digits to the right of the decimal point.  You can alter the default precision 
  3124. to the right of the decimal point with the EvalMax and EvalMin directives in 
  3125. 4OS2.INI and with the SETDOS /F command. 
  3126.  
  3127. You can alter the precision for a single evaluation with the construct 
  3128. @EVAL[expression=x.y].  The x value specifies the minimum decimal precision 
  3129. (i.e., the minimum number of decimal places displayed); the y value sets the 
  3130. maximum decimal precision.  If x is greater than y, it is ignored.  You can 
  3131. specify either or both arguments, for example%colon. 
  3132.  
  3133.         @eval[3/7=2]            returns 0.42857143
  3134.         @eval[3/7=.4]           returns 0.4286
  3135.         @eval[3/6=2.4]          returns 0.50
  3136.  
  3137.  
  3138. ΓòÉΓòÉΓòÉ 12.16. @EXEC ΓòÉΓòÉΓòÉ
  3139.  
  3140. @EXEC[command]:  Execute the command and return the numeric exit code.  The 
  3141. command can be an alias, internal command, external command, .BTM file, or .BAT 
  3142. file.  @EXEC is primarily intended for running a program from within the 
  3143. PROMPT.  It is a "back door" entry into command processing and should be used 
  3144. with extreme caution.  Incorrect or recursive use of @EXEC may hang your 
  3145. system. 
  3146.  
  3147.  
  3148. ΓòÉΓòÉΓòÉ 12.17. @EXETYPE ΓòÉΓòÉΓòÉ
  3149.  
  3150. @EXETYPE[filename]:  Returns the application type as a string: 
  3151.  
  3152.         DOS         DOS .COM, .EXE, or .BAT file (OS/2 2.x only) 
  3153.         AVIO        OS/2 Character mode, windowed 
  3154.         FS          OS/2 Character mode, full-screen 
  3155.         PM          OS/2 Presentation Manager 
  3156.         WIN         Windows 3 (OS/2 2.x only) 
  3157.         UNKNOWN     Any other file 
  3158.  
  3159.  
  3160. ΓòÉΓòÉΓòÉ 12.18. @EXT ΓòÉΓòÉΓòÉ
  3161.  
  3162. @EXT[filename]:  Returns the extension from a file name, without a leading 
  3163. period. 
  3164.  
  3165.  
  3166. ΓòÉΓòÉΓòÉ 12.19. @FILEAGE ΓòÉΓòÉΓòÉ
  3167.  
  3168. @FILEAGE[filename]:  Returns the date and time of the file as a single numeric 
  3169. value.  The number can be used to compare the relative ages of two or more 
  3170. files. 
  3171.  
  3172.  
  3173. ΓòÉΓòÉΓòÉ 12.20. @FILECLOSE ΓòÉΓòÉΓòÉ
  3174.  
  3175. @FILECLOSE[n]:  Closes the file whose handle is "n."  You cannot close handles 
  3176. 0, 1 or 2.  Returns "0" if the file closed OK or "-1" if an error occurred.  Be 
  3177. sure to read the cautionary note about file functions under Variable Functions. 
  3178.  
  3179.  
  3180. ΓòÉΓòÉΓòÉ 12.21. @FILEDATE ΓòÉΓòÉΓòÉ
  3181.  
  3182. @FILEDATE[filename]:  Returns the date a file was last modified, in the default 
  3183. country format (mm-dd-yy for the US). 
  3184.  
  3185.  
  3186. ΓòÉΓòÉΓòÉ 12.22. @FILENAME ΓòÉΓòÉΓòÉ
  3187.  
  3188. @FILENAME[filename]:  Returns the name and extension of a file, without a path. 
  3189.  
  3190.  
  3191. ΓòÉΓòÉΓòÉ 12.23. @FILEOPEN ΓòÉΓòÉΓòÉ
  3192.  
  3193. @FILEOPEN[filename, read | write | append, [b | t]]:  Opens the file in the 
  3194. specified mode and returns the file handle as an integer.  Returns "-1" if the 
  3195. file cannot be opened. 
  3196.  
  3197. The optional third parameter controls whether the file is opened in binary mode 
  3198. ("b") or text mode ("t").  Text mode (the default) should be used to read text 
  3199. using @FILEREAD without a "length" parameter, and to write text using 
  3200. @FILEWRITE.  Binary mode should be used to read binary data with @FILEREAD with 
  3201. a "length" parameter, and to write binary data with @FILEWRITEB. 
  3202.  
  3203. Be sure to read the cautionary note about file functions under Variable 
  3204. Functions. 
  3205.  
  3206.  
  3207. ΓòÉΓòÉΓòÉ 12.24. @FILEREAD ΓòÉΓòÉΓòÉ
  3208.  
  3209. @FILEREAD[n [,length]]: Reads data from the file whose handle is "n."  Returns 
  3210. "**EOF**" if you attempt to read past the end of the file.  If "length" is not 
  3211. specified @FILEREAD will read until the next CR or LF (end of line) character. 
  3212. If "length" is specified, @FILEREAD will read "length" bytes regardless of any 
  3213. end of line characters. 
  3214.  
  3215. If you plan to read text a line at a time, without using "length", you should 
  3216. open the file in text mode.  If you plan to read binary data using "length", 
  3217. you should open the file in binary mode.  See @FILEOPEN for details on opening 
  3218. the file in the proper mode. 
  3219.  
  3220. Be sure to read the cautionary note about file functions under Variable 
  3221. Functions. 
  3222.  
  3223.  
  3224. ΓòÉΓòÉΓòÉ 12.25. @FILES ΓòÉΓòÉΓòÉ
  3225.  
  3226. @FILES[filename [, -nrhsda]]:  Returns the number of files that match the 
  3227. filename specification, which may contain wildcards and include lists.  Returns 
  3228. an empty string if no files match.  The filename must refer to a single 
  3229. directory; to check several directories, use @FILES once for each directory, 
  3230. and add the results together with @EVAL. 
  3231.  
  3232. The second argument is a list of file attributes.  If it is included, only 
  3233. those files matching all the specified attributes are counted.  The attributes 
  3234. are: 
  3235.  
  3236.         N   Normal (no attributes set) 
  3237.         R   Read-only 
  3238.         H   Hidden 
  3239.         S   System 
  3240.         D   Directory 
  3241.         A   Archive 
  3242.  
  3243.   You can prefix an attribute with - to mean "everything except files with this 
  3244.  attribute." 
  3245.  
  3246.  
  3247. ΓòÉΓòÉΓòÉ 12.26. @FILESEEK ΓòÉΓòÉΓòÉ
  3248.  
  3249. @FILESEEK[n,offset,start]:  Moves the file pointer "offset" bytes in the file 
  3250. whose handle is "n".  Returns the new position of the pointer, in bytes from 
  3251. the start of the file.  Set "start" to 0 to seek relative to the beginning of 
  3252. the file, 1 to seek relative to the current file pointer, or 2 to seek relative 
  3253. to the end of the file.  The offset value may be negative (seek backward), 
  3254. positive (seek forward), or zero (return current position, but do not change 
  3255. it).  Be sure to read the cautionary note about file functions under Variable 
  3256. Functions. 
  3257.  
  3258.  
  3259. ΓòÉΓòÉΓòÉ 12.27. @FILESEEKL ΓòÉΓòÉΓòÉ
  3260.  
  3261. @FILESEEKL[n,line]:  Moves the file pointer to the specified line in the file 
  3262. whose handle is "n". Returns the new position of the pointer, in bytes from the 
  3263. start of the file. Be sure to read the cautionary note about file functions 
  3264. under Variable Functions. 
  3265.  
  3266.  
  3267. ΓòÉΓòÉΓòÉ 12.28. @FILESIZE ΓòÉΓòÉΓòÉ
  3268.  
  3269. @FILESIZE[filename,b|k|m]:  Returns the size of a file, or "-1" if the file 
  3270. does not exist.  If the filename includes wildcards or an include list, returns 
  3271. the combined size of all matching files. 
  3272.  
  3273.  
  3274. ΓòÉΓòÉΓòÉ 12.29. @FILETIME ΓòÉΓòÉΓòÉ
  3275.  
  3276. @FILETIME[filename]:  Returns the time a file was last modified, in hh:mm 
  3277. format. 
  3278.  
  3279.  
  3280. ΓòÉΓòÉΓòÉ 12.30. @FILEWRITE ΓòÉΓòÉΓòÉ
  3281.  
  3282. @FILEWRITE[n,text]:  Writes a line to the file whose handle is "n".  Returns 
  3283. the number of bytes written, or "-1" if an error occurred. 
  3284.  
  3285. If you plan to write text a line at a time with @FILEWRITE, you should open the 
  3286. file in text mode (see @FILEOPEN).  If you want to write binary data you should 
  3287. use @FILEWRITEB instead, and open the file in binary mode. 
  3288.  
  3289. Be sure to read the cautionary note about file functions under Variable 
  3290. Functions. 
  3291.  
  3292.  
  3293. ΓòÉΓòÉΓòÉ 12.31. @FILEWRITEB ΓòÉΓòÉΓòÉ
  3294.  
  3295. @FILEWRITEB[n,length,string]:  Writes the specified number of bytes from the 
  3296. string to the file whose handle is "n".  Returns the number of bytes written, 
  3297. or "-1" if an error occurred. 
  3298.  
  3299. If you plan to write binary data with @FILEWRITEB, you should open the file in 
  3300. binary mode (see @FILEOPEN).  If you want to write text a line at a time you 
  3301. should use @FILEWRITE instead, and open the file in text mode. 
  3302.  
  3303. Be sure to read the cautionary note about file functions under Variable 
  3304. Functions. 
  3305.  
  3306.  
  3307. ΓòÉΓòÉΓòÉ 12.32. @FINDFIRST ΓòÉΓòÉΓòÉ
  3308.  
  3309. @FINDFIRST[filename [,nrhsda]]:  Returns the name of the first file that 
  3310. matches the filename, which may contain wildcards and "include lists."  The 
  3311. second argument, if included, defines the attributes of the files that will be 
  3312. included in the search.  Returns an empty string if no files match.  The 
  3313. attributes are: 
  3314.  
  3315.         N   Normal (no attributes set) 
  3316.         R   Read-only 
  3317.         H   Hidden 
  3318.         S   System 
  3319.         D   Directory 
  3320.         A   Archive 
  3321.  
  3322.  @FINDFIRST always skips the "." and ".." entries when processing directory 
  3323.  names. 
  3324.  
  3325.  The attributes (other than N) can be combined (for example 
  3326.  %@FINDFIRST[MYFILE,HS]).  @FINDFIRST will only find a file if all of the 
  3327.  attributes match. 
  3328.  
  3329.  
  3330. ΓòÉΓòÉΓòÉ 12.33. @FINDNEXT ΓòÉΓòÉΓòÉ
  3331.  
  3332. @FINDNEXT[filename [,nrhsda]]:  Returns the name of the next file that matches 
  3333. the filename passed to @FINDFIRST. @FINDNEXT should only be used after a 
  3334. successful call to @FINDFIRST.  The first argument is included for 
  3335. compatibility with previous versions, but is ignored; it can be omitted if the 
  3336. second argument is not used (e.g. %@FINDNEXT[]).  The second argument, if 
  3337. included, defines the attributes of the files that will be included in the 
  3338. search (see @FINDFIRST for details).  Returns an empty string when no more 
  3339. files match 
  3340.  
  3341. @FINDNEXT always skips the "." and ".." entries when processing directory 
  3342. names. 
  3343.  
  3344.  
  3345. ΓòÉΓòÉΓòÉ 12.34. @FORMAT ΓòÉΓòÉΓòÉ
  3346.  
  3347. @FORMAT[[-][x][.y],string]:  Reformats a string, truncating it or padding it 
  3348. with spaces as necessary.  If you use the minus [-], the string is 
  3349. left-justified; otherwise, it is right-justified.  The "x" value is the minimum 
  3350. number of characters in the result.  The "y" value is the maximum number of 
  3351. characters in the result.  You can combine the options as necessary.  For 
  3352. example: 
  3353.  
  3354.         %@format[12,JPSoftware]         returns "  JPSoftware"
  3355.         %@format[.3,JPSoftware]         returns "JPS"
  3356.  
  3357.  
  3358. ΓòÉΓòÉΓòÉ 12.35. @FSTYPE ΓòÉΓòÉΓòÉ
  3359.  
  3360. @FSTYPE[d:]:  Returns the file system type for the specified drive.  @FSTYPE 
  3361. will return "FAT" for a DOS-compatible drive with a file allocation table, 
  3362. "HPFS" for a drive that uses OS/2's high performance file system, or "CDFS" for 
  3363. a CD-ROM drive.  It may return other values if additional file systems have 
  3364. been installed with the IFS= directive in CONFIG.SYS. 
  3365.  
  3366.  
  3367. ΓòÉΓòÉΓòÉ 12.36. @FULL ΓòÉΓòÉΓòÉ
  3368.  
  3369. @FULL[filename]:  Returns the fully qualified path name of a file. 
  3370.  
  3371.  
  3372. ΓòÉΓòÉΓòÉ 12.37. @IF ΓòÉΓòÉΓòÉ
  3373.  
  3374. @IF[condition,true,false]:  Evaluates the condition and returns a string based 
  3375. on the result.  The condition can include any of the tests allowed in the IF 
  3376. command.  If the condition is true, @IF returns the first result string; if it 
  3377. is false, @IF returns the second string.  For example, 
  3378. "%IF[2==2,Correct!,Oops!]" returns "Correct!" 
  3379.  
  3380.  
  3381. ΓòÉΓòÉΓòÉ 12.38. @INC ΓòÉΓòÉΓòÉ
  3382.  
  3383. @INC[%var]:  Returns the same value as %@EVAL[%var + 1].  That is, it retrieves 
  3384. and increments the value of a variable.  The variable itself is not changed; to 
  3385. do so, use a command like this: 
  3386.  
  3387.         set var=%@inc[%var]
  3388.  
  3389.  
  3390. ΓòÉΓòÉΓòÉ 12.39. @INDEX ΓòÉΓòÉΓòÉ
  3391.  
  3392. @INDEX[string1,string2]:  Returns the position of string2 within string1, or 
  3393. "-1" if string2 is not found.  The first position in string1 is numbered 0. 
  3394.  
  3395.  
  3396. ΓòÉΓòÉΓòÉ 12.40. @INSTR ΓòÉΓòÉΓòÉ
  3397.  
  3398. @INSTR[start, length, string]:  The same as @SUBSTR.  However, the string is at 
  3399. the end of the @INSTR argument list, so that commas in the string will not be 
  3400. confused with commas separating the arguments. 
  3401.  
  3402.  
  3403. ΓòÉΓòÉΓòÉ 12.41. @INT ΓòÉΓòÉΓòÉ
  3404.  
  3405. @INT[n]:  Returns the integer part of the number n. 
  3406.  
  3407.  
  3408. ΓòÉΓòÉΓòÉ 12.42. @LABEL ΓòÉΓòÉΓòÉ
  3409.  
  3410. @LABEL[d:]:  Returns the volume label of the specified disk drive. 
  3411.  
  3412.  
  3413. ΓòÉΓòÉΓòÉ 12.43. @LEN ΓòÉΓòÉΓòÉ
  3414.  
  3415. @LEN[string]:  Returns the length of a string. 
  3416.  
  3417.  
  3418. ΓòÉΓòÉΓòÉ 12.44. @LINE ΓòÉΓòÉΓòÉ
  3419.  
  3420. @LINE[filename,n]:  Returns line "n" from the specified file. The first line in 
  3421. the file is numbered 0.  "**EOF**" is returned for all line numbers beyond the 
  3422. end of the file.  If you need to scan through the lines of a file in sequence, 
  3423. the @FILEREAD function (above) and the "@filename" construct available in the 
  3424. FOR command are much faster than calling the @LINE function repeatedly.  @LINE 
  3425. will retrieve input from standard input if you specify CON as the filename.  If 
  3426. you are redirecting input to @LINE using this feature, you must use command 
  3427. grouping or the redirection will not work properly.  For example: 
  3428.  
  3429.         (echo %@line[con,0]) < myfile.dat
  3430.  
  3431.  
  3432. ΓòÉΓòÉΓòÉ 12.45. @LINES ΓòÉΓòÉΓòÉ
  3433.  
  3434. @LINES[filename]:  Returns the line number of the last line in the file, or 
  3435. "-1" if the file is empty.  The first line in the file is numbered 0, so (for 
  3436. example) @LINES will return 0 for a file containing one line. 
  3437.  
  3438.  
  3439. ΓòÉΓòÉΓòÉ 12.46. @LOWER ΓòÉΓòÉΓòÉ
  3440.  
  3441. @LOWER[string]:  Returns the string converted to lower case. 
  3442.  
  3443.  
  3444. ΓòÉΓòÉΓòÉ 12.47. @MAKEAGE ΓòÉΓòÉΓòÉ
  3445.  
  3446. @MAKEAGE[date[,time]]:  Returns the date and time (if included) as a single 
  3447. value in the same format as @FILEAGE. @MAKEAGE can be used to compare the time 
  3448. stamp of a file with a specific date and time, for example: 
  3449.  
  3450.         if %@fileage[myfile] lt %@makeage[1/1/85] echo OLD!
  3451.  
  3452.  
  3453. ΓòÉΓòÉΓòÉ 12.48. @MAKEDATE ΓòÉΓòÉΓòÉ
  3454.  
  3455. @MAKEDATE[n]:  Returns a date (formatted according to the current country 
  3456. settings).  "n" is the number of days since 1/1/80. This is the inverse of 
  3457. @DATE. 
  3458.  
  3459.  
  3460. ΓòÉΓòÉΓòÉ 12.49. @MAKETIME ΓòÉΓòÉΓòÉ
  3461.  
  3462. @MAKETIME[n]:  Returns a time (formatted according to the current country 
  3463. settings).  "n" is the number of seconds since midnight.  This is the inverse 
  3464. of @TIME. 
  3465.  
  3466.  
  3467. ΓòÉΓòÉΓòÉ 12.50. @NAME ΓòÉΓòÉΓòÉ
  3468.  
  3469. @NAME[filename]:  Returns the base name of a file, without the path or 
  3470. extension. 
  3471.  
  3472.  
  3473. ΓòÉΓòÉΓòÉ 12.51. @NUMERIC ΓòÉΓòÉΓòÉ
  3474.  
  3475. @NUMERIC[string]:  Returns "1" if the argument is composed entirely of digits 
  3476. (0 to 9), signs (+ or -), and the thousands and decimal separators.  Otherwise, 
  3477. returns "0". 
  3478.  
  3479.  
  3480. ΓòÉΓòÉΓòÉ 12.52. @PATH ΓòÉΓòÉΓòÉ
  3481.  
  3482. @PATH[filename]:  Returns the path from a file name, including the drive letter 
  3483. and a trailing backslash but not including the base name or extension. 
  3484.  
  3485.  
  3486. ΓòÉΓòÉΓòÉ 12.53. @RANDOM ΓòÉΓòÉΓòÉ
  3487.  
  3488. @RANDOM[min, max]:  Returns a random value between min and max, inclusive. 
  3489. Min, max, and the returned value are all integers. 
  3490.  
  3491.  
  3492. ΓòÉΓòÉΓòÉ 12.54. @READSCR ΓòÉΓòÉΓòÉ
  3493.  
  3494. @READSCR[row,col,length]:  Returns the text displayed on the screen at the 
  3495. specified location.  The upper left corner of the screen is location 0,0.  You 
  3496. can also specify the row and column as offsets from the current cursor 
  3497. position.  Begin the value with a plus sign [+] to read the screen the 
  3498. specified number of rows below (or columns to the right of) the current 
  3499. position, or with a minus sign [-] to read the screen above (or to the left of) 
  3500. the current position. 
  3501.  
  3502.  
  3503. ΓòÉΓòÉΓòÉ 12.55. @READY ΓòÉΓòÉΓòÉ
  3504.  
  3505. @READY[d:]:  Returns "1" if the specified drive is ready; otherwise returns 
  3506. "0". 
  3507.  
  3508.  
  3509. ΓòÉΓòÉΓòÉ 12.56. @REMOTE ΓòÉΓòÉΓòÉ
  3510.  
  3511. @REMOTE[d:]:  Returns "1" if the specified drive is a remote (network) drive; 
  3512. otherwise returns "0". 
  3513.  
  3514.  
  3515. ΓòÉΓòÉΓòÉ 12.57. @REMOVABLE ΓòÉΓòÉΓòÉ
  3516.  
  3517. @REMOVABLE[d:]:  Returns "1" if the specified drive is removable (i.e., a 
  3518. floppy disk or removable hard disk); otherwise returns "0". 
  3519.  
  3520.  
  3521. ΓòÉΓòÉΓòÉ 12.58. @REPEAT ΓòÉΓòÉΓòÉ
  3522.  
  3523. @REPEAT[c,n]:  Returns the character "c" repeated "n" times. 
  3524.  
  3525.  
  3526. ΓòÉΓòÉΓòÉ 12.59. @REXX ΓòÉΓòÉΓòÉ
  3527.  
  3528. @REXX[expr]:  Calls the REXX interpreter to execute the expression. Returns the 
  3529. result string from REXX; if the REXX expression does not return a string, @REXX 
  3530. returns the REXX numeric result code. 
  3531.  
  3532.  
  3533. ΓòÉΓòÉΓòÉ 12.60. @SEARCH ΓòÉΓòÉΓòÉ
  3534.  
  3535. @SEARCH[filename]:  Searches for the filename using the PATH environment 
  3536. variable, appending an extension if one isn't specified.  Returns the 
  3537. fully-expanded name of the file including drive, path, base name, and 
  3538. extension, or an empty string if a matching file is not found.  If wildcards 
  3539. are used in the filename, @SEARCH will search for the first file that matches 
  3540. the wildcard specification, and return the drive and path for that file plus 
  3541. the wildcard filename (e.g., E:\UTIL\*.COM ). 
  3542.  
  3543.  
  3544. ΓòÉΓòÉΓòÉ 12.61. @SELECT ΓòÉΓòÉΓòÉ
  3545.  
  3546. @SELECT[filename,top,left,bottom,right,title]:  Pops up a selection window with 
  3547. the lines from the specified file. Returns the text of the line the scrollbar 
  3548. is on if you press Enter, or an empty string if you press Esc.  @SELECT can be 
  3549. used to display menus or other selection lists from a batch file.  To select 
  3550. from lines passed through input redirection or a pipe, use CON as the filename. 
  3551. You can move through the selection window with standard navigation keystrokes. 
  3552. To change the navigation keys, see the Key Mapping directives in the .INI file. 
  3553.  
  3554.  
  3555. ΓòÉΓòÉΓòÉ 12.62. @SUBSTR ΓòÉΓòÉΓòÉ
  3556.  
  3557. @SUBSTR[string,start,length]:  Returns a substring, starting at the position 
  3558. "start" and continuing for "length" characters.  If the length is omitted, it 
  3559. will default to the remainder of the string.  If the length is negative, the 
  3560. start is relative to the right side of the string.  The first character in the 
  3561. string is numbered 0; if the length is negative, the last character is numbered 
  3562. 0.  For example, %@SUBSTR[%_TIME,0,2] gets the current time and extracts the 
  3563. hour.  If the string includes commas, it must be quoted with double quotes ["] 
  3564. or back quotes [`].  The quotes do count in calculating the position of the 
  3565. substring. @INSTR performs the same function, and allows commas in the string 
  3566. without quoting. 
  3567.  
  3568.  
  3569. ΓòÉΓòÉΓòÉ 12.63. @TIME ΓòÉΓòÉΓòÉ
  3570.  
  3571. @TIME[hh:mm:ss]:  Returns the number of seconds since midnight for the 
  3572. specified time.  The time must be in 24-hour format; "am" and "pm" cannot be 
  3573. used. 
  3574.  
  3575.  
  3576. ΓòÉΓòÉΓòÉ 12.64. @TIMER ΓòÉΓòÉΓòÉ
  3577.  
  3578. @TIMER[n]:  Returns the current split time for a stopwatch started with the 
  3579. TIMER command.  The value of "n" specifies the timer to read and can be 1, 2, 
  3580. or 3. 
  3581.  
  3582.  
  3583. ΓòÉΓòÉΓòÉ 12.65. @TRIM ΓòÉΓòÉΓòÉ
  3584.  
  3585. @TRIM[string]:  Returns the string with the leading and trailing white space 
  3586. (space and tab characters) removed. 
  3587.  
  3588.  
  3589. ΓòÉΓòÉΓòÉ 12.66. @UNIQUE ΓòÉΓòÉΓòÉ
  3590.  
  3591. @UNIQUE[d:\path]:  Creates a zero-length file with a unique name in the 
  3592. specified directory, and returns the full name and path.  If no path is 
  3593. specified, the file will be created in the current directory.  The file name 
  3594. will be FAT-compatible (8 character name and 3-character extension) regardless 
  3595. of whether the file is created on a FAT or HPFS drive.  This function allows 
  3596. you to create a  temporary file without overwriting an existing file. 
  3597.  
  3598.  
  3599. ΓòÉΓòÉΓòÉ 12.67. @UPPER ΓòÉΓòÉΓòÉ
  3600.  
  3601. @UPPER[string]:  Returns the string converted to upper case. 
  3602.  
  3603.  
  3604. ΓòÉΓòÉΓòÉ 12.68. @WORD ΓòÉΓòÉΓòÉ
  3605.  
  3606. @WORD[["xxx",]n,string]:  Returns the "nth" word in a string.  The first word 
  3607. is numbered 0.  If "n" is negative, words are returned from the end of the 
  3608. string.  The first argument is a list of word separators you want to use; if 
  3609. you don't specify it, only spaces, tabs, and commas are considered to be word 
  3610. separators.  For example: 
  3611.  
  3612.         %@WORD[2,NOW IS THE TIME]     returns "THE"
  3613.         %@WORD[-0,NOW IS THE TIME]    returns "TIME"
  3614.         %@WORD[-2,NOW IS THE TIME]    returns "IS"
  3615.         %@WORD["=",1,2 + 2=4]         returns "4"
  3616.  
  3617.  
  3618. ΓòÉΓòÉΓòÉ 12.69. @WORDS ΓòÉΓòÉΓòÉ
  3619.  
  3620. @WORDS[["xxx",]string]:  Returns the number of words in the string.  The 
  3621. optional list of separators follows the same format as @WORD.  If the "string" 
  3622. argument is enclosed in quotation marks, you must enter a list of separators as 
  3623. well. 
  3624.  
  3625.  
  3626. ΓòÉΓòÉΓòÉ 13. 4OS2.INI ΓòÉΓòÉΓòÉ
  3627.  
  3628. The configuration of 4OS2 is controlled through an optional file of 
  3629. initialization information called 4OS2.INI. 
  3630.  
  3631. This section contains general information on 4OS2.INI, and an example. For 
  3632. information on specific directives see the separate topic for each type of 
  3633. directive: 
  3634.  
  3635.             Initialization Directives 
  3636.             Configuration Directives 
  3637.             Color Directives 
  3638.             Key Mapping Directives 
  3639.             Advanced Directives 
  3640.  
  3641.  These topics list the directives, with a one-line description of each, and a 
  3642.  cross-reference which selects a full screen help topic on that directive. A 
  3643.  few of the directives are simple enough that the one-line description is 
  3644.  sufficient, but in most cases you should check for any additional information 
  3645.  in the cross-reference topic if you are not already familiar with the 
  3646.  directive. 
  3647.  
  3648.  You can also obtain help on most directives with a HELP directive command at 
  3649.  the prompt. 
  3650.  
  3651.  You can create, add to, and edit 4OS2.INI with any ASCII text editor.  4OS2 
  3652.  reads 4OS2.INI when it starts, and configures itself accordingly.  4OS2.INI is 
  3653.  not re-read when you change it.  For changes to take effect, you must restart 
  3654.  the session or window in which 4OS2 is running. 
  3655.  
  3656.  Each item that you can include in 4OS2.INI has a default value.  You only need 
  3657.  to include entries in the file for settings that you want to change from their 
  3658.  default values.  If you are happy with all of the default values, you don't 
  3659.  need an .INI file at all. 
  3660.  
  3661.  4OS2 primary shells search for the .INI file in three places: 
  3662.  
  3663.         *   If there is an "@d:\path\inifile" option on the 4OS2 startup 
  3664.             command liine 4OS2 will use the path and file name specified there, 
  3665.             and will not look elsewhere. 
  3666.         *   If there is no .INI file name on the startup command line, the 
  3667.             search proceeds to the same directory where the 4OS2 program file 
  3668.             (4OS2.EXE ) is stored.  This is the "normal" location for the .INI 
  3669.             file.  4OS2 determines this directory automatically.  You can also 
  3670.             set it yourself by placing a COMSPEC directory name on the startup 
  3671.             command line. 
  3672.         *   If the .INI file is not found in the directory where the program 
  3673.             file is stored, a final check is made in the root directory of the 
  3674.             boot drive. 
  3675.  
  3676.  When 4OS2 is loaded as a secondary shell, it does not search for the .INI 
  3677.  file.  Instead, it retrieves the primary shell's .INI file data, processes the 
  3678.  [Secondary] section of the original .INI file if necessary, and then processes 
  3679.  any "@d:\path\inifile" option on the secondary shell command line.  You can 
  3680.  override this behavior with the NextINIFile directive. 
  3681.  
  3682.  Most lines in the .INI file consist of a one-word directive, an equal sign 
  3683.  [=], and a value.  For example, in the following line, the word "History" is 
  3684.  the directive and "2048" is the value: 
  3685.  
  3686.           History = 2048
  3687.  
  3688.  Any spaces before or after the equal sign are ignored. 
  3689.  
  3690.  If you have a long string to enter in the .INI file (for example, for the 
  3691.  ColorDir directive), you must enter it all on one line.  Strings cannot be 
  3692.  "continued" to a second line.  Each line may be up to 1023 characters long. 
  3693.  
  3694.  The format of the value part of a directive line depends on the individual 
  3695.  directive.  It may be a numeric value, a single character, a choice (like 
  3696.  "Yes" or "No"), a color setting, a key name, a path, a filename, or a text 
  3697.  string.  The value begins with the first non-blank character after the equal 
  3698.  sign and ends at the end of the line or the beginning of a comment. 
  3699.  
  3700.  Blank lines are ignored in the .INI file and can be used to separate groups of 
  3701.  directives.  You can place comments in the file by beginning a line with a 
  3702.  semicolon [;].  You can also place comments at the end of any line except one 
  3703.  containing a text string value.  To do so, enter at least one space or tab 
  3704.  after the value, a semicolon, and your comment, like this: 
  3705.  
  3706.           History = 2048       ;set history list size
  3707.  
  3708.  If you try to place a comment at the end of a string value, the comment will 
  3709.  become part of the string and will probably cause an error. 
  3710.  
  3711.  When 4OS2 detects an error while processing the .INI file, it displays an 
  3712.  error message and prompts you to press a key to continue processing the file. 
  3713.  This allows you to note any errors before the startup process continues.  The 
  3714.  directive in error will retain its previous or default value.  Only the most 
  3715.  catastrophic errors (like a disk read failure) will terminate processing of 
  3716.  the remainder of the .INI file.  If you don't want a pause after each error, 
  3717.  use a PauseOnError = No directive at the beginning of the .INI file. 
  3718.  
  3719.  If you need to test different values for an .INI directive without repeatedly 
  3720.  editing the .INI file, see INIQuery. 
  3721.  
  3722.  The .INI file has three sections:  the first or global section, the [Primary] 
  3723.  section, and the [Secondary] section.  The global section consists of 
  3724.  directives at the beginning of the file, with no section name before them. 
  3725.  These directives are effective in all shells.  In most cases, this is the only 
  3726.  section you will need. 
  3727.  
  3728.  The [Primary] and [Secondary] sections include directives that are used in 
  3729.  primary and secondary shells respectively. Each section is identified by the 
  3730.  section name in square brackets on a line by itself.  You don't need to set up 
  3731.  these sections unless you want different directives for primary and secondary 
  3732.  shells. 
  3733.  
  3734.  Directives in the [Primary] section are used for the first or primary shell. 
  3735.  The values are passed automatically to all secondary shells, unless overridden 
  3736.  by a directive with the same name in the [Secondary] section. 
  3737.  
  3738.  Directives in the [Secondary] section are used in secondary shells only, and 
  3739.  override any corresponding primary shell settings. 
  3740.  
  3741.  Sections that begin with any name other than [Primary] or [Secondary] are 
  3742.  ignored. 
  3743.  
  3744.  The SETDOS command can override several of the .INI file directives.  For 
  3745.  example, the cursor shape used by 4OS2 can be adjusted either with the 
  3746.  CursorIns and CursorOver directives or the SETDOS /S command.  The 
  3747.  correspondence between SETDOS options and .INI directives is noted under each 
  3748.  directive below, and under each option of the SETDOS command. 
  3749.  
  3750.  This example configures certain special characters to match 4DOS, and changes 
  3751.  other default settings to suit the user's preferences.  All of these settings 
  3752.  except HelpBook would also work in 4DOS or 4DOS/NT. Note that the comments for 
  3753.  the HelpBook and ColorDir directives are on separate lines before the 
  3754.  directives themselves, as no comments are allowed in string directives: 
  3755.  
  3756.           PauseOnError = No             ;don't stop on INI errors
  3757.           CommandSep = ^                ;4DOS command separator
  3758.           ParameterChar = &             ;4DOS parameter character
  3759.           BatchEcho = No                ;default to ECHO OFF
  3760.                                         ;show only 4OS2 help for F1 / HELP
  3761.           HelpBook = 4OS2
  3762.           History = 2048                ;expand history to 2K bytes
  3763.           BeepFreq = 880                ;make beep higher pitch
  3764.           EditMode = Insert             ;insert mode for cmd edit
  3765.           CursorOver = 100              ;overstrike cursor 100%
  3766.           CursorIns = 10                ;insert cursor 10%
  3767.           ListFind = F5                 ;F5 does a find in LIST
  3768.           ListNext = F6                 ;and F6 does a find next
  3769.           StdColors = bri cya on blu    ;default colors
  3770.           ListColors = bri whi on blu   ;colors for LIST
  3771.           SelectColors = bri whi on blu ;same colors for SELECT
  3772.                                         ;set directory display colors
  3773.           colordir = DIRS:bri yel;com exe bat btm cmd:bri whi
  3774.  
  3775.  
  3776. ΓòÉΓòÉΓòÉ 13.1. Initialization Directives ΓòÉΓòÉΓòÉ
  3777.  
  3778. The directives in this section control how 4OS2 starts and where it looks for 
  3779. its files.  The initialization directives are: 
  3780.  
  3781.         4StartPath          Path for 4START and 4EXIT 
  3782.         DirHistory          Size of directory history list 
  3783.         HelpBook            Books to load in help system 
  3784.         History             Size of history list 
  3785.         INIQuery            Query for each line in 4OS2.INI 
  3786.         LocalAliases        Local vs. global aliases 
  3787.         LocalHistory        Local vs. global directory history 
  3788.         LocalHistory        Local vs. global history 
  3789.         PauseOnError        Pause on errors in 4OS2.INI 
  3790.         WindowState         Initial state for the 4OS2 window 
  3791.         WindowX, WindowY, WindowWidth, WindowHeightInitial size and position of 
  3792.                             the 4OS2 window 
  3793.  
  3794.  
  3795. ΓòÉΓòÉΓòÉ 13.1.1. 4StartPath ΓòÉΓòÉΓòÉ
  3796.  
  3797. 4StartPath = Path:  Sets the drive and directory where the 4START and 4EXIT 
  3798. batch files (if any) are located. 
  3799.  
  3800.  
  3801. ΓòÉΓòÉΓòÉ 13.1.2. DirHistory ΓòÉΓòÉΓòÉ
  3802.  
  3803. DirHistory = nnnn (256):  Sets the amount of memory allocated to the directory 
  3804. history in bytes.  The allowable range of values is 128 to 2048 bytes.  If you 
  3805. use a global directory history list the DirHistory value will be ignored in all 
  3806. shells except the shell which first establishes the global list. 
  3807.  
  3808.  
  3809. ΓòÉΓòÉΓòÉ 13.1.3. HelpBook ΓòÉΓòÉΓòÉ
  3810.  
  3811. HelpBook = String:  Sets the names of the "books" to be loaded when 4OS2 help 
  3812. is invoked with the HELP command or the F1 key.  The default is 4OS2+CMDREF 
  3813. which loads the 4OS2 help and the OS/2 command reference. 
  3814.  
  3815.  
  3816. ΓòÉΓòÉΓòÉ 13.1.4. History ΓòÉΓòÉΓòÉ
  3817.  
  3818. History = nnnn (1024):  Sets the amount of memory allocated to the command 
  3819. history list in bytes.  The allowable range of values is 256 to 8192 bytes.  If 
  3820. you use a global history list (see Command History and Recall), the History 
  3821. value is ignored in all shells except the shell which first establishes the 
  3822. global list. 
  3823.  
  3824.  
  3825. ΓòÉΓòÉΓòÉ 13.1.5. INIQuery ΓòÉΓòÉΓòÉ
  3826.  
  3827. INIQuery = Yes | NO:  If set to Yes, a prompt will be displayed before 
  3828. execution of each subsequent line in the current .INI file.  This allows you to 
  3829. modify certain directives when you start 4OS2 in order to test different 
  3830. configurations.  INIQuery can be reset to No at any point in the file. 
  3831. Normally INIQuery = Yes is only used during testing of other .INI file 
  3832. directives. 
  3833.  
  3834. The prompt generated by INIQuery = Yes is: 
  3835.  
  3836.         [contents of the line]  (Y/N/Q/R/E)  ?
  3837.  
  3838. At this prompt, you may enter: 
  3839.  
  3840.         Y = Yes:    Process this line and go on to the next. 
  3841.         N = No:     Skip this line and go on to the next. 
  3842.         Q = Quit:   Skip this line and all subsequent lines. 
  3843.         R = Rest:   Execute this and all subsequent lines. 
  3844.         E = Edit:   Edit the value for this entry. 
  3845.  
  3846.  If you choose E for Edit, you can enter a new value for the directive, but not 
  3847.  a new directive name. 
  3848.  
  3849.  For example, if you have found a compatibility problem you think may be 
  3850.  related to 4OS2's character (as opposed to line) input mode, you might change 
  3851.  your 4OS2.INI file so a part of it read as follows: 
  3852.  
  3853.           INIQuery = Yes
  3854.           LineInput = Yes
  3855.           INIQuery = No
  3856.  
  3857.  You could then choose to process, ignore, or edit the LineInput directive each 
  3858.  time 4OS2 started.  This would allow you to check whether changing the line 
  3859.  input mode would resolve the compatibility problem. 
  3860.  
  3861.  
  3862. ΓòÉΓòÉΓòÉ 13.1.6. LocalAliases ΓòÉΓòÉΓòÉ
  3863.  
  3864. LocalAliases = Yes | NO:  No forces all copies of 4OS2 to share the same alias 
  3865. list.  Yes keeps the lists for each shell separate.  See ALIAS for more details 
  3866. on local and global alias lists. 
  3867.  
  3868.  
  3869. ΓòÉΓòÉΓòÉ 13.1.7. LocalDirHistory ΓòÉΓòÉΓòÉ
  3870.  
  3871. LocalDirHistory = Yes | NO:  No forces all copies of command processor to share 
  3872. the same directory history.  Yes keeps the directory histories for each shell 
  3873. separate.  See Local and Global Directory History for more details. 
  3874.  
  3875.  
  3876. ΓòÉΓòÉΓòÉ 13.1.8. LocalHistory ΓòÉΓòÉΓòÉ
  3877.  
  3878. LocalHistory = Yes | NO:  No forces all copies of 4OS2 to share the same 
  3879. history list.  Yes keeps the lists for each shell separate.  See Command 
  3880. History and Recall for more details on local and global history lists. 
  3881.  
  3882.  
  3883. ΓòÉΓòÉΓòÉ 13.1.9. PauseOnError ΓòÉΓòÉΓòÉ
  3884.  
  3885. PauseOnError = YES | No:  Yes forces a pause with the message "Error in 
  3886. filename, press any key to continue processing" after displaying any error 
  3887. message related to a specific line in the .INI file.  No continues processing 
  3888. with no pause after an error message is displayed. 
  3889.  
  3890.  
  3891. ΓòÉΓòÉΓòÉ 13.1.10. WindowState ΓòÉΓòÉΓòÉ
  3892.  
  3893. WindowState = STANDARD | Maximize | Minimize:  Sets the initial state of the 
  3894. 4OS2 window.  Standard puts the window in the default position on the OS/2 
  3895. desktop, and is the default setting. Maximize maximizes the window; Minimize 
  3896. minimizes it.  If you use Maximize or Minimize, you may see the 4OS2 window 
  3897. appear briefly in the Standard position as it is created by OS/2, then switch 
  3898. to the new state. 
  3899.  
  3900.  
  3901. ΓòÉΓòÉΓòÉ 13.1.11. WindowX, WindowY, WindowWidth, WindowHeight ΓòÉΓòÉΓòÉ
  3902.  
  3903. WindowX = nnnn, WindowY = nnnn, WindowWidth = nnnn, WindowHeight = nnnn:  These 
  3904. 4 directives set the initial size and position of the 4OS2 window.  The 
  3905. measurements are in pixels or pels.  WindowX and WindowY refer to the position 
  3906. of the bottom left corner of the window relative to the bottom left corner of 
  3907. the screen. 
  3908.  
  3909.  
  3910. ΓòÉΓòÉΓòÉ 13.2. Configuration Directives ΓòÉΓòÉΓòÉ
  3911.  
  3912. These directives control the way that 4OS2 operate.  Some can be changed with 
  3913. the SETDOS command while 4OS2 is running. Any corresponding SETDOS command is 
  3914. listed in the description of each directive.  The configuration directives are: 
  3915.  
  3916.         AmPm                Time display format 
  3917.         BatchEcho           Default batch file echo state 
  3918.         BeepFreq            Default beep frequency 
  3919.         BeepLength          Default beep length 
  3920.         CommandSep          Multiple command separator character 
  3921.         CursorIns           Cursor shape in insert mode 
  3922.         CursorOver          Cursor shape in overstrike mode 
  3923.         DescriptionMax      Maximum length of file descriptions 
  3924.         DescriptionName     Name of file to hold file descriptions 
  3925.         Descriptions        Enable / disable description processing 
  3926.         EditMode            Editing mode (insert / overstrike) 
  3927.         EscapeChar          4OS2 escape character 
  3928.         EvalMax             Max digits after decimal point in @EVAL 
  3929.         EvalMin             Min digits after decimal point in @EVAL 
  3930.         ExecWait            Wait for external programs at command line 
  3931.         HistCopy            History copy mode 
  3932.         HistLogName         History log file name 
  3933.         HistMin             Minimum command length to save 
  3934.         HistWinColors       History window colors 
  3935.         HistWinHeight       History window height 
  3936.         HistWinLeft         History window left side position 
  3937.         HistWinTop          History window top position 
  3938.         HistWinWidth        History window width 
  3939.         LineInput           Enable / disable line input mode 
  3940.         LogName             Log file name 
  3941.         NoClobber           Overwrite protection for output redirection 
  3942.         ParameterChar       Alias / batch file parameter character 
  3943.         Printer             LIST print device 
  3944.         ScreenRows          Screen height 
  3945.         SwapFilePath        Path to OS/2 swap file 
  3946.         UpperCase           Force file names to upper case 
  3947.  
  3948.  
  3949. ΓòÉΓòÉΓòÉ 13.2.1. AmPm ΓòÉΓòÉΓòÉ
  3950.  
  3951. AmPm = Yes | NO | Auto:  Yes displays times in 12-hour format with a trailing 
  3952. "a" for AM or "p" for PM.  The default of No forces a display in 24-hour time 
  3953. format.  Auto formats the time according to the country code set for your 
  3954. system.  AmPm controls the time displays used by DIR and SELECT, in LOG files, 
  3955. and the output of the TIMER, DATE, and TIME commands.  It has no effect on 
  3956. %_TIME, %@MAKETIME, the $t and $T options of PROMPT, or date and time ranges. 
  3957.  
  3958.  
  3959. ΓòÉΓòÉΓòÉ 13.2.2. BatchEcho ΓòÉΓòÉΓòÉ
  3960.  
  3961. BatchEcho = YES | No:  Sets the default batch echo mode. Yes enables echoing of 
  3962. all batch file commands unless ECHO is explicitly set off in the batch file. 
  3963. No disables batch file echoing unless ECHO is explicitly set on.  Also see 
  3964. SETDOS /V. 
  3965.  
  3966.  
  3967. ΓòÉΓòÉΓòÉ 13.2.3. BeepFreq ΓòÉΓòÉΓòÉ
  3968.  
  3969. BeepFreq = nnnn (440):  Sets the default BEEP command frequency in Hz.  This is 
  3970. also the frequency for "error" beeps (for example, if you press an illegal 
  3971. key).  To disable all error beeps set this or BeepLength to 0.  If you do, the 
  3972. BEEP command will still be operable, but will not produce sound unless you 
  3973. explicitly specify the frequency and duration. 
  3974.  
  3975.  
  3976. ΓòÉΓòÉΓòÉ 13.2.4. BeepLength ΓòÉΓòÉΓòÉ
  3977.  
  3978. BeepLength = nnnn (2):  Sets the default BEEP length in system clock ticks 
  3979. (approximately 1/18 of a second per tick). BeepLength is also the default 
  3980. length for "error" beeps (for example, if you press an illegal key). 
  3981.  
  3982.  
  3983. ΓòÉΓòÉΓòÉ 13.2.5. CommandSep ΓòÉΓòÉΓòÉ
  3984.  
  3985. CommandSep = c:  This is the character used to separate multiple commands on 
  3986. the same line.  The default is the ampersand [&]. You cannot use any of the 
  3987. redirection characters (| > < ) or any of the whitespace characters (space, 
  3988. tab, comma, or equal sign).  Also see SETDOS /C, the %+ internal variable, and 
  3989. 4DOS, 4OS2, and 4DOS/NT Compatibility for information on using compatible 
  3990. command separators for two or more products. 
  3991.  
  3992.  
  3993. ΓòÉΓòÉΓòÉ 13.2.6. CursorIns ΓòÉΓòÉΓòÉ
  3994.  
  3995. CursorIns = nnnn (100):  This is the shape of the cursor for insert mode during 
  3996. command-line editing and all commands which accept line input (DESCRIBE, ESET, 
  3997. etc.).  The size is a percentage of the total character cell size, between 0% 
  3998. and 100%.  Because of the way video drivers map the cursor shape, you may not 
  3999. get a smooth progression in cursor shapes as CursorIns and CursorOver change. 
  4000. If CursorIns or CursorOver is set to -1, 4OS2 will not attempt to modify the 
  4001. cursor shape at all; you can use this feature to give another program full 
  4002. control of the cursor shape. Also see CursorOver and SETDOS /S. 
  4003.  
  4004.  
  4005. ΓòÉΓòÉΓòÉ 13.2.7. CursorOver ΓòÉΓòÉΓòÉ
  4006.  
  4007. CursorOver = nnnn (15):  This is the shape of the cursor for overtype mode 
  4008. during command-line editing and all commands which accept line input.  The size 
  4009. is a percentage of the total character cell size, between 0% and 100%.  For 
  4010. details see CursorIns; also see SETDOS /S. 
  4011.  
  4012.  
  4013. ΓòÉΓòÉΓòÉ 13.2.8. DescriptionMax ΓòÉΓòÉΓòÉ
  4014.  
  4015. DescriptionMax = nnnn (40):  Controls the description length limit for 
  4016. DESCRIBE.  The allowable range is 20 to 511 characters. 
  4017.  
  4018.  
  4019. ΓòÉΓòÉΓòÉ 13.2.9. DescriptionName ΓòÉΓòÉΓòÉ
  4020.  
  4021. DescriptionName = File:  Sets the file name in which to store file 
  4022. descriptions.  The default file name is DESCRIPT.ION.  Use this directive with 
  4023. caution because changing the name from the default will make it difficult to 
  4024. transfer file descriptions to another system.  Also see SETDOS /D. 
  4025.  
  4026.  
  4027. ΓòÉΓòÉΓòÉ 13.2.10. Descriptions ΓòÉΓòÉΓòÉ
  4028.  
  4029. Descriptions = YES | No:  Turns description handling on or off during the file 
  4030. processing commands COPY, DEL, MOVE, and REN.  If set to No, 4OS2 will not 
  4031. update the description file when files are moved, copied, deleted or renamed. 
  4032. Also see SETDOS /D. 
  4033.  
  4034.  
  4035. ΓòÉΓòÉΓòÉ 13.2.11. EditMode ΓòÉΓòÉΓòÉ
  4036.  
  4037. EditMode = Insert | OVERSTRIKE:  This directive lets you start the command-line 
  4038. editor in either insert or overstrike mode.  Also see SETDOS /M. 
  4039.  
  4040.  
  4041. ΓòÉΓòÉΓòÉ 13.2.12. EscapeChar ΓòÉΓòÉΓòÉ
  4042.  
  4043. EscapeChar = c :  Sets the character used to suppress the normal meaning of the 
  4044. following character.  The default is a caret [^]. See Escape Character for a 
  4045. description of special escape sequences.  You cannot use any of the redirection 
  4046. characters (|, >, or < ) or the whitespace characters (space, tab, comma, or 
  4047. equal sign) as the escape character.  Also see SETDOS /E, the %= internal 
  4048. variable, and 4DOS, 4OS2, and 4DOS/NT Compatibility for information on using 
  4049. compatible escape characters for two or more products. 
  4050.  
  4051.  
  4052. ΓòÉΓòÉΓòÉ 13.2.13. EvalMax ΓòÉΓòÉΓòÉ
  4053.  
  4054. EvalMax = nnnn (8):  Controls the maximum number of digits after the decimal 
  4055. point in values returned by @EVAL. This setting can be overridden with the 
  4056. construct @EVAL[expression=n.n].  The allowable range is 0 to 8.  Also see 
  4057. EvalMin and SETDOS /F. 
  4058.  
  4059.  
  4060. ΓòÉΓòÉΓòÉ 13.2.14. EvalMin ΓòÉΓòÉΓòÉ
  4061.  
  4062. EvalMin = nnnn (8):  Controls the minimum number of digits after the decimal 
  4063. point in values returned by @EVAL.  This setting can be overridden with the 
  4064. construct @EVAL[expression=n.n].  The allowable range is 0 to 8.  The EvalMin 
  4065. value will be ignored if it is larger than EvalMax.  Also see SETDOS /F. 
  4066.  
  4067.  
  4068. ΓòÉΓòÉΓòÉ 13.2.15. ExecWait ΓòÉΓòÉΓòÉ
  4069.  
  4070. ExecWait = Yes | NO:  Controls whether 4OS2 waits for an external program to 
  4071. complete before redisplaying the prompt. This setting applies only to 
  4072. applications started from the 4OS2 prompt. 4OS2 will always wait for 
  4073. applications run from batch files.  ExecWait also has no effect on applications 
  4074. started with the START command, which has its own separate /WAIT switch. 
  4075.  
  4076.  
  4077. ΓòÉΓòÉΓòÉ 13.2.16. HistCopy ΓòÉΓòÉΓòÉ
  4078.  
  4079. HistCopy = Yes | NO:  Controls what happens when you re-execute a line from the 
  4080. command history.  If this option is set to Yes, the line is appended to the end 
  4081. of the history list.  By default, or if this option is set to No, no copy of 
  4082. the command is made.  The original copy of the command is always retained at 
  4083. its original position in the list, regardless of the setting of HistCopy. 
  4084.  
  4085.  
  4086. ΓòÉΓòÉΓòÉ 13.2.17. HistLogName ΓòÉΓòÉΓòÉ
  4087.  
  4088. HistLogName = File:  Sets the history log file name and path.  Using 
  4089. HistLogName does not turn history logging on; you must use a LOG /H ON command 
  4090. to do so. 
  4091.  
  4092.  
  4093. ΓòÉΓòÉΓòÉ 13.2.18. HistMin ΓòÉΓòÉΓòÉ
  4094.  
  4095. HistMin = nnnn (0):  Sets the minimum command-line size to save in the command 
  4096. history list.  Any command line whose length is less than this value will not 
  4097. be saved.  Legal values range from 0, which saves everything, to 1024, which 
  4098. disables all command history saves. 
  4099.  
  4100.  
  4101. ΓòÉΓòÉΓòÉ 13.2.19. HistWinColors ΓòÉΓòÉΓòÉ
  4102.  
  4103. HistWinColors = Color:  Sets the default colors for the command- line and 
  4104. directory history windows.  If this directive is not used the colors will be 
  4105. reversed from the current colors on the screen. 
  4106.  
  4107.  
  4108. ΓòÉΓòÉΓòÉ 13.2.20. HistWinHeight ΓòÉΓòÉΓòÉ
  4109.  
  4110. HistWinHeight = nn (12):  Sets the height of the command-line and directory 
  4111. history windows in lines, including the border.  Legal values range from 5 to 
  4112. the height of your screen.  Any value which would cause the bottom of the 
  4113. window to be off the screen will be adjusted so that the entire window remains 
  4114. on the screen. 
  4115.  
  4116.  
  4117. ΓòÉΓòÉΓòÉ 13.2.21. HistWinLeft ΓòÉΓòÉΓòÉ
  4118.  
  4119. HistWinLeft = nn (40):  Sets the horizontal position of the left side of the 
  4120. command-line and directory history windows.  Legal values range from 0 (the 
  4121. left edge of the screen) to the number of columns on your screen minus 10.  Any 
  4122. value which would cause the right side of a minimum-width window to be off the 
  4123. screen will be adjusted so that the entire window remains on the screen. 
  4124.  
  4125.  
  4126. ΓòÉΓòÉΓòÉ 13.2.22. HistWinTop ΓòÉΓòÉΓòÉ
  4127.  
  4128. HistWinTop = nn (1):  Sets the vertical position of the top of the command-line 
  4129. and directory history windows.  Legal values range from 0 (the top of the 
  4130. screen) to the number of rows on your screen minus 5.  Any value which would 
  4131. cause the bottom of a minimum- height window to be off the screen will be 
  4132. adjusted so that the entire window remains on the screen. 
  4133.  
  4134.  
  4135. ΓòÉΓòÉΓòÉ 13.2.23. HistWinWidth ΓòÉΓòÉΓòÉ
  4136.  
  4137. HistWinWidth = nn (36):  Sets the width of the command-line and directory 
  4138. history windows in characters, including the border. Legal values range from 10 
  4139. to the width of your screen.  Any value which would cause the right side of the 
  4140. window to be off the screen will be adjusted so that the entire window remains 
  4141. on the screen. 
  4142.  
  4143.  
  4144. ΓòÉΓòÉΓòÉ 13.2.24. LineInput ΓòÉΓòÉΓòÉ
  4145.  
  4146. LineInput = Yes | NO:  This directive controls how 4OS2 gets its input from the 
  4147. command line.  Yes forces 4OS2 to perform line-by-line input, just as CMD.EXE 
  4148. does, instead of character-by-character input.  This will disable command-line 
  4149. editing, history recall, the directory history window, and filename completion, 
  4150. and will reduce the 4OS2 input length limit from 1023 characters to 299 
  4151. characters.  It is normally used only for applications which do not work 
  4152. properly unless 4OS2 uses line input.  If you have a particular program that 
  4153. requires line input, you can use SETDOS /L to temporarily change modes.  See 
  4154. README.DOC for information on programs which require this option. 
  4155.  
  4156.  
  4157. ΓòÉΓòÉΓòÉ 13.2.25. LogName ΓòÉΓòÉΓòÉ
  4158.  
  4159. LogName = File:  Sets the log file name and path.  Using LogName does not turn 
  4160. logging on; you must use a LOG ON command to do so. 
  4161.  
  4162.  
  4163. ΓòÉΓòÉΓòÉ 13.2.26. NoClobber ΓòÉΓòÉΓòÉ
  4164.  
  4165. NoClobber = Yes | NO:  If set to Yes, will prevent standard output redirection 
  4166. from overwriting an existing file, and will require that the output file 
  4167. already exist for append redirection.  Also see SETDOS /N. 
  4168.  
  4169.  
  4170. ΓòÉΓòÉΓòÉ 13.2.27. ParameterChar ΓòÉΓòÉΓòÉ
  4171.  
  4172. ParameterChar = c:  Sets the character used after a percent sign to specify all 
  4173. or all remaining command-line arguments in a batch file or alias (e.g., %& or 
  4174. %n&; see Batch Files and ALIAS).  The default is the ampersand [&].  Also see 
  4175. SETDOS /P.  See 4DOS, 4OS2, and 4DOS/NT Compatibility for information on using 
  4176. compatible parameter characters for two or more products.. 
  4177.  
  4178.  
  4179. ΓòÉΓòÉΓòÉ 13.2.28. Printer ΓòÉΓòÉΓòÉ
  4180.  
  4181. Printer = devicename:  Sets the output device that the LIST command will print 
  4182. to.  By default, LPT1 is used. The device can be PRN, LPT1 to 3, COM1 to 4, NUL 
  4183. (which will disable printed output) or any other installed character device. 
  4184.  
  4185.  
  4186. ΓòÉΓòÉΓòÉ 13.2.29. ScreenRows ΓòÉΓòÉΓòÉ
  4187.  
  4188. ScreenRows = nnnn:  Sets the number of screen rows used by the video display. 
  4189. Normally the screen size is determined automatically, but if you have a 
  4190. non-standard display you may need to set it explicitly.  This value does not 
  4191. affect screen scrolling, which is controlled by OS/2 and your video driver. 
  4192. ScreenRows is used only by the LIST and SELECT commands, the paged output 
  4193. options of other commands (e.g., TYPE /P), and error checking in the screen 
  4194. output commands.  Also see SETDOS /R. 
  4195.  
  4196.  
  4197. ΓòÉΓòÉΓòÉ 13.2.30. SwapFilePath ΓòÉΓòÉΓòÉ
  4198.  
  4199. SwapFilePath = Path:  Specifies the path to the OS/2 swap file so the MEMORY 
  4200. command can find it and display its size.  This directive is only required if 
  4201. the swap file is not stored in the \OS2\SYSTEM directory of the boot drive. 
  4202.  
  4203.  
  4204. ΓòÉΓòÉΓòÉ 13.2.31. UpperCase ΓòÉΓòÉΓòÉ
  4205.  
  4206. UpperCase = Yes | NO:  Yes specifies that file and directory names should be 
  4207. displayed in the traditional upper-case by internal commands like COPY and DIR. 
  4208. No allows the normal 4OS2 lower-case style. This directive does not affect the 
  4209. display of filenames on HPFS drives.  Also see SETDOS /U. 
  4210.  
  4211.  
  4212. ΓòÉΓòÉΓòÉ 13.3. Color Directives ΓòÉΓòÉΓòÉ
  4213.  
  4214. These directives control the colors that 4OS2 use for its displays. Screen 
  4215. border colors can only be set in StdColors.  "BORder" color specifications 
  4216. included in other directives will be ignored.  For complete details on color 
  4217. names see Colors and Color Names.  The color directives are: 
  4218.  
  4219.         BrightBG                Bright background colors 
  4220.         ColorDir                Directory colors 
  4221.         InputColors             Input colors 
  4222.         ListColors              LIST display colors 
  4223.         ListStatBarColors       LIST status bar colors 
  4224.         SelectColors            SELECT display colors 
  4225.         SelectStatBarColors     SELECT status bar colors 
  4226.         StdColors               Standard display colors 
  4227.  
  4228.  
  4229. ΓòÉΓòÉΓòÉ 13.3.1. BrightBG ΓòÉΓòÉΓòÉ
  4230.  
  4231. BrightBG = Yes | No.  If set to Yes, 4OS2 will enable bright background colors 
  4232. in full-screen sessions.  If set to No, bright backgrounds will be disabled but 
  4233. blinking foreground characters will be enabled.  If BrightBG is not used, 4OS2 
  4234. will not adjust the bright background / blinking foreground switch at all. 
  4235. Most color video boards default to a blinking foreground with bright background 
  4236. colors disabled.  See also SETDOS /B. 
  4237.  
  4238. Using BrightBG requires careful attention to interactions of display type, 
  4239. mode, and color.  For a detailed explanation, see Colors and Color Names. 
  4240.  
  4241.  
  4242. ΓòÉΓòÉΓòÉ 13.3.2. ColorDir ΓòÉΓòÉΓòÉ
  4243.  
  4244. ColorDir = ext1 ext2 ...:colora;ext3 ext4 ... :colorb; ...: Sets the directory 
  4245. colors used by DIR and SELECT.  The format is the same as that used for the 
  4246. COLORDIR environment variable.  See Color-Coded Directories for a detailed 
  4247. explanation. 
  4248.  
  4249.  
  4250. ΓòÉΓòÉΓòÉ 13.3.3. InputColors ΓòÉΓòÉΓòÉ
  4251.  
  4252. InputColors = Color:  Sets the colors used for command-line input.  This 
  4253. setting is useful for making your input stand out from the normal output. 
  4254.  
  4255.  
  4256. ΓòÉΓòÉΓòÉ 13.3.4. ListColors ΓòÉΓòÉΓòÉ
  4257.  
  4258. ListColors = Color:  Sets the colors used by the LIST command.  If this 
  4259. directive is not used, LIST will use the current default colors set by the CLS 
  4260. or COLOR command or by the StdColors directive. 
  4261.  
  4262.  
  4263. ΓòÉΓòÉΓòÉ 13.3.5. ListStatBarColors ΓòÉΓòÉΓòÉ
  4264.  
  4265. ListStatBarColors = Color:  Sets the colors used on the LIST status bar.  If 
  4266. this directive is not used, LIST will set the status bar to the reverse of the 
  4267. screen color (the screen color is controlled by ListColors). 
  4268.  
  4269.  
  4270. ΓòÉΓòÉΓòÉ 13.3.6. SelectColors ΓòÉΓòÉΓòÉ
  4271.  
  4272. SelectColors = Color:  Sets the color used by the SELECT command.  If this 
  4273. directive is not used, SELECT will use the current default colors set by the 
  4274. CLS or COLOR command or by the StdColors directive. 
  4275.  
  4276.  
  4277. ΓòÉΓòÉΓòÉ 13.3.7. SelectStatBarColors ΓòÉΓòÉΓòÉ
  4278.  
  4279. SelectStatBarColors = Color:  Sets the color used on the SELECT status bar.  If 
  4280. this directive is not used, SELECT will set the status bar to the reverse of 
  4281. the screen color (the screen color is controlled by SelectColors). 
  4282.  
  4283.  
  4284. ΓòÉΓòÉΓòÉ 13.3.8. StdColors ΓòÉΓòÉΓòÉ
  4285.  
  4286. StdColors = Color:  Sets the standard colors to be used when CLS is used 
  4287. without a color specification, and for LIST and SELECT if ListColors and 
  4288. SelectColors are not used.  Using this directive is similar to placing a COLOR 
  4289. command in AUTOEXEC.BAT.  StdColors takes effect the first time CLS, LIST, or 
  4290. SELECT is used after 4OS2 starts, but will not affect the color of error or 
  4291. other messages displayed during the loading and initialization process. 
  4292.  
  4293.  
  4294. ΓòÉΓòÉΓòÉ 13.4. Key Mapping Directives ΓòÉΓòÉΓòÉ
  4295.  
  4296. These directives allow you to change the keys used for command-line editing and 
  4297. other internal functions.  They are divided into four types, depending on the 
  4298. context in which the keys are used.  For a discussion and list of directives 
  4299. for each type see: 
  4300.  
  4301.             General Input Keys 
  4302.             Command-Line Editing Keys 
  4303.             History and @SELECT Window Keys 
  4304.             LIST Keys 
  4305.  
  4306.  Using a key mapping directive allows you to assign a different or additional 
  4307.  key to perform the function described.  For example, to use function key F3 to 
  4308.  invoke the HELP facility (normally invoked with F1): 
  4309.  
  4310.           Help = F3
  4311.  
  4312.  Any directive can be used multiple times to assign multiple keys to the same 
  4313.  function.  For example: 
  4314.  
  4315.           ListFind = F            ;F does a find in LIST
  4316.           ListFind = F5           ;F5 also does a find in LIST
  4317.  
  4318.  Use some care when you reassign keystrokes.  If you assign a default key to a 
  4319.  different function, it will no longer be available for its original use.  For 
  4320.  example, if you assign F1 to the AddFile directive (a part of filename 
  4321.  completion), the F1 key will no longer invoke the help system, so you will 
  4322.  probably want to assign a different key to Help. 
  4323.  
  4324.  See Keys and Key Names before using the key mapping directives. 
  4325.  
  4326.  Key assignments are processed before looking for keystroke aliases.  For 
  4327.  example, if you assign Shift-F1 to HELP and also assign Shift-F1 to a key 
  4328.  alias, the key alias will be ignored. 
  4329.  
  4330.  Assigning a new keystroke for a function does not deassign the default 
  4331.  keystroke for the same function.  If you want to deassign one of the default 
  4332.  keys, use the NormalKey directive described below or the corresponding 
  4333.  directive for keys in the other key groups (NormalEditKey, NormalHWinKey, or 
  4334.  NormalListKey). 
  4335.  
  4336.  
  4337. ΓòÉΓòÉΓòÉ 13.4.1. General Input Keys ΓòÉΓòÉΓòÉ
  4338.  
  4339. These directives apply to all input.  They are in effect whenever 4OS2 requests 
  4340. input from the keyboard, including during command-line editing and the 
  4341. DESCRIBE, ESET, INPUT, LIST, and SELECT commands.  The general input keys are: 
  4342.  
  4343.         Backspace           Deletes the character to the left of the cursor 
  4344.         BeginLine           Moves the cursor to the start of the line 
  4345.         Del                 Deletes the character at the cursor 
  4346.         DelToBeginning      Deletes from the cursor to the start of the line 
  4347.         DelToEnd            Deletes from the cursor to the end of the line 
  4348.         DelWordLeft         Deletes the word to the left of the cursor 
  4349.         DelWordRight        Deletes the word to the right of the cursor 
  4350.         Down                * Moves the cursor or scrolls the display down 
  4351.         EndLine             Moves the cursor to the end of the line 
  4352.         EraseLine           Deletes the entire line 
  4353.         ExecLine            Executes or accepts a line 
  4354.         Ins                 Toggles insert / overstrike mode 
  4355.         Left                * Moves the cursor or scrolls the display left 
  4356.         NormalKey           * Deassigns a key 
  4357.         Right               * Moves the cursor or scrolls the display right 
  4358.         Up                  * Moves the cursor or scrolls the display up 
  4359.         WordLeft            Moves the cursor left one word 
  4360.         WordRight           Moves the cursor right one word 
  4361.  
  4362.  
  4363. ΓòÉΓòÉΓòÉ 13.4.1.1. Backspace ΓòÉΓòÉΓòÉ
  4364.  
  4365. Backspace = Key (Bksp):  Deletes the character to the left of the cursor. 
  4366.  
  4367.  
  4368. ΓòÉΓòÉΓòÉ 13.4.1.2. BeginLine ΓòÉΓòÉΓòÉ
  4369.  
  4370. BeginLine = Key (Home):  Moves the cursor to the beginning of the line. 
  4371.  
  4372.  
  4373. ΓòÉΓòÉΓòÉ 13.4.1.3. ┬áDel ΓòÉΓòÉΓòÉ
  4374.  
  4375. Del = Key (Del):  Deletes the character at the cursor. 
  4376.  
  4377.  
  4378. ΓòÉΓòÉΓòÉ 13.4.1.4. DelToBeginning ΓòÉΓòÉΓòÉ
  4379.  
  4380. DelToBeginning = Key (Ctrl-Home):  Deletes from the cursor to the start of the 
  4381. line. 
  4382.  
  4383.  
  4384. ΓòÉΓòÉΓòÉ 13.4.1.5. DelToEnd ΓòÉΓòÉΓòÉ
  4385.  
  4386. DelToEnd = Key (Ctrl-End):  Deletes from the cursor to the end of the line. 
  4387.  
  4388.  
  4389. ΓòÉΓòÉΓòÉ 13.4.1.6. DelWordLeft ΓòÉΓòÉΓòÉ
  4390.  
  4391. DelWordLeft = Key (Ctrl-L):  Deletes the word to the left of the cursor. 
  4392.  
  4393.  
  4394. ΓòÉΓòÉΓòÉ 13.4.1.7. DelWordRight ΓòÉΓòÉΓòÉ
  4395.  
  4396. DelWordRight = Key (Ctrl-R, Ctrl-Bksp):  Deletes the word to the right of the 
  4397. cursor.  See ClearKeyMap if you need to remove the default mapping of Ctrl-Bksp 
  4398. to this function. 
  4399.  
  4400.  
  4401. ΓòÉΓòÉΓòÉ 13.4.1.8. Down ΓòÉΓòÉΓòÉ
  4402.  
  4403. Down = Key (Down):  Scrolls the display down one line in LIST; moves the cursor 
  4404. down one line in SELECT and in the command-line history, directory history, or 
  4405. %@SELECT window.  (Scrolling down through the command history at the prompt is 
  4406. controlled by NextHistory, not by this directive.) 
  4407.  
  4408.  
  4409. ΓòÉΓòÉΓòÉ 13.4.1.9. EndLine ΓòÉΓòÉΓòÉ
  4410.  
  4411. EndLine = Key (End):  Moves the cursor to the end of the line. 
  4412.  
  4413.  
  4414. ΓòÉΓòÉΓòÉ 13.4.1.10. EraseLine ΓòÉΓòÉΓòÉ
  4415.  
  4416. EraseLine = Key (Esc):  Deletes the entire line. 
  4417.  
  4418.  
  4419. ΓòÉΓòÉΓòÉ 13.4.1.11. ExecLine ΓòÉΓòÉΓòÉ
  4420.  
  4421. ExecLine = Key (Enter):  Executes or accepts a line. 
  4422.  
  4423.  
  4424. ΓòÉΓòÉΓòÉ 13.4.1.12. Ins ΓòÉΓòÉΓòÉ
  4425.  
  4426. Ins = Key (Ins):  Toggles insert / overstrike mode during line editing. 
  4427.  
  4428.  
  4429. ΓòÉΓòÉΓòÉ 13.4.1.13. Left ΓòÉΓòÉΓòÉ
  4430.  
  4431. Left = Key (Left):  Moves the cursor left one character; scrolls the display 
  4432. left 8 columns in LIST; scrolls the display left 4 columns in the command-line, 
  4433. directory history, or %@SELECT window. 
  4434.  
  4435.  
  4436. ΓòÉΓòÉΓòÉ 13.4.1.14. NormalKey ΓòÉΓòÉΓòÉ
  4437.  
  4438. NormalKey = Key:  Deassigns a general input key in order to disable the usual 
  4439. meaning of the key within 4OS2 and/or make it available for keystroke aliases. 
  4440. This will make the keystroke operate as a "normal" key with no special 
  4441. function.  For example: 
  4442.  
  4443.         NormalKey = Ctrl-End
  4444.  
  4445. will disable Ctrl-End, which is the standard "delete to end of line" key. 
  4446. Ctrl-End could then be assigned to a keystroke alias. Another key could be 
  4447. assigned the "delete to end of line" function with the DelToEnd directive. 
  4448.  
  4449.  
  4450. ΓòÉΓòÉΓòÉ 13.4.1.15. Right ΓòÉΓòÉΓòÉ
  4451.  
  4452. Right = Key (Right):  Moves the cursor right one character; scrolls the display 
  4453. right 8 columns in LIST; scrolls the display right 4 columns in the 
  4454. command-line history, directory history, or %@SELECT window. 
  4455.  
  4456.  
  4457. ΓòÉΓòÉΓòÉ 13.4.1.16. Up ΓòÉΓòÉΓòÉ
  4458.  
  4459. Up = Key (Up):  Scrolls the display up one line in LIST; moves the cursor up 
  4460. one line in SELECT and in the command-line history, directory history, or 
  4461. %@SELECT window.  (Scrolling up through the command history at the prompt is 
  4462. controlled by PrevHistory, not by this directive.) 
  4463.  
  4464.  
  4465. ΓòÉΓòÉΓòÉ 13.4.1.17. WordLeft ΓòÉΓòÉΓòÉ
  4466.  
  4467. WordLeft = Key (Ctrl-Left):  Moves the cursor left one word; scrolls the 
  4468. display left 40 columns in LIST. 
  4469.  
  4470.  
  4471. ΓòÉΓòÉΓòÉ 13.4.1.18. WordRight ΓòÉΓòÉΓòÉ
  4472.  
  4473. WordRight = Key (Ctrl-Right):  Moves the cursor right one word; scrolls the 
  4474. display right 40 columns in LIST. 
  4475.  
  4476.  
  4477. ΓòÉΓòÉΓòÉ 13.4.2. Command-Line Editing Keys ΓòÉΓòÉΓòÉ
  4478.  
  4479. These directives apply only to command-line editing.  They are only effective 
  4480. at the 4OS2 prompt.  The command-line editing keys are: 
  4481.  
  4482.         AddFile             Keeps filename completion entry and adds another 
  4483.         CommandEscape       Allows direct entry of a keystroke 
  4484.         DelHistory          Deletes a history list entry 
  4485.         EndHistory          Displays the last entry in the history list 
  4486.         Help                Invokes this help system 
  4487.         LineToEnd           Copies the current line to the end of the history 
  4488.         NextFile            Gets the next matching filename 
  4489.         NextHistory         Recalls the next command from the history 
  4490.         NormalEditKey       Deassigns a command-line editing key 
  4491.         PopFile             Opens the filename completion window 
  4492.         PrevFile            Gets the previous matching filename 
  4493.         PrevHistory         Recalls the previous command from the history 
  4494.         SaveHistory         Saves the command line without executing it 
  4495.  
  4496.  
  4497. ΓòÉΓòÉΓòÉ 13.4.2.1. AddFile ΓòÉΓòÉΓòÉ
  4498.  
  4499. AddFile = Key (F10):  Keeps the current filename completion entry and inserts 
  4500. the next matching name. 
  4501.  
  4502.  
  4503. ΓòÉΓòÉΓòÉ 13.4.2.2. CommandEscape ΓòÉΓòÉΓòÉ
  4504.  
  4505. CommandEscape = Key (Alt-255):  Allows direct entry of a keystroke that would 
  4506. normally be interpreted as an editor command. 
  4507.  
  4508.  
  4509. ΓòÉΓòÉΓòÉ 13.4.2.3. DelHistory ΓòÉΓòÉΓòÉ
  4510.  
  4511. DelHistory = Key (Ctrl-D):  Deletes the displayed history list entry and 
  4512. displays the previous entry. 
  4513.  
  4514.  
  4515. ΓòÉΓòÉΓòÉ 13.4.2.4. EndHistory ΓòÉΓòÉΓòÉ
  4516.  
  4517. EndHistory = Key (Ctrl-E):  Displays the last entry in the history list. 
  4518.  
  4519.  
  4520. ΓòÉΓòÉΓòÉ 13.4.2.5. ┬áHelp ΓòÉΓòÉΓòÉ
  4521.  
  4522. Help = Key (F1):  Invokes the HELP facility. 
  4523.  
  4524.  
  4525. ΓòÉΓòÉΓòÉ 13.4.2.6. LineToEnd ΓòÉΓòÉΓòÉ
  4526.  
  4527. LineToEnd = Key (Ctrl-Enter):  Copies the current command line to the end of 
  4528. the history list even if it has not been altered. 
  4529.  
  4530.  
  4531. ΓòÉΓòÉΓòÉ 13.4.2.7. NextFile ΓòÉΓòÉΓòÉ
  4532.  
  4533. NextFile = Key (F9, Tab):  Gets the next matching filename. See ClearKeyMap if 
  4534. you need to remove the default mapping of Tab to this function. 
  4535.  
  4536.  
  4537. ΓòÉΓòÉΓòÉ 13.4.2.8. NextHistory ΓòÉΓòÉΓòÉ
  4538.  
  4539. NextHistory = Key (Down):  Recalls the next command from the command history. 
  4540.  
  4541.  
  4542. ΓòÉΓòÉΓòÉ 13.4.2.9. NormalEditKey ΓòÉΓòÉΓòÉ
  4543.  
  4544. NormalEditKey = Key:  Deassigns a command-line editing key in order to disable 
  4545. the usual meaning of the key while editing a command line, and/or make it 
  4546. available for keystroke aliases.  For additional details see NormalKey. 
  4547.  
  4548.  
  4549. ΓòÉΓòÉΓòÉ 13.4.2.10. PopFile ΓòÉΓòÉΓòÉ
  4550.  
  4551. PopFile = Key (F7, Ctrl-Tab):  Opens the filename completion window.  You may 
  4552. not be able to use Ctrl-Tab, because not all systems recognize it as a 
  4553. keystroke.  See ClearKeyMap if you need to remove the default mapping of 
  4554. Ctrl-Tab to this function. 
  4555.  
  4556.  
  4557. ΓòÉΓòÉΓòÉ 13.4.2.11. PrevFile ΓòÉΓòÉΓòÉ
  4558.  
  4559. PrevFile = Key (F8, Shift-Tab):  Gets the previous matching filename.  See 
  4560. ClearKeyMap if you need to remove the default mapping of Shift-Tab to this 
  4561. function. 
  4562.  
  4563.  
  4564. ΓòÉΓòÉΓòÉ 13.4.2.12. PrevHistory ΓòÉΓòÉΓòÉ
  4565.  
  4566. PrevHistory = Key (Up):  Recalls the previous command from the command history. 
  4567.  
  4568.  
  4569. ΓòÉΓòÉΓòÉ 13.4.2.13. SaveHistory ΓòÉΓòÉΓòÉ
  4570.  
  4571. SaveHistory = Key (Ctrl-K):  Saves the command line in the command history list 
  4572. without executing it. 
  4573.  
  4574.  
  4575. ΓòÉΓòÉΓòÉ 13.4.3. History and @SELECT Window Keys ΓòÉΓòÉΓòÉ
  4576.  
  4577. These directives apply only to the command history window, the directory 
  4578. history window, and %@SELECT windows.  The History and @SELECT window keys are: 
  4579.  
  4580.         DirWinOpen          Opens the directory history window 
  4581.         HistWinBegin        Moves to the first line of the history window 
  4582.         HistWinDel          Deletes a line from within the history window 
  4583.         HistWinEdit         Moves a line from the history window to the prompt 
  4584.         HistWinEnd          Moves to the last line of the history window 
  4585.         HistWinExec         Executes the selected line in the history window 
  4586.         HistWinOpen         Opens the command history window 
  4587.         NormalHWinKey       Deassigns a history window key 
  4588.  
  4589.  
  4590. ΓòÉΓòÉΓòÉ 13.4.3.1. DirWinOpen ΓòÉΓòÉΓòÉ
  4591.  
  4592. DirWinOpen = Key (Ctrl-PgUp):  Opens the directory history window while at the 
  4593. command line. 
  4594.  
  4595.  
  4596. ΓòÉΓòÉΓòÉ 13.4.3.2. HistWinBegin ΓòÉΓòÉΓòÉ
  4597.  
  4598. HistWinBegin = Key (Ctrl-PgUp):  Moves to the first line of the history when in 
  4599. the history window. 
  4600.  
  4601.  
  4602. ΓòÉΓòÉΓòÉ 13.4.3.3. HistWinDel ΓòÉΓòÉΓòÉ
  4603.  
  4604. HistWinDel = Key (Ctrl-D):  Deletes a line from within the history window. 
  4605.  
  4606.  
  4607. ΓòÉΓòÉΓòÉ 13.4.3.4. HistWinEdit ΓòÉΓòÉΓòÉ
  4608.  
  4609. HistWinEdit = Key (Ctrl-Enter):  Moves a line from the history window to the 
  4610. prompt for editing. 
  4611.  
  4612.  
  4613. ΓòÉΓòÉΓòÉ 13.4.3.5. HistWinEnd ΓòÉΓòÉΓòÉ
  4614.  
  4615. HistWinEnd = Key (Ctrl-PgDn):  Moves to the last line of the history when in 
  4616. the history window. 
  4617.  
  4618.  
  4619. ΓòÉΓòÉΓòÉ 13.4.3.6. HistWinExec ΓòÉΓòÉΓòÉ
  4620.  
  4621. HistWinExec = Key (Enter):  Executes the selected line in the history window. 
  4622.  
  4623.  
  4624. ΓòÉΓòÉΓòÉ 13.4.3.7. HistWinOpen ΓòÉΓòÉΓòÉ
  4625.  
  4626. HistWinOpen = Key (PgUp):  Brings up the history window while at the command 
  4627. line. 
  4628.  
  4629.  
  4630. ΓòÉΓòÉΓòÉ 13.4.3.8. NormalHWinKey ΓòÉΓòÉΓòÉ
  4631.  
  4632. NormalHWinKey = Key:  Deassigns a history window key in order to disable the 
  4633. usual meaning of the key within the history window. For additional details see 
  4634. NormalKey. 
  4635.  
  4636.  
  4637. ΓòÉΓòÉΓòÉ 13.4.4. LIST Keys ΓòÉΓòÉΓòÉ
  4638.  
  4639. These directives are effective only inside the LIST command.  The LIST keys 
  4640. are: 
  4641.  
  4642.         ListExit            Exits the current file. 
  4643.         ListFind            Prompts and searches for a string 
  4644.         ListHex             Toggles hexadecimal display mode 
  4645.         ListHighBit         Toggles LIST's "strip high bit" option 
  4646.         ListInfo            Displays information about the current file 
  4647.         ListNext            Finds the next matching string 
  4648.         ListPrint           Prints the file on LPT1 
  4649.         ListWrap            Toggles LIST's wrap option 
  4650.         NormalListKey       Deassigns a LIST key 
  4651.  
  4652.  
  4653. ΓòÉΓòÉΓòÉ 13.4.4.1. ListExit ΓòÉΓòÉΓòÉ
  4654.  
  4655. ListExit = Key (Esc):  Exits the current file. 
  4656.  
  4657.  
  4658. ΓòÉΓòÉΓòÉ 13.4.4.2. ListFind ΓòÉΓòÉΓòÉ
  4659.  
  4660. ListFind = Key (F):  Prompts and searches for a string. 
  4661.  
  4662.  
  4663. ΓòÉΓòÉΓòÉ 13.4.4.3. ListHex ΓòÉΓòÉΓòÉ
  4664.  
  4665. ListHex = Key (X):  Toggles hexadecimal display mode. 
  4666.  
  4667.  
  4668. ΓòÉΓòÉΓòÉ 13.4.4.4. ListHighBit ΓòÉΓòÉΓòÉ
  4669.  
  4670. ListHighBit = Key (H):  Toggles LIST's "strip high bit" option, which can aid 
  4671. in displaying files from certain word processors. 
  4672.  
  4673.  
  4674. ΓòÉΓòÉΓòÉ 13.4.4.5. ListInfo ΓòÉΓòÉΓòÉ
  4675.  
  4676. ListInfo = Key (I):  Displays information about the current file. 
  4677.  
  4678.  
  4679. ΓòÉΓòÉΓòÉ 13.4.4.6. ListNext ΓòÉΓòÉΓòÉ
  4680.  
  4681. ListNext = Key (N):  Finds the next matching string. 
  4682.  
  4683.  
  4684. ΓòÉΓòÉΓòÉ 13.4.4.7. ListPrint ΓòÉΓòÉΓòÉ
  4685.  
  4686. ListPrint = Key (P):  Prints the file on LPT1. 
  4687.  
  4688.  
  4689. ΓòÉΓòÉΓòÉ 13.4.4.8. ListWrap ΓòÉΓòÉΓòÉ
  4690.  
  4691. ListWrap = Key (W):  Toggles LIST's wrap option on and off. The wrap option 
  4692. wraps text at the right margin. 
  4693.  
  4694.  
  4695. ΓòÉΓòÉΓòÉ 13.4.4.9. NormalListKey ΓòÉΓòÉΓòÉ
  4696.  
  4697. NormalListKey = Key:  Deassigns a LIST key in order to disable the usual 
  4698. meaning of the key within LIST.  For additional details see NormalKey. 
  4699.  
  4700.  
  4701. ΓòÉΓòÉΓòÉ 13.5. Advanced Directives ΓòÉΓòÉΓòÉ
  4702.  
  4703. These directives are generally used for unusual circumstances, or for 
  4704. diagnosing problems.  Most often they are not needed in normal use.  The 
  4705. advanced directives are: 
  4706.  
  4707.         ClearKeyMap         Clear default key mappings 
  4708.         NextINIFile         Set secondary shell .INI file name 
  4709.  
  4710.  
  4711. ΓòÉΓòÉΓòÉ 13.5.1. ClearKeyMap ΓòÉΓòÉΓòÉ
  4712.  
  4713. ClearKeyMap:  Clears all current key mappings. ClearKeyMap is a special 
  4714. directive which has no value or "=" after it.  Use ClearKeyMap to make one of 
  4715. the keys in the default map (Tab, Shift-Tab, Ctrl-Tab, or Ctrl-Bksp) available 
  4716. for a keystroke alias, or in the [Secondary] section of the .INI file to clear 
  4717. key mappings inherited from the primary shell.  ClearKeyMap should appear 
  4718. before any key mapping directives.  If you want to clear some but not all of 
  4719. the default mappings, use ClearKeyMap, then recreate the mappings you want to 
  4720. retain (e.g., with "NextFile=Tab", etc.). 
  4721.  
  4722.  
  4723. ΓòÉΓòÉΓòÉ 13.5.2. NextINIFile ΓòÉΓòÉΓòÉ
  4724.  
  4725. NextINIFile = File.  The full path and name of the file must be specified.  All 
  4726. subsequent shells will read the specified .INI file, and ignore any [Secondary] 
  4727. section in the original .INI file. 
  4728.  
  4729.  
  4730. ΓòÉΓòÉΓòÉ 14. 4OS2 Commands ΓòÉΓòÉΓòÉ
  4731.  
  4732. The best way to learn the 4OS2 commands is to experiment with them.  The lists 
  4733. below categorize the available commands by topic and will help you find the 
  4734. ones that you need. 
  4735.  
  4736. System configuration: 
  4737.  
  4738.         CHCP          CLS           COLOR         DATE
  4739.         FREE          HISTORY       KEYS          KEYBD
  4740.         LOG           MEMORY        PROMPT        REBOOT
  4741.         SETDOS        TIME          VER           VERIFY
  4742.         VOL
  4743.  
  4744. File and directory management: 
  4745.  
  4746.         ATTRIB        COPY          DEL           DESCRIBE
  4747.         LIST          MOVE          REN           SELECT
  4748.         TYPE
  4749.  
  4750. Subdirectory management: 
  4751.  
  4752.         CD            CDD           DIR           DIRS
  4753.         MD            POPD          PUSHD         RD
  4754.  
  4755. Input and output: 
  4756.  
  4757.         DRAWBOX       DRAWHLINE     DRAWVLINE     ECHO
  4758.         ECHOS         INKEY         INPUT         SCREEN
  4759.         SCRPUT        TEXT          VSCRPUT
  4760.  
  4761. Commands primarily for use in or with batch files and aliases (some work only 
  4762. in batch files; see the individual commands for details): 
  4763.  
  4764.         ALIAS         BEEP          CALL          CANCEL
  4765.         DELAY         DO            ENDLOCAL      FOR
  4766.         GLOBAL        GOSUB         GOTO          IF
  4767.         IFF           LOADBTM       ON            PAUSE
  4768.         QUIT          REM           RETURN        SETLOCAL
  4769.         SHIFT         UNALIAS
  4770.  
  4771. Environment and path commands: 
  4772.  
  4773.         DPATH         ESET          PATH          SET
  4774.         UNSET
  4775.  
  4776. Other commands: 
  4777.  
  4778.         ?         DETACH    EXCEPT
  4779.         EXIT       FFIND      HELP
  4780.         START     TEE          TIMER
  4781.         WINDOW   Y
  4782.  
  4783.  
  4784. ΓòÉΓòÉΓòÉ 14.1. ? - List the internal commands ΓòÉΓòÉΓòÉ
  4785.  
  4786.  Purpose:    Display a list of internal commands or prompt for a command. 
  4787.  
  4788.  Format:     ? ["prompt text" command] 
  4789.  
  4790.  Usage 
  4791.  
  4792.  ? by itself displays a list of internal commands. 
  4793.  
  4794.  If you have disabled a command with SETDOS /I, it will not appear in the list. 
  4795.  
  4796.  If you add prompt text and a command, ? will display the prompt followed by 
  4797.  "(Y/N)?" and wait for the user's response.  If the user presses "Y" or "y", 
  4798.  the command will be executed.  If the user presses "N" or "n", the command 
  4799.  will be ignored. 
  4800.  
  4801.  
  4802. ΓòÉΓòÉΓòÉ 14.2. ALIAS - Create or display aliases ΓòÉΓòÉΓòÉ
  4803.  
  4804.  Purpose:    Create new command names that execute one or more commands or 
  4805.              redefine default options for existing commands; assign commands to 
  4806.              keystrokes; load or display the list of defined alias names. 
  4807.  
  4808.  Format:     ALIAS [/P /R file...] [name [=][value ]] 
  4809.  
  4810.              file :  One or more files to read for alias definitions. 
  4811.              name :  Name for an alias, or for the key to execute the alias. 
  4812.              value :  Text to be substituted for the alias name. 
  4813.  
  4814.              /P(ause)                        /R(ead file) 
  4815.  
  4816.  See also:  UNALIAS. 
  4817.  
  4818.  Usage 
  4819.  
  4820.  The ALIAS command lets you create new command names or redefine internal 
  4821.  commands.  It also lets you assign one or more commands to a single keystroke. 
  4822.  An alias is often used to execute a complex series of commands with a few 
  4823.  keystrokes or to create "in memory batch files" that run much faster than 
  4824.  disk-based batch files. 
  4825.  
  4826.  For example, if you would rather type D instead of DIR /W, you would use the 
  4827.  command: 
  4828.  
  4829.           [c:\] alias d = dir /w
  4830.  
  4831.  Now when you type a single d as a command, it will be translated into a DIR /W 
  4832.  command. 
  4833.  
  4834.  If you define aliases for commonly used application programs, you can often 
  4835.  remove the directories they're stored in from the PATH. For example, if you 
  4836.  use Quattro Pro and had the C:\QPRO directory in your path, you could define 
  4837.  the following alias: 
  4838.  
  4839.           [c:\] alias qpro = c:\qpro\q.exe
  4840.  
  4841.  With this alias defined, you can probably remove C:\QPRO from your path. 
  4842.  Quattro Pro will now load much faster than it would if 4OS2 had to search the 
  4843.  PATH for it.  In addition, the PATH can be shorter, which will speed up 
  4844.  searches for other programs. 
  4845.  
  4846.  If you apply this technique for each application program, you can often reduce 
  4847.  your PATH to just two or three directories containing utility programs, and 
  4848.  significantly reduce the time it takes to load most software on your system. 
  4849.  Before removing a directory from the PATH, you will need to define aliases for 
  4850.  all the executable programs you commonly use which are stored in that 
  4851.  directory. 
  4852.  
  4853.  Aliases are stored in memory, and are not saved automatically when you turn 
  4854.  off your computer or end your current session.  See below for information on 
  4855.  saving and reloading your aliases. 
  4856.  
  4857.  Multiple Commands and Special Characters in Aliases 
  4858.  
  4859.  An alias can represent more than one command.  For example: 
  4860.  
  4861.           [c:\] alias letters = `cd \letters & text`
  4862.  
  4863.  creates a new command called LETTERS.  The command first uses CD to change to 
  4864.  a subdirectory called \LETTERS and then runs a program called TEXT.  The 
  4865.  ampersand [&] is the command separator and indicates that the two commands are 
  4866.  distinct and should be executed sequentially. 
  4867.  
  4868.  Aliases make extensive use of the command separator, and the parameter 
  4869.  character, and may also use the escape character.  These characters differ 
  4870.  between 4DOS and 4OS2 or 4DOS/NT.  In the text and examples below, we use the 
  4871.  4OS2 characters.  If you want to use the same aliases under different command 
  4872.  processors, see 4DOS, 4OS2, and 4DOS/NT Compatibility. 
  4873.  
  4874.  When you type alias commands at the command line or in a batch file, you must 
  4875.  use back quotes [`] around the definition if it contains multiple commands, 
  4876.  parameters (discussed below), environment variables, redirection, or piping. 
  4877.  The back quotes prevent premature expansion of these arguments.  You may use 
  4878.  back quotes around other definitions, but they are not required. (You do not 
  4879.  need back quotes when your aliases are loaded from an ALIAS /R file; see below 
  4880.  for details.)  The examples above and below include back quotes only when they 
  4881.  are required. 
  4882.  
  4883.  Nested Aliases 
  4884.  
  4885.  Aliases may invoke internal commands, external commands, or other aliases. 
  4886.  (However, an alias may not invoke itself, except in special cases where an IF 
  4887.  or IFF command is used to prevent an infinite loop.)  The two aliases below 
  4888.  demonstrate alias nesting (one alias invoking another).  The first line 
  4889.  defines an alias which runs a program called WP.EXE that is in the E:\WP60\ 
  4890.  subdirectory.  The second alias changes directories with the PUSHD command, 
  4891.  runs the WP alias, and then returns to the original directory with the POPD 
  4892.  command: 
  4893.  
  4894.           [c:\] alias wp = e:\wp60\wp.exe
  4895.           [c:\] alias w = `pushd c:\wp & wp & popd`
  4896.  
  4897.  The second alias above could have included the full path and name of the 
  4898.  WP.EXE program instead of calling the WP alias. However, writing two aliases 
  4899.  makes the second one easier to read and understand, and makes the first alias 
  4900.  available for independent use.  If you rename the WP.EXE program or move it to 
  4901.  a new directory, only the first alias needs to be changed. 
  4902.  
  4903.  Temporarily Disabling Aliases 
  4904.  
  4905.  If you put an asterisk [*] immediately before a command in the value of an 
  4906.  alias definition (the part after the equal sign), it tells 4OS2 not to attempt 
  4907.  to interpret that command as another (nested) alias.  An asterisk used this 
  4908.  way must be preceded by a space or the command separator and followed 
  4909.  immediately by an internal or external command name. 
  4910.  
  4911.  By using an asterisk, you can redefine the default options for any internal 
  4912.  command.  For example, suppose that you always want to use the DIR command 
  4913.  with the /2 (two column) and /P (pause at the end of each page) options: 
  4914.  
  4915.           [c:\] alias dir = *dir /2/p
  4916.  
  4917.  If you didn't include the asterisk, the second DIR on the line would be the 
  4918.  name of the alias itself, and 4OS2 would repeatedly re- invoke the DIR alias, 
  4919.  rather than running the DIR command.  This would cause an "Alias loop" or 
  4920.  "Command line too long" error. 
  4921.  
  4922.  An asterisk also helps you keep the names of internal commands from 
  4923.  conflicting with the names of external programs.  For example, suppose you 
  4924.  have a program called LIST.COM.  Normally, the internal LIST command will run 
  4925.  anytime you type LIST.  But two simple aliases will give you access to both 
  4926.  the LIST.COM program and the LIST command: 
  4927.  
  4928.           [c:\] alias list = c:\util\list.com
  4929.           [c:\] alias display = *list
  4930.  
  4931.  The first line above defines LIST as an alias for the LIST.COM program.  If 
  4932.  you stopped there, the external program would run every time you typed LIST 
  4933.  and you would not have easy access to the internal LIST command.  The second 
  4934.  line renames the internal LIST command as DISPLAY.  The asterisk is needed in 
  4935.  the second command to indicate that the following word means the internal 
  4936.  command LIST, not the LIST alias which runs your external program. 
  4937.  
  4938.  You can also use an asterisk before a command that you enter at the command 
  4939.  line or in a batch file.  If you do, that command won't be interpreted as an 
  4940.  alias.  This can be useful when you want to be sure you are running the true, 
  4941.  original command and not an alias with the same name, or temporarily defeat 
  4942.  the purpose of an alias which changes the meaning or behavior of a command. 
  4943.  
  4944.  Partial Alias Names 
  4945.  
  4946.  You can also use an asterisk in the name of an alias.  When you do, the 
  4947.  characters following the asterisk are optional when you invoke the alias 
  4948.  command.  (Use of an asterisk in the alias name is unrelated to the use of an 
  4949.  asterisk in the alias value discussed above.)  For example, with this alias: 
  4950.  
  4951.           [c:\] alias wher*eis = dir /sp
  4952.  
  4953.  the new command, WHEREIS, can be invoked as WHER, WHERE, WHEREI, or WHEREIS. 
  4954.  Now if you type: 
  4955.  
  4956.           [c:\] where myfile.txt
  4957.  
  4958.  The WHEREIS alias will be expanded to the command: 
  4959.  
  4960.           dir /sp myfile.txt
  4961.  
  4962.  Keystroke Aliases 
  4963.  
  4964.  If you want to assign an alias to a keystroke, use the keyname on the left 
  4965.  side of the equal sign, preceded by an at sign [@]. For example, to assign the 
  4966.  command DIR /W to the F5 key, type 
  4967.  
  4968.           [c:\] alias @F5 = dir /w
  4969.  
  4970.  See Keys and Key Names for a complete listing of key names and a description 
  4971.  of the key name format. 
  4972.  
  4973.  When you define keystroke aliases, the assignments will only be in effect at 
  4974.  the command line, not inside application programs.  Be careful not to assign 
  4975.  aliases to keys that are already used at the command line (like F1 for Help). 
  4976.  The command-line meanings take precedence and the keystroke alias will never 
  4977.  be invoked.  If you want to use one of the command-line keys for an alias 
  4978.  instead of its normal meaning, you must first disable its regular use with the 
  4979.  NormalKey or NormalEditKey directive in your .INI file. 
  4980.  
  4981.  If you define a keystroke alias with a single at sign as shown above, then, 
  4982.  when you press the F5 key, the value of the alias (DIR /W above) will be 
  4983.  placed on the command line for you.  You can type additional parameters if you 
  4984.  wish and then press Enter to execute the command.  With this particular alias, 
  4985.  you can define the files that you want to display after pressing F5 and before 
  4986.  pressing Enter to execute the command. 
  4987.  
  4988.  If you want the keystroke alias to take action automatically without waiting 
  4989.  for you to edit the command line or press Enter, you can begin the definition 
  4990.  with two at signs [@@]. 4OS2 will execute the alias "silently," without 
  4991.  displaying its text on the command line.  For example, this command will 
  4992.  assign an alias to the F6 key that uses the CDD command to take you back to 
  4993.  the previous default directory: 
  4994.  
  4995.           [c:\] alias @@f6 = cdd -
  4996.  
  4997.  You can also define a keystroke alias by using "@" or "@@" plus a scan code 
  4998.  for one of the permissible keys (see the Reference Tables for a list of scan 
  4999.  codes).  In most cases it will be easier to use key names.  Scan codes should 
  5000.  only be used with unusual keyboards where a key name is not available for the 
  5001.  key you are using. 
  5002.  
  5003.  Displaying Aliases 
  5004.  
  5005.  If you want to see a list of all current ALIAS commands, type: 
  5006.  
  5007.           [c:\] alias
  5008.  
  5009.  You can also view the definition of a single alias.  If you want to see the 
  5010.  definition of the alias LIST, you can type: 
  5011.  
  5012.           [c:\] alias list
  5013.  
  5014.  Saving and Reloading Your Aliases 
  5015.  
  5016.  You can save your aliases to a file called ALIAS.LST this way: 
  5017.  
  5018.           [c:\] alias > alias.lst
  5019.  
  5020.  You can then reload all the alias definitions in the file the next time you 
  5021.  boot up with the command: 
  5022.  
  5023.           [c:\] alias /r alias.lst
  5024.  
  5025.  This is much faster than defining each alias individually in a batch file.  If 
  5026.  you keep your alias definitions in a separate file which you load when your 
  5027.  system starts, you can edit them with a text editor, reload the edited file 
  5028.  with ALIAS /R, and know that the same alias list will be loaded the next time 
  5029.  you boot your computer. 
  5030.  
  5031.  When you define aliases in a file that will be read with the ALIAS /R command, 
  5032.  you do not need back quotes around the value, even if back quotes would 
  5033.  normally be required when defining the same alias at the command line or in a 
  5034.  batch file. 
  5035.  
  5036.  To remove an alias, use the UNALIAS command. 
  5037.  
  5038.  Alias Parameters 
  5039.  
  5040.  Aliases can use command-line arguments or parameters like those in batch 
  5041.  files.  The command-line arguments are numbered from %0 to %127.  %0 contains 
  5042.  the alias name.  It is up to the alias to determine the meaning of the other 
  5043.  parameters.  You can use quotation marks to pass spaces, tabs, commas, and 
  5044.  other special characters in an alias parameter; see Argument Quoting for 
  5045.  details. 
  5046.  
  5047.  Parameters that are referred to in an alias, but which are missing on the 
  5048.  command line, appear as empty strings inside the alias.  For example, if you 
  5049.  put two parameters on the command line, any reference in the alias to %3 or 
  5050.  any higher-numbered parameter will be interpreted as an empty string. 
  5051.  
  5052.  The parameter %n$ has a special meaning.  4OS2 interprets it to mean "the 
  5053.  entire command line, from argument n to the end."  If n is not specified, it 
  5054.  has a default value of 1, so %$ means "the entire command line after the alias 
  5055.  name."  The special parameter %# contains the number of command-line 
  5056.  arguments. 
  5057.  
  5058.  For example, the following alias will change directories, perform a command, 
  5059.  and return to the original directory: 
  5060.  
  5061.           [c:\] alias in `pushd %1 & %2$ & popd`
  5062.  
  5063.  When this alias is invoked as: 
  5064.  
  5065.           [c:\] in c:\comm mycomm /xmodem /2400
  5066.  
  5067.  the first parameter, %1, has the value c:\comm.  %2 is mycomm,  %3 is /xmodem, 
  5068.  and %4 is /2400. The command line expands into these three separate commands: 
  5069.  
  5070.           pushd c:\comm
  5071.           mycomm /xmodem /2400
  5072.           popd
  5073.  
  5074.  This next example uses the IFF command to redefine the defaults for SET.  It 
  5075.  should be entered on one line: 
  5076.  
  5077.           [c:\] alias set = `iff %# == 0 then & *set /p
  5078.                & else & *set %& & endiff`
  5079.  
  5080.  This modifies the SET command so that if SET is entered with no arguments, it 
  5081.  is replaced by SET /P (pause after displaying each page), but if SET is 
  5082.  followed by an argument, it behaves normally. Note the use of asterisks (*set) 
  5083.  to prevent alias loops. 
  5084.  
  5085.  If an alias uses parameters, command-line arguments will be deleted up to and 
  5086.  including the highest referenced argument.  For example, if an alias refers 
  5087.  only to %1 and %4, then the first and fourth arguments will be used, the 
  5088.  second and third arguments will be discarded, and any additional arguments 
  5089.  beyond the fourth will be appended to the expanded command (after the value 
  5090.  portion of the alias).  If an alias uses no parameters, all of the command- 
  5091.  line arguments will be appended to the expanded command. 
  5092.  
  5093.  Aliases also have full access to all variables in the environment, internal 
  5094.  variables, and variable functions.  For example, you can create a simple 
  5095.  command-line calculator this way (enter this on one line): 
  5096.  
  5097.           [c:\] alias calc = `echo The answer is: %@eval[%&]`
  5098.  
  5099.  Now, if you enter: 
  5100.  
  5101.           [c:\] calc 5 * 6
  5102.  
  5103.  the alias will display: 
  5104.  
  5105.           The answer is: 30
  5106.  
  5107.  Local and Global Aliases 
  5108.  
  5109.  The aliases can be stored in either a "local" or "global" list. 
  5110.  
  5111.  With a local alias list, any changes made to the aliases will only affect the 
  5112.  current copy of 4OS2.  They will not be visible in other shells or other 
  5113.  sessions. 
  5114.  
  5115.  With a global alias list, all copies of 4OS2 will share the same alias list, 
  5116.  and any changes made to the aliases in one copy will affect all other copies. 
  5117.  This is the default. 
  5118.  
  5119.  You can control the type of alias list with the LocalAliases directive in the 
  5120.  .INI file, and with the /L and /LA options of the START command. 
  5121.  
  5122.  Whenever you start a secondary shell which uses a local alias list, it 
  5123.  inherits a copy of the aliases from the previous shell. However, any changes 
  5124.  to the alias made in the secondary shell will affect only that shell.  If you 
  5125.  want changes made in a secondary shell to affect the previous shell, use a 
  5126.  global alias list in both shells. 
  5127.  
  5128.  Retaining Global Aliases with SHRALIAS 
  5129.  
  5130.  If you select a global alias list for 4OS2 you can share the aliases among all 
  5131.  copies of 4OS2 running in any session.  When you close all 4OS2 sessions, the 
  5132.  memory for the global alias list is released, and a new, empty alias list is 
  5133.  created the next time you start 4OS2. 
  5134.  
  5135.  If you want the alias list to be retained in memory even when no command 
  5136.  processor session is running, you need to load the SHRALIAS program, which 
  5137.  performs this service for both the global alias list and the global history 
  5138.  list.  SHRALIAS is supplied with your copy of 4OS2. 
  5139.  
  5140.  To load SHRALIAS, simply run the SHRALIAS.EXE program, which is normally 
  5141.  installed in the same directory as 4OS2.  You may find it convenient to load 
  5142.  SHRALIAS from your 4START file or your STARTUP.CMD file. 
  5143.  
  5144.  SHRALIAS runs as a "detached" process, which means it does not have a screen 
  5145.  display or accept keyboard input.  It is shut down automatically when OS/2 
  5146.  shuts down.  To unload SHRALIAS manually, run SHRALIAS.EXE with the parameter 
  5147.  /U. 
  5148.  
  5149.  The UNKNOWN_CMD Alias 
  5150.  
  5151.  If you create an alias with the name UNKNOWN_CMD, it will be executed any time 
  5152.  4OS2 would normally issue an "Unknown command" error message.  This allows you 
  5153.  to define your own handler for unknown commands.  When the UNKNOWN_CMD alias 
  5154.  is executed, the command line which generated the error is passed to the alias 
  5155.  for possible processing. 
  5156.  
  5157.  Use caution when you create the UNKNOWN_CMD alias.  If it contains an unknown 
  5158.  command, it will be called repeatedly and 4OS2 will lock up in an infinite 
  5159.  loop. 
  5160.  
  5161.  Options 
  5162.  
  5163.     /P:     (Pause) This option is only effective when ALIAS is used to display 
  5164.             existing definitions.  It pauses the display after each page and 
  5165.             waits for a keystroke before continuing (see Page and File 
  5166.             Prompts). 
  5167.  
  5168.     /R:     (Read file) This option loads an alias list from a file. The format 
  5169.             of the file is the same as that of the ALIAS display: 
  5170.  
  5171.                                 name=value
  5172.  
  5173.             where name is the name of the alias and value is its value.  You 
  5174.             can use an equal sign [=] or space to separate the name and value. 
  5175.             Back quotes are not required around the value.  You can add 
  5176.             comments to the file by starting each comment line with a colon 
  5177.             [:].  You can load multiple files with one ALIAS /R command by 
  5178.             placing the names on the command line, separated by spaces: 
  5179.  
  5180.                                 [c:\] alias /r alias1.lst alias2.lst
  5181.  
  5182.             Each definition in an ALIAS /R file can be up to 2047 characters 
  5183.             long. The definitions can span multiple lines in the file if each 
  5184.             line, except the last, is terminated with an escape character. 
  5185.  
  5186.  
  5187. ΓòÉΓòÉΓòÉ 14.3. ATTRIB - Change or view file attributes ΓòÉΓòÉΓòÉ
  5188.  
  5189.  Purpose:    Change or view file and subdirectory attributes. 
  5190.  
  5191.  Format:     ATTRIB [/A:[[-]rhsda] /D /P /Q /S] [+|-[AHRS]] files ... 
  5192.  
  5193.              files :  A file, directory, or list of files or directories on 
  5194.              which to operate. 
  5195.  
  5196.              /A(ttribute select)             /Q(uiet) 
  5197.              /D(irectories)                  /S(ubdirectories) 
  5198.              /P(ause) 
  5199.  
  5200.              Attribute flags: 
  5201.  
  5202.              +A      Set the archive attribute 
  5203.              -A      Clear the archive attribute 
  5204.              +H      Set the hidden attribute 
  5205.              -H      Clear the hidden attribute 
  5206.              +R      Set the read-only attribute 
  5207.              -R      Clear the read-only attribute 
  5208.              +S      Set the system attribute 
  5209.              -S      Clear the system attribute 
  5210.  
  5211.  File Selection 
  5212.  
  5213.  Supports extended wildcards, ranges, multiple file names, and include lists. 
  5214.  
  5215.  Usage 
  5216.  
  5217.  Every file and subdirectory has 4 attributes that can be turned on (set) or 
  5218.  turned off (cleared):  Archive, Hidden, Read- only, and System. 
  5219.  
  5220.  The ATTRIB command lets you set or clear attributes for any file, group of 
  5221.  files, or subdirectory.  You can view file attributes by entering ATTRIB 
  5222.  without specifying new attributes (i.e., without the [+|-[AHRS]] part of the 
  5223.  format), or with the DIR /T command. 
  5224.  
  5225.  For example, you can set the read-only and hidden attributes for the file MEMO 
  5226.  : 
  5227.  
  5228.           [c:\] attrib +rh memo
  5229.  
  5230.  Attribute options apply to the file(s) that follow the options on the ATTRIB 
  5231.  command line.  The example below shows how to set different attributes on 
  5232.  different files with a single command.  It sets the archive attribute for all 
  5233.  .TXT files, then sets the system attribute and clears the archive attribute 
  5234.  for TEST.COM : 
  5235.  
  5236.           [c:\] attrib +a *.txt +s -a test.com
  5237.  
  5238.  Your operating system also supports "D" (subdirectory) and "V" (volume label) 
  5239.  attributes.  These attributes cannot be altered with ATTRIB; they are designed 
  5240.  to be controlled only by the operating system itself. 
  5241.  
  5242.  Options 
  5243.  
  5244.     /A:     (Attribute select) Select only those files that have the specified 
  5245.             attribute(s) set.  Preceding the attribute character with a hyphen 
  5246.             [-] will select files that do not have that attribute set.  The 
  5247.             colon [:] after /A is required.  The attributes are: 
  5248.  
  5249.                            R  Read-only 
  5250.                            H  Hidden 
  5251.                            S  System 
  5252.                            D  Subdirectory 
  5253.                            A  Archive 
  5254.  
  5255.             If no attributes are listed at all (e.g., ATTRIB /A: ...), ATTRIB 
  5256.             will select all files and subdirectories including hidden and 
  5257.             system files.  If attributes are combined, all the specified 
  5258.             attributes must match for a file to be selected. For example, 
  5259.             /A:RHS will select only those files with all three attributes set. 
  5260.  
  5261.     /D:     (Directories) If you use the /D option, ATTRIB will modify the 
  5262.             attributes of subdirectories in addition to files (yes, you can 
  5263.             have a hidden subdirectory): 
  5264.  
  5265.                                 [c:\] attrib /d +h c:\mydir
  5266.  
  5267.             In addition, the /D option will keep ATTRIB from appending "\*.*" 
  5268.             to the end of a directory name and modifying the attributes of all 
  5269.             the files in the subdirectory. 
  5270.  
  5271.             If you use a directory name instead of a file name, and omit /D, 
  5272.             ATTRIB will append "\*.*" to the end of the name and act on all 
  5273.             files in that directory, rather than acting on the directory 
  5274.             itself. 
  5275.  
  5276.     /P:     (Pause) Wait for a key to be pressed after each screen page before 
  5277.             continuing the display.  Your options at the prompt are explained 
  5278.             in detail under Page and File Prompts. 
  5279.  
  5280.     /Q:     (Quiet) This option turns off ATTRIB's normal screen output. It is 
  5281.             most useful in batch files. 
  5282.  
  5283.     /S:     (Subdirectories) If you use the /S option, the ATTRIB command will 
  5284.             be applied to all matching files in the current or named directory 
  5285.             and all of its subdirectories. 
  5286.  
  5287.  
  5288. ΓòÉΓòÉΓòÉ 14.4. BEEP - Beep the speaker ΓòÉΓòÉΓòÉ
  5289.  
  5290.  Purpose:    Beep the speaker or play simple music. 
  5291.  
  5292.  Format:     BEEP [frequency duration ...] 
  5293.  
  5294.              frequency :  The beep frequency in Hertz (cycles per second). 
  5295.              duration :  The beep length in 1/18th second intervals. 
  5296.  
  5297.  Usage 
  5298.  
  5299.  BEEP generates a sound through your computer's speaker.  It is normally used 
  5300.  in batch files to signal that an operation has been completed, or that the 
  5301.  computer needs attention. 
  5302.  
  5303.  Because BEEP allows you to specify the frequency and duration of the sound, 
  5304.  you can also use it to play simple music or to create different kinds of 
  5305.  signals for the user. 
  5306.  
  5307.  You can include as many frequency and duration pairs as you wish. No sound 
  5308.  will be generated for frequencies less than 20 Hz, allowing you to insert 
  5309.  short delays.  The default value for frequency is 440 Hz; the default value 
  5310.  for duration is 2. 
  5311.  
  5312.  This batch file fragment runs a program called DEMO, then plays a few notes 
  5313.  and waits for you to press a key: 
  5314.  
  5315.           demo & beep 440 4  600 2  1040 6
  5316.           pause Finished with the demo - hit a key...
  5317.  
  5318.  The following table gives the frequency values for a five octave range (middle 
  5319.  C is 262 Hz): 
  5320.  
  5321.           ΓòöΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòñΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòñΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòñΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòñΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòñΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòù
  5322.           Γòæ C      Γöé  131  Γöé  262  Γöé  523  Γöé  1046  Γöé  2093 Γòæ
  5323.           Γòæ C#/Db  Γöé  139  Γöé  277  Γöé  554  Γöé  1108  Γöé  2217 Γòæ
  5324.           Γòæ D      Γöé  147  Γöé  294  Γöé  587  Γöé  1175  Γöé  2349 Γòæ
  5325.           Γòæ D#/Eb  Γöé  156  Γöé  311  Γöé  622  Γöé  1244  Γöé  2489 Γòæ
  5326.           Γòæ E      Γöé  165  Γöé  330  Γöé  659  Γöé  1318  Γöé  2637 Γòæ
  5327.           Γòæ F      Γöé  175  Γöé  349  Γöé  698  Γöé  1397  Γöé  2794 Γòæ
  5328.           Γòæ F#/Gb  Γöé  185  Γöé  370  Γöé  740  Γöé  1480  Γöé  2960 Γòæ
  5329.           Γòæ G      Γöé  196  Γöé  392  Γöé  784  Γöé  1568  Γöé  3136 Γòæ
  5330.           Γòæ G#/Ab  Γöé  208  Γöé  415  Γöé  831  Γöé  1662  Γöé  3322 Γòæ
  5331.           Γòæ A      Γöé  220  Γöé  440  Γöé  880  Γöé  1760  Γöé  3520 Γòæ
  5332.           Γòæ A#/Bb  Γöé  233  Γöé  466  Γöé  932  Γöé  1866  Γöé  3729 Γòæ
  5333.           Γòæ B      Γöé  248  Γöé  494  Γöé  988  Γöé  1973  Γöé  3951 Γòæ
  5334.           ΓòÜΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòºΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòºΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòºΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòºΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòºΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓò¥
  5335.  
  5336.  
  5337. ΓòÉΓòÉΓòÉ 14.5. CALL - Execute one batch file from another ΓòÉΓòÉΓòÉ
  5338.  
  5339.  Purpose:    Execute one batch file from within another. 
  5340.  
  5341.  Format:     CALL file 
  5342.  
  5343.              file :  The batch file to execute. 
  5344.  
  5345.  See also:  CANCEL and QUIT. 
  5346.  
  5347.  Usage 
  5348.  
  5349.  CALL allows batch files to call other batch files (batch file nesting).  The 
  5350.  calling batch file is suspended while the called (second) batch file runs. 
  5351.  When the second batch file finishes, the original batch file resumes execution 
  5352.  at the next command.  If you execute a batch file from inside another batch 
  5353.  file without using CALL, the first batch file is terminated before the second 
  5354.  one starts. 
  5355.  
  5356.  4OS2 supports batch file nesting up to ten levels deep. 
  5357.  
  5358.  The current ECHO state is inherited by a called batch file. 
  5359.  
  5360.  A called batch file will return to the calling file after processing the last 
  5361.  line in the called file, or when a QUIT command is executed.  A called batch 
  5362.  file should always return in this way, or terminate all batch files with 
  5363.  CANCEL.  Restarting (or CALLing) the original batch file from within a called 
  5364.  file will prevent 4OS2 from detecting that you've left the second file, and it 
  5365.  may cause an infinite loop or a stack overflow. 
  5366.  
  5367.  CALL returns an exit code which matches the batch file return code. You can 
  5368.  test this exit code with the %_? or %? environment variable, and use it with 
  5369.  conditional commands(&& and ||). 
  5370.  
  5371.  
  5372. ΓòÉΓòÉΓòÉ 14.6. CANCEL - Terminate batch file processing ΓòÉΓòÉΓòÉ
  5373.  
  5374.  Purpose:    Terminate batch file processing. 
  5375.  
  5376.  Format:     CANCEL [value ] 
  5377.  
  5378.              value :  The exit code from 0 to 255 to return to 4OS2. 
  5379.  
  5380.  See also:  CALL and QUIT. 
  5381.  
  5382.  Usage 
  5383.  
  5384.  The CANCEL command ends all batch file processing, regardless of the batch 
  5385.  file nesting level.  Use QUIT to end a nested batch file and return to the 
  5386.  previous batch file. 
  5387.  
  5388.  You can CANCEL at any point in a batch file.  If CANCEL is used from within an 
  5389.  alias it will end execution of both the alias and any batch file(s) which are 
  5390.  running at the time. 
  5391.  
  5392.  The following batch file fragment compares an input line to "end" and 
  5393.  terminates all batch file processing if it matches: 
  5394.  
  5395.           input Enter your choice:  %%option
  5396.           if "%option" == "end" cancel
  5397.  
  5398.  If you specify a value, CANCEL will set the ERRORLEVEL or exit code to 
  5399.  thatvalue (see the IF command, and the %? variable). 
  5400.  
  5401.  
  5402. ΓòÉΓòÉΓòÉ 14.7. CD - Change the current directory ΓòÉΓòÉΓòÉ
  5403.  
  5404.  Purpose:    Display or change the current directory. 
  5405.  
  5406.  Format:     CD [ path | - ] 
  5407.                 or 
  5408.              CHDIR [ path | - ] 
  5409.  
  5410.              path :  The directory to change to, including an optional drive 
  5411.              name. 
  5412.  
  5413.  See also:  CDD, MD, PUSHD, RD, and CDPATH. 
  5414.  
  5415.  Usage 
  5416.  
  5417.  CD and CHDIR are synonyms.  You can use either one. 
  5418.  
  5419.  CD lets you navigate through the disk subdirectory structure by changing the 
  5420.  current working directory.  If you enter CD and a directory name, the named 
  5421.  directory becomes the new current directory.  For example, to change to the 
  5422.  subdirectory C:\FINANCE\MYFILES : 
  5423.  
  5424.           [c:\] cd \finance\myfiles
  5425.           [c:\finance\myfiles]
  5426.  
  5427.  Every disk drive on the system has its own current directory. Specifying both 
  5428.  a drive and a directory in the CD command will change the current directory on 
  5429.  the specified drive, but will not change the default drive.  For example, to 
  5430.  change the default directory on drive A: 
  5431.  
  5432.           [c:\] cd a:\utility
  5433.           [c:\]
  5434.  
  5435.  Notice that this command does not change to drive A:.  Use the CDD command to 
  5436.  change the current drive and directory at the same time. 
  5437.  
  5438.  You can change to the parent directory with CD ..; you can also go up one 
  5439.  additional directory level with each additional [.]. For example, CD .... will 
  5440.  go up three levels in the directory tree (see Extended Parent Directory 
  5441.  Names).  You can move to a sibling directory -- one that branches from the 
  5442.  same parent directory as the current subdirectory -- with a command like CD 
  5443.  ..\newdir. 
  5444.  
  5445.  If you enter CD with no argument or with only a disk drive name, it will 
  5446.  display the current directory on the default or named drive. 
  5447.  
  5448.  CD saves the current directory before changing to a new directory. You can 
  5449.  switch back to the previous directory by entering CD -. (There must be a space 
  5450.  between the CD command and the hyphen.)  You can switch back and forth between 
  5451.  two directories by repeatedly entering CD -.  The saved directory is the same 
  5452.  for both the CD and CDD commands.  Drive changes and automatic directory 
  5453.  changes also modify the saved directory, so you can use CD - to return to a 
  5454.  directory that you exited with an automatic directory change. 
  5455.  
  5456.  Directory changes made with CD are recorded for display in the directory 
  5457.  history window. 
  5458.  
  5459.  CD never changes the default drive.  If you change directories on one drive, 
  5460.  switch to another drive, and then enter CD -, the directory will be restored 
  5461.  on the first drive but the current drive will not be changed. 
  5462.  
  5463.  If CD can't change directly to the specified directory, it will look for the 
  5464.  CDPATH variable; see CDPATH for details. 
  5465.  
  5466.  
  5467. ΓòÉΓòÉΓòÉ 14.8. CDD - Change the current drive and directory ΓòÉΓòÉΓòÉ
  5468.  
  5469.  Purpose:    Change the current disk drive and directory. 
  5470.  
  5471.  Format:     CDD path 
  5472.  
  5473.              path :  The name of the directory (or drive and directory) to 
  5474.              change to. 
  5475.  
  5476.  See also:  CD, MD, PUSHD, RD, and CDPATH. 
  5477.  
  5478.  Usage 
  5479.  
  5480.  CDD is similar to the CD command, except that it also changes the default disk 
  5481.  drive if one is specified.  CDD will change to the directory and drive you 
  5482.  name.  To change from the root directory on drive A to the subdirectory C:\WP: 
  5483.  
  5484.           [a:\] cdd c:\wp
  5485.           [c:\wp]
  5486.  
  5487.  You can change to the parent directory with CDD ..; you can also go up one 
  5488.  additional directory level with each additional [.].  For example, CDD .... 
  5489.  will go up three levels in the directory tree. 
  5490.  
  5491.  CDD saves the current drive and directory before changing to a new directory. 
  5492.  You can switch back to the previous drive and directory by entering CDD -. 
  5493.  (There must be a space between the CDD command and the hyphen.)  You can 
  5494.  switch back and forth between two drives and directories by repeatedly 
  5495.  entering CDD -.  The saved directory is the same for both the CD and CDD 
  5496.  commands.  Drive changes and automatic directory changes also modify the saved 
  5497.  directory, so you can use CDD - to return to a directory that you exited with 
  5498.  a drive change or an automatic directory change. 
  5499.  
  5500.  Directory changes made with CDD are recorded for display in the directory 
  5501.  history window. 
  5502.  
  5503.  If CDD can't change directly to the specified directory, it will look for the 
  5504.  CDPATH variable; see CDPATH for details. 
  5505.  
  5506.  
  5507. ΓòÉΓòÉΓòÉ 14.9. CHCP - Change the current code page ΓòÉΓòÉΓòÉ
  5508.  
  5509.  Purpose:    Display or change the current system code page. 
  5510.  
  5511.  Format:     CHCP [n ] 
  5512.  
  5513.              n :  A system code page number. 
  5514.  
  5515.  Usage 
  5516.  
  5517.  Code page switching allows you to select different character sets for language 
  5518.  support. 
  5519.  
  5520.  If you enter CHCP without a number, the current code page is displayed. 
  5521.  
  5522.           [c:\] chcp
  5523.           Active code page: 437
  5524.  
  5525.  If you enter CHCP plus a code page number, the system code page is changed. 
  5526.  For example, to set the code page to multilingual: 
  5527.  
  5528.           [c:\] chcp 850
  5529.  
  5530.  CHCP accepts one of the prepared system code pages.  An error message is 
  5531.  displayed if a code page is selected that has not been prepared for the 
  5532.  system. 
  5533.  
  5534.  See your OS/2 documentation for more information on CHCP. 
  5535.  
  5536.  
  5537. ΓòÉΓòÉΓòÉ 14.10. CLS - Clear the screen ΓòÉΓòÉΓòÉ
  5538.  
  5539.  Purpose:    Clear the video display and move the cursor to the upper left 
  5540.              corner; optionally change the default display and border colors. 
  5541.  
  5542.  Format:     CLS [[BRIght] [BLInk] fg ON [BRIght] bg ] [BORder bc ] 
  5543.  
  5544.              fg :  The new foreground color 
  5545.              bg :  The new background color 
  5546.              bc :  The new border color 
  5547.  
  5548.  Usage 
  5549.  
  5550.  CLS can be used to clear the screen without changing colors, or to clear the 
  5551.  screen and change the screen colors simultaneously. These three examples show 
  5552.  how to clear the screen to the default colors, to bright white letters on a 
  5553.  blue background, and to bright yellow letters on a magenta background with a 
  5554.  blue border: 
  5555.  
  5556.           [c:\] cls
  5557.           [c:\] cls bright white on blue
  5558.           [c:\] cls bri yel on mag bor blu
  5559.  
  5560.  CLS is often used in batch files to clear the screen before displaying text. 
  5561.  
  5562.  See Colors and Color Names for details about colors and notes on the use of 
  5563.  bright background colors. 
  5564.  
  5565.  
  5566. ΓòÉΓòÉΓòÉ 14.11. COLOR - Change the display colors ΓòÉΓòÉΓòÉ
  5567.  
  5568.  Purpose:    Change the default display colors. 
  5569.  
  5570.  Format:     COLOR [BRIght] [BLInk] fg ON [BRIght] bg [BORder bc ] 
  5571.  
  5572.              fg :  The new foreground color 
  5573.              bg :  The new background color 
  5574.              bc :  The new border color 
  5575.  
  5576.  See also:  CLS, and Colors and Color Names for details about using colors. 
  5577.  
  5578.  Usage 
  5579.  
  5580.  COLOR is normally used in batch files before displaying text. For example, to 
  5581.  set screen colors to bright white on blue, you can use this command: 
  5582.  
  5583.           [c:\] color bright white on blue
  5584.  
  5585.  
  5586. ΓòÉΓòÉΓòÉ 14.12. COPY - Copy files ΓòÉΓòÉΓòÉ
  5587.  
  5588.  Purpose:    Copy data between disks, directories, files, or physical hardware 
  5589.              devices (such as your printer or serial port). 
  5590.  
  5591.  Format:     COPY [/A:[[-]rhsda] /C /H /M /N /P /Q /R /S /T /U /V] source [+] 
  5592.              ... [/A /B] destination [/A /B] 
  5593.  
  5594.              source :  A file or list of files or a device to copy from. 
  5595.              destination :  A file, directory, or device to copy to. 
  5596.  
  5597.              /A(SCII)                        /P(rompt) 
  5598.              /A:(ttribute select)            /Q(uiet) 
  5599.              /B(inary)                       /R(eplace) 
  5600.              /C(hanged)                      /S(ubdirectories) 
  5601.              /H(idden)                       /T(otals) 
  5602.              /M(odified)                     /U(pdate) 
  5603.              /N(othing)                      /V(erify) 
  5604.  
  5605.  See also:  ATTRIB, MOVE, and REN. 
  5606.  
  5607.  File Selection 
  5608.  
  5609.  Supports extended wildcards, ranges, multiple file names, and include lists. 
  5610.  Date, time, or size ranges anywhere on the line apply to all source files. 
  5611.  
  5612.  Usage 
  5613.  
  5614.  The COPY command accepts all traditional syntax and options and adds several 
  5615.  new features. 
  5616.  
  5617.  The simplest use of COPY is to make a copy of a file, like this example which 
  5618.  makes a copy of a file called FILE1.ABC : 
  5619.  
  5620.           [c:\] copy file1.abc file2.def
  5621.  
  5622.  You can also copy a file to another drive and/or directory.  The following 
  5623.  command copies FILE1 to the \MYDIR directory on drive E: 
  5624.  
  5625.           [c:\] copy file1 e:\mydir
  5626.  
  5627.  You can copy several files at once by using wildcards: 
  5628.  
  5629.           [c:\] copy *.txt e:\mydir
  5630.  
  5631.  You can also list several source files in one command.  The following command 
  5632.  copies 3 files from the current directory to the \MYDIR directory on drive E: 
  5633.  
  5634.           [c:\] copy file1 file2 file3 e:\mydir
  5635.  
  5636.  The way COPY interprets your command line depends on how many arguments (file, 
  5637.  directory, or device names) are on the line, and whether the arguments are 
  5638.  separated with [+] signs or spaces. 
  5639.  
  5640.  If there is only one argument on the line, COPY assumes it is the source, and 
  5641.  uses the current drive and directory as the destination.  For example, the 
  5642.  following command copies all the .DAT files on drive A to the current 
  5643.  directory on drive C: 
  5644.  
  5645.           [c:\] copy a:*.dat
  5646.  
  5647.  If there are two or more arguments on the line and [+] signs are not used, 
  5648.  then COPY assumes that the last argument is the destination and copies all 
  5649.  source files to this new location.  If the destination is a drive, directory, 
  5650.  or device name then the source files are copied individually to the new 
  5651.  location.  If the destination is a file name, the first source file is copied 
  5652.  to the destination, and any additional source files are then appended to the 
  5653.  new destination file. 
  5654.  
  5655.  For example, the first of these commands copies the .DAT files from the 
  5656.  current directory on drive A individually to C:\MYDIR (which must already 
  5657.  exist as a directory); the second appends all the .DAT files together into one 
  5658.  large file called C:\DATA (assuming C:\DATA is not a directory): 
  5659.  
  5660.           [c:\] copy a:*.dat c:\mydir\
  5661.           [c:\] copy a:*.dat c:\data
  5662.  
  5663.  When you copy to a directory, if you add a backslash [\] to the end of the 
  5664.  name as shown in the first example above, COPY will display an error message 
  5665.  if the name does not refer to an existing directory.  You can use this feature 
  5666.  to keep COPY from treating a mistyped destination directory name as a file 
  5667.  name and attempting to append all your source files to a destination file, 
  5668.  when you really meant to copy them individually to a destination directory. 
  5669.  
  5670.  A plus [+] tells COPY to append two or more files to a single destination 
  5671.  file.  If you list several source files separated with [+] and don't specify a 
  5672.  destination, COPY will use the name of the first source file as the 
  5673.  destination, and append each subsequent file to the first file.  In this case 
  5674.  the destination file will always be created in the current directory, even if 
  5675.  the first source file is in another directory or on another drive. 
  5676.  
  5677.  For example, the following command will append the contents of C:\MEMO2 and 
  5678.  C:\MEMO3 to C:\MEMO1 and leave the combined contents in the file named 
  5679.  C:\MEMO1 : 
  5680.  
  5681.           [c:\] copy memo1+memo2+memo3
  5682.  
  5683.  To append the same three files but store the result in BIGMEMO: 
  5684.  
  5685.           [c:\] copy memo1+memo2+memo3 bigmemo
  5686.  
  5687.  To append C:\MEM\MEMO2 and C:\MEM\MEMO3 to D:\DATA\MEMO1, and leave the result 
  5688.  in C:\MEM\MEMO1 : 
  5689.  
  5690.           [c:\mem] copy d:\data\memo1+memo2+memo3
  5691.  
  5692.  You cannot append files to a device (such as a printer); if you try to do so, 
  5693.  COPY will ignore the [+] signs and copy the files individually.  If you 
  5694.  attempt to append several source files to a destination directory or disk, 
  5695.  COPY will append the files and place the copy in the new location with the 
  5696.  same name as the first source file. 
  5697.  
  5698.  If your destination has wildcards in it, COPY will attempt to match them with 
  5699.  the source names.  For example, this command copies the .DAT files from drive 
  5700.  A to C:\MYDIR and gives the new copies the extension .DX : 
  5701.  
  5702.           [c:\] copy a:*.dat c:\mydir\*.dx
  5703.  
  5704.  This feature can give you unexpected results if you use it with multiple 
  5705.  source file names.  For example, suppose that drive A contains XYZ.DAT and 
  5706.  XYZ.TXT.  The command 
  5707.  
  5708.           [c:\] copy a:\*.dat a:\*.txt c:\mydir\*.dx
  5709.  
  5710.  will copy A:XYZ.DAT to C:\MYDIR\XYZ.DX.  Then it will copy A:XYZ.TXT to 
  5711.  C:\MYDIR\XYZ.DX, overwriting the first file it copied. 
  5712.  
  5713.  COPY also understands include lists, so you can specify several different 
  5714.  kinds of files in the same command.  This command copies the .TXT, .DOC, and 
  5715.  .BAT files from the E:\MYDIR directory to the root directory of drive A: 
  5716.  
  5717.           [c:\] copy e:\mydir\*.txt;*.doc;*.bat a:\
  5718.  
  5719.  You can use date, time, and size ranges to further define the files that you 
  5720.  want to copy.  This example copies every file in the E:\MYDIR directory, which 
  5721.  was created or modified yesterday, and which is also 10,000 bytes or smaller 
  5722.  in size, to the root directory of drive A: 
  5723.  
  5724.           [c:\] copy /[d-1] /[s0,10000] e:\mydir\*.* a:\
  5725.  
  5726.  COPY maintains the hidden and system attributes of files, but not the 
  5727.  read-only attribute.  The destination file will always have the archive 
  5728.  attribute set. 
  5729.  
  5730.  Options 
  5731.  
  5732.  The /A(SCII) and /B(inary) options apply to the preceding filename and to all 
  5733.  subsequent filenames on the command line until the file name preceding the 
  5734.  next /A or /B, if any.  The other options (/A:, /C, /H, /M, /N, /P, /Q, /R, 
  5735.  /S, /T, /U, /V) apply to all filenames on the command line, no matter where 
  5736.  you put them.  For example, either of the following commands could be used to 
  5737.  copy a font file to the printer in binary mode: 
  5738.  
  5739.           [c:\] copy /b myfont.dat prn
  5740.           [c:\] copy myfont.dat /b prn
  5741.  
  5742.  Some options do not make sense in certain contexts, in which case COPY will 
  5743.  ignore them.  For example, you cannot prompt before replacing an existing file 
  5744.  when the destination is a device such as the printer -- there's no such thing 
  5745.  as an "existing file" on the printer.  If you use conflicting output options, 
  5746.  like /Q and /P, COPY will take a "conservative" approach and give priority to 
  5747.  the option which generates more prompts or more information. 
  5748.  
  5749.     /A:     (ASCII) If you use /A with a source filename, the file will be 
  5750.             copied up to, but not including, the first Ctrl-Z (Control-Z or 
  5751.             ASCII 26) character in the file.  If you use /A with a destination 
  5752.             filename, a Ctrl-Z will be added to the end of the file (some 
  5753.             application programs use the Ctrl-Z to mark the end of a file).  /A 
  5754.             is the default when appending files, or when the destination is a 
  5755.             device like NUL or PRN, rather than a disk file. 
  5756.  
  5757.     /A:     (Attribute select) Select only those files that have the specified 
  5758.             attribute(s) set.  Preceding the attribute character with a hyphen 
  5759.             [-] will select files that do not have that attribute set.  The 
  5760.             colon [:] after /A is required.  The attributes are: 
  5761.  
  5762.                            R  Read-only 
  5763.                            H  Hidden 
  5764.                            S  System 
  5765.                            D  Subdirectory 
  5766.                            A  Archive 
  5767.  
  5768.             If no attributes are listed at all (e.g., COPY /A: ...), COPY will 
  5769.             select all files and subdirectories including hidden and system 
  5770.             files.  If attributes are combined, all the specified attributes 
  5771.             must match for a file to be selected. For example, /A:RHS will 
  5772.             select only those files with all three attributes set.  You must 
  5773.             include the colon with this option to distinguish it from the 
  5774.             /A(SCII) switch, above. 
  5775.  
  5776.     /B:     (Binary) If you use /B with a source filename, the entire file is 
  5777.             copied; Ctrl-Z characters in the file do not affect the copy 
  5778.             operation.  Using /B with a destination filename prevents addition 
  5779.             of a Ctrl-Z to the end of the destination file. /B is the default 
  5780.             for normal file copies. 
  5781.  
  5782.     /C:     (Changed files) Copy files only if the destination file exists and 
  5783.             is older than the source (see also /U).  This option is useful for 
  5784.             updating the files in one directory from those in another without 
  5785.             copying any newly created files. 
  5786.  
  5787.     /H:     (Hidden) Copy all matching files including those with the hidden 
  5788.             and/or system attribute set. 
  5789.  
  5790.     /M:     (Modified) Copy only those files with the archive attribute set, 
  5791.             i.e., those which have been modified since the last backup.  The 
  5792.             archive attribute will not be cleared after copying; to clear it 
  5793.             use ATTRIB. 
  5794.  
  5795.     /N:     (Nothing) Do everything except actually perform the copy. This 
  5796.             option is useful for testing what the result of a complex COPY 
  5797.             command will be. 
  5798.  
  5799.     /P:     (Prompt) Ask the user to confirm each source file.  Your options at 
  5800.             the prompt are explained in detail under Page and File Prompts. 
  5801.  
  5802.     /Q:     (Quiet) Don't display filenames or the total number of files 
  5803.             copied.  This option is most often used in batch files.  See also 
  5804.             /T. 
  5805.  
  5806.     /R:     (Replace) Prompt the user before overwriting an existing file. 
  5807.             Your options at the prompt are explained in detail under Page and 
  5808.             File Prompts. 
  5809.  
  5810.     /S:     (Subdirectories) Copy the subdirectory tree starting with the files 
  5811.             in the source directory plus each subdirectory below that.  The 
  5812.             destination must be a directory; if it doesn't exist, COPY will 
  5813.             attempt to create it.  COPY will also attempt to create needed 
  5814.             subdirectories on the tree below the destination, including empty 
  5815.             source directories.  If you attempt to use COPY /S to copy a 
  5816.             subdirectory tree into part of itself, COPY will display an error 
  5817.             message and exit. 
  5818.  
  5819.     /T:     (Totals) Turns off  the display of filenames, like /Q, but does 
  5820.             display the total number of files copied. 
  5821.  
  5822.     /U:     (Update) Copy each source file only if it is newer than a matching 
  5823.             destination file or if a matching destination file does not exist 
  5824.             (see also /C).  This option is useful for keeping one directory 
  5825.             matched with another with a minimum of copying. 
  5826.  
  5827.     /V:     (Verify) Verify each disk write.  This is the same as executing the 
  5828.             VERIFY ON command, but is only active during the COPY.  /V does not 
  5829.             read back the file and compare its contents with what was written; 
  5830.             it only verifies that the data written to disk is physically 
  5831.             readable. 
  5832.  
  5833.  
  5834. ΓòÉΓòÉΓòÉ 14.13. DATE - Change the system date ΓòÉΓòÉΓòÉ
  5835.  
  5836.  Purpose:    Display and optionally change the system date. 
  5837.  
  5838.  Format:     DATE [mm -dd -yy ] 
  5839.  
  5840.              mm :  The month (1 - 12). 
  5841.              dd :  The day (1 - 31). 
  5842.              yy :  The year (80 - 99 = 1980 - 1999, or a 4- digit year). 
  5843.  
  5844.  See also:  TIME. 
  5845.  
  5846.  Usage 
  5847.  
  5848.  If you simply type DATE without any parameters, you will see the current 
  5849.  system date and time, and be prompted for a new date. Press ENTER if you don't 
  5850.  wish to change the date.  If you type a new date, it will become the current 
  5851.  system date, which is included in the directory entry for each file as it is 
  5852.  created or altered: 
  5853.  
  5854.           [c:\] date
  5855.           Thu  Dec 22, 1994  9:30:06
  5856.           Enter new date (mm-dd-yy):
  5857.  
  5858.  You can also enter a new system date by typing the DATE command plus the new 
  5859.  date on the command line: 
  5860.  
  5861.           [c:\] date 3-16-95
  5862.  
  5863.  You can use hyphens, slashes, or periods to separate the month, day, and year 
  5864.  entries.  A full 4-digit year can be entered if you wish. 
  5865.  
  5866.  DATE adjusts the format it expects depending on your country settings.  When 
  5867.  entering the date, use the correct format for the country setting currently in 
  5868.  effect on your system. 
  5869.  
  5870.  
  5871. ΓòÉΓòÉΓòÉ 14.14. DEL - Delete one or more files ΓòÉΓòÉΓòÉ
  5872.  
  5873.  Purpose:    Erase one file, a group of files, or entire subdirectories. 
  5874.  
  5875.  Format:     DEL [/A:[[-]rhsda] /F /N /P /Q /S /T /X /Y /Z] file... 
  5876.                 or 
  5877.              ERASE [/A:[[-]rhsda] /F /N /P /Q /S /T /X /Y /Z] file... 
  5878.  
  5879.              file :  The file, subdirectory, or list of files or subdirectories 
  5880.              to erase. 
  5881.  
  5882.              /A:(ttribute select)            /S(ubdirectories) 
  5883.              /F(orce delete)                 /T(otal) 
  5884.              /N(othing)                      /X (remove empty subdirectories) 
  5885.              /P(rompt)                       /Y(es to all prompts) 
  5886.              /Q(uiet)                        /Z(ap hidden and read-only files) 
  5887.  
  5888.  File Selection 
  5889.  
  5890.  Supports extended wildcards, ranges, multiple file names, and include lists. 
  5891.  
  5892.  Usage 
  5893.  
  5894.  DEL and ERASE are synonyms, you can use either one. 
  5895.  
  5896.  Use the DEL and ERASE commands with caution; the files and subdirectories that 
  5897.  you erase may be impossible to recover without specialized utilities and a lot 
  5898.  of work. 
  5899.  
  5900.  To erase a single file, simply enter the file name: 
  5901.  
  5902.           [c:\] del letters.txt
  5903.  
  5904.  You can also erase multiple files in a single command.  For example, to erase 
  5905.  all the files in the current directory with a .BAK or .PRN extension: 
  5906.  
  5907.           [c:\] del *.bak *.prn
  5908.  
  5909.  If you enter a subdirectory name, or a filename composed only of wildcards (* 
  5910.  and/or ?), DEL asks for confirmation (Y or N) unless you specified the /Y 
  5911.  option.  If you respond with a Y, DEL will delete all the files in that 
  5912.  subdirectory (hidden, system, and read-only files are only deleted if you use 
  5913.  the /Z option). 
  5914.  
  5915.  DEL displays the amount of disk space recovered, unless the /Q option is used 
  5916.  (see below).  It does so by comparing the amount of free disk space before and 
  5917.  after the DEL command is executed.  This amount may be incorrect if you are 
  5918.  using a deletion tracking system which stores deleted files in a hidden 
  5919.  directory, or if, under a multitasking system, another program performs a file 
  5920.  operation while the DEL command is executing. 
  5921.  
  5922.  Remember that DEL removes file descriptions along with files.  Most deletion 
  5923.  tracking systems will not be able to save or recover a file's description, 
  5924.  even if they can save or recover the data in a file. 
  5925.  
  5926.  DEL returns a non-zero exit code if no files are deleted, or if another error 
  5927.  occurs.  You can test this exit code with the %_? environment variable, and 
  5928.  use it with conditional commands)(&& and ||). 
  5929.  
  5930.  Options 
  5931.  
  5932.     /A:     (Attribute select) Select only those files that have the specified 
  5933.             attribute(s) set.  Preceding the attribute character with a hyphen 
  5934.             [-] will select files that do not have that attribute set.  The 
  5935.             colon [:] after /A is required.  The attributes are: 
  5936.  
  5937.                            R  Read-only 
  5938.                            H  Hidden 
  5939.                            S  System 
  5940.                            D  Subdirectory 
  5941.                            A  Archive 
  5942.  
  5943.             If no attributes are listed at all (e.g., DEL /A: ...), DEL will 
  5944.             select all files and subdirectories including hidden and system 
  5945.             files.  If attributes are combined, all the specified attributes 
  5946.             must match for a file to be selected. For example, /A:RHS will 
  5947.             select only those files with all three attributes set. 
  5948.  
  5949.     /F:     (Force delete) This option is only available in the 32-bit version 
  5950.             of 4OS2.  It forces deletion of the file without saving it to the 
  5951.             DELDIR directory (if DELDIR is not in use, /F has no effect). 
  5952.  
  5953.     /N:     (Nothing) Do everything except actually delete the file(s).  This 
  5954.             is useful for testing what the result of a DEL would be. 
  5955.  
  5956.     /P:     (Prompt) Prompt the user to confirm each erasure.  Your options at 
  5957.             the prompt are explained in detail under Page and File Prompts. 
  5958.  
  5959.     /Q:     (Quiet) Don't display filenames as they are deleted, or the number 
  5960.             of files deleted or bytes freed.  See also /T. 
  5961.  
  5962.     /S:     (Subdirectories) Delete the specified files in this directory and 
  5963.             all of its subdirectories.  This is like a GLOBAL DEL, and can be 
  5964.             used to delete all the files in a subdirectory tree or even a whole 
  5965.             disk.  It should be used with caution! 
  5966.  
  5967.     /T:     (Total) Don't display filenames as they are deleted, but display 
  5968.             the total number of files deleted plus the amount of free disk 
  5969.             space recovered.  Unlike /Q, the /T option will not speed up 
  5970.             deletions under DOS. 
  5971.  
  5972.     /X:     (Remove empty subdirectories) Remove empty subdirectories after 
  5973.             deleting (only useful when used with /S). 
  5974.  
  5975.     /Y:     (Yes) The reverse of /P -- it assumes a Y response to everything, 
  5976.             including deleting an entire subdirectory tree.  4OS2 normally 
  5977.             prompts before deleting files when the name consists only of 
  5978.             wildcards or a subdirectory name (see above); /Y overrides this 
  5979.             protection, and should be used with extreme caution! 
  5980.  
  5981.     /Z:     (Zap) Delete read-only, hidden, and system files as well as normal 
  5982.             files.  Files with the read-only, hidden, or system attribute set 
  5983.             are normally protected from deletion; /Z overrides this protection, 
  5984.             and should be used with caution.  Because EXCEPT works by hiding 
  5985.             files, /Z will override an EXCEPT command. 
  5986.  
  5987.             For example, to delete the entire subdirectory tree starting with 
  5988.             C:\UTIL, including hidden and read- only files, without prompting 
  5989.             (use this command with CAUTION!): 
  5990.  
  5991.                                 [c:\] del /sxyz c:\util\
  5992.  
  5993.  
  5994. ΓòÉΓòÉΓòÉ 14.15. DELAY - Pause for a specified length of time ΓòÉΓòÉΓòÉ
  5995.  
  5996.  Purpose:    Pause for a specified length of time. 
  5997.  
  5998.  Format:     DELAY [seconds ] 
  5999.  
  6000.              seconds :  The number of seconds to delay. 
  6001.  
  6002.  Usage 
  6003.  
  6004.  DELAY is useful in batch file loops while waiting for something to occur.  To 
  6005.  wait for 10 seconds: 
  6006.  
  6007.           delay 10
  6008.  
  6009.  A simple loop could make a tone with the BEEP command to get the operator's 
  6010.  attention and then DELAY for a few seconds while waiting for the user to 
  6011.  respond. 
  6012.  
  6013.  For delays shorter than one second, use the BEEP command with an inaudible 
  6014.  frequency (below 20 Hz). 
  6015.  
  6016.  You can cancel a delay by pressing Ctrl-C or Ctrl-Break. 
  6017.  
  6018.  
  6019. ΓòÉΓòÉΓòÉ 14.16. DESCRIBE - Create or modify file descriptions ΓòÉΓòÉΓòÉ
  6020.  
  6021.  Purpose:    Create, modify, or delete file and subdirectory descriptions. 
  6022.  
  6023.  Format:     DESCRIBE [/A:[[-]rhsda]] file ["description" ] ... 
  6024.  
  6025.  /A:(ttribute select) 
  6026.  
  6027.              file :  The file or files to operate on. 
  6028.              "description" :  The description to attach to the file. 
  6029.  
  6030.  File Selection 
  6031.  
  6032.  Supports extended wildcards, ranges, multiple file names, and include lists. 
  6033.  
  6034.  Usage 
  6035.  
  6036.  DESCRIBE adds descriptions to files and subdirectories.  The descriptions are 
  6037.  displayed by DIR in single-column mode and by SELECT.  Descriptions let you 
  6038.  identify your files in much more meaningful ways than you can in an 
  6039.  eight-character filename. 
  6040.  
  6041.  You enter a description on the command line by typing the DESCRIBE command, 
  6042.  the filename, and the description in quotation marks, like this: 
  6043.  
  6044.           [c:\] describe memo.txt "Memo to Bob about party"
  6045.  
  6046.  If you don't put a description on the command line, DESCRIBE will prompt you 
  6047.  for it: 
  6048.  
  6049.           [c:\] describe memo.txt
  6050.           Describe "memo.txt" : Memo to Bob about party
  6051.  
  6052.  If you use wildcards or multiple filenames with the DESCRIBE command and don't 
  6053.  include the description text, you will be prompted to enter a description for 
  6054.  each file.  If you do include the description on the command line, all 
  6055.  matching files will be given the same description. 
  6056.  
  6057.  Each description can be up to 40 characters long.  You can change this limit 
  6058.  with the DescriptionMax directive in 4OS2.INI.  DESCRIBE can edit descriptions 
  6059.  longer than DescriptionMax (up to a limit of 511 characters), but will not 
  6060.  allow you to lengthen the existing text. 
  6061.  
  6062.  The descriptions are stored in each directory in a hidden file called 
  6063.  DESCRIPT.ION.  Use the ATTRIB command to remove the hidden attribute from this 
  6064.  file if you need to copy or delete it.  DESCRIPT.ION is always created as a 
  6065.  hidden file, but will not be re-hidden by 4OS2 if you remove the hidden 
  6066.  attribute.  You can change the description file name with the DescriptionName 
  6067.  directive in 4OS2.INI or the SETDOS /D command, and retrieve it with the 
  6068.  _DName internal variable. 
  6069.  
  6070.  The description file is modified appropriately whenever you perform an 
  6071.  internal command which affects it (such as COPY, MOVE, DEL, or RENAME), but 
  6072.  not if you use an external program (such as XCOPY or a visual shell). 
  6073.  
  6074.  On HPFS drives, you will not see file descriptions in a normal DIR display, 
  6075.  because DIR must leave space for the long filenames used on these drives.  To 
  6076.  view the descriptions, use DIR /Z to display the directory in FAT format.  See 
  6077.  the DIR command for more details. 
  6078.  
  6079.  Options 
  6080.  
  6081.     /A:     (Attribute select) Select only those files that have the specified 
  6082.             attribute(s) set.  Preceding the attribute character with a hyphen 
  6083.             [-] will select files that do not have that attribute set.  The 
  6084.             colon [:] after /A is required.  The attributes are: 
  6085.  
  6086.                            R  Read-only 
  6087.                            H  Hidden 
  6088.                            S  System 
  6089.                            D  Subdirectory 
  6090.                            A  Archive 
  6091.  
  6092.             If no attributes are listed at all (e.g., DESCRIBE /A: ...), 
  6093.             DESCRIBE will select all files and subdirectories including hidden 
  6094.             and system files.  If attributes are combined, all the specified 
  6095.             attributes must match for a file to be selected. For example, 
  6096.             /A:RHS will select only those files with all three attributes set. 
  6097.  
  6098.  
  6099. ΓòÉΓòÉΓòÉ 14.17. DETACH - Start a program in detached mode ΓòÉΓòÉΓòÉ
  6100.  
  6101.  Purpose:    Start an OS/2 program in detached mode. 
  6102.  
  6103.  Format:     DETACH command 
  6104.  
  6105.              command :  The name of a command to execute, including an optional 
  6106.              drive and path specification. 
  6107.  
  6108.  See also:  START. 
  6109.  
  6110.  Usage 
  6111.  
  6112.  When you start a program with DETACH, that program cannot use the keyboard, 
  6113.  mouse, or video display.  It is "detached" from the normal means of user input 
  6114.  and output.  However, you can redirect the program's standard I/O to other 
  6115.  devices if necessary, using redirection symbols. 
  6116.  
  6117.  The command can be an internal command, external command, alias, or batch 
  6118.  file.  If it is not an external command, 4OS2 will detach a copy of itself to 
  6119.  execute the command. 
  6120.  
  6121.  For example, the following command will detach a copy of 4OS2 to run the batch 
  6122.  file XYZ.BTM : 
  6123.  
  6124.           [c:\] detach xyz.btm
  6125.  
  6126.  Once the program has started, 4OS2 returns to the prompt immediately.  It does 
  6127.  not wait for a detached program to finish. 
  6128.  
  6129.  
  6130. ΓòÉΓòÉΓòÉ 14.18. DIR - Display directories ΓòÉΓòÉΓòÉ
  6131.  
  6132.  Purpose:    Display information about files and subdirectories. 
  6133.  
  6134.  Format:     DIR [/1 /2 /4 /A[[:][-]rhsda] /B /D /E /F /H /I"text" /J /K /L /M 
  6135.              /N /O[[:][-]adeginrsu] /P /R /S /T[:acw] /U /V /W /Z] [file...] 
  6136.  
  6137.              file :  The file, directory, or list of files or directories to 
  6138.              display. 
  6139.  
  6140.              /1 (one column)                 /L(ower case) 
  6141.              /2 (two columns)                /M (suppress footer) 
  6142.              /4 (four columns)               /N(ew format) 
  6143.              /A(ttribute select)             /O(rder) 
  6144.              /B(are)                         /P(ause) 
  6145.              /D(isable color coding)         /R (disable wRap) 
  6146.              /E (use upper case)             /S(ubdirectories) 
  6147.              /F(ull path)                    /T (aTtribute) or (Time) 
  6148.              /H(ide dots)                    /U (sUmmary information) 
  6149.              /I (match descriptions)         /V(ertical sort) 
  6150.              /J(ustify names)                /W(ide) 
  6151.              /K (suppress header)            /Z (use FAT format) 
  6152.  
  6153.  See also:  ATTRIB, DESCRIBE, SELECT, and SETDOS. 
  6154.  
  6155.  File Selection 
  6156.  
  6157.  Supports extended wildcards, ranges, multiple file names, and include lists. 
  6158.  
  6159.  Usage 
  6160.  
  6161.  DIR can be used to display information about files from one or more of your 
  6162.  disk directories, in a wide range of formats.  Depending on the options 
  6163.  chosen, you can display the file name, attributes, and size; the time and date 
  6164.  of the last change to the file; the file description; and the file's 
  6165.  compression ratio.  You can also display information in 1, 2, 4, or 5 columns, 
  6166.  sort the files several different ways, use color to distinguish file types, 
  6167.  and pause after each full screen. 
  6168.  
  6169.  The various DIR displays are controlled through options or switches.  The best 
  6170.  way to learn how to use the many options available with the DIR command is to 
  6171.  experiment.  You will soon know which options you want to use regularly.  You 
  6172.  can select those options permanently by using the ALIAS command. 
  6173.  
  6174.  On HPFS drives, DIR will use the standard long name display format with the 
  6175.  filename at the right-hand side of the display.  File descriptions are not 
  6176.  displayed in this format.  To switch to the more traditional FAT (short name) 
  6177.  format, and display the file descriptions, use the /Z switch. 
  6178.  
  6179.  You may want to mix several options.  For example, to display all the files in 
  6180.  the current directory, in 2 columns, sorted vertically (down one column then 
  6181.  down the next), and with a pause at the end of each page: 
  6182.  
  6183.           [c:\] dir /2/p/v
  6184.  
  6185.  To set up this format as the default, using an alias: 
  6186.  
  6187.           [c:\] alias dir=*dir /2/p/v
  6188.  
  6189.  This example displays all the files on all directories of drive C, including 
  6190.  hidden and system files, pausing after each page: 
  6191.  
  6192.           [c:\] dir /s/a/p c:\
  6193.  
  6194.  DIR allows wildcard characters (* and ?) in the filename.  If you don't 
  6195.  specify a filename, DIR defaults to *.* (display all non- hidden files and 
  6196.  subdirectories in the current directory).  To display all of the .WKS files in 
  6197.  the current directory: 
  6198.  
  6199.           [c:\] dir *.wks
  6200.  
  6201.  With the /I option, DIR can select files to display based on their 
  6202.  descriptions.  DIR will display a file if its description matches the text 
  6203.  after the /I switch.  The search is not case sensitive.  You can use wildcards 
  6204.  and extended wildcards as part of the text.  For example, to display any file 
  6205.  described as a "Test File" you can use this command: 
  6206.  
  6207.           [c:\] dir /i"test file"
  6208.  
  6209.  If you want to display files that include the words "test file" anywhere in 
  6210.  their descriptions, use extended wild cards like this: 
  6211.  
  6212.           [c:\] dir /i"*test file*"
  6213.  
  6214.  If you link two or more filenames together with spaces, DIR will display all 
  6215.  of the files that match the first name and then all of the files that match 
  6216.  the second name.  You may use a different drive and path for each filename. 
  6217.  This example lists all of the .WKS and then all of the .WK1 files in the 
  6218.  current directory: 
  6219.  
  6220.           [c:\] dir *.wks *.wk1
  6221.  
  6222.  If you use an include list to link multiple filenames, DIR will display the 
  6223.  matching filenames in a single listing.  Only the first filename in an include 
  6224.  list can have a path; the other files must be in the same path.  This example 
  6225.  displays the same files as the previous example, but the .WKS and .WK1 files 
  6226.  are intermixed: 
  6227.  
  6228.           [c:\] dir *.wks;*.wk1
  6229.  
  6230.  You can display the file and subdirectory names in color by setting the 
  6231.  COLORDIR environment variable or using the ColorDir directive in your .INI 
  6232.  file.  See Color-Coded Directories for details. 
  6233.  
  6234.  If you are using color-coded directories and attempt to redirect the output of 
  6235.  DIR to a character device, such as a serial port or the printer, 
  6236.  non-color-coded file names will be displayed on the device but color-coded 
  6237.  names may still be displayed on the screen. This will not occur if the output 
  6238.  of DIR is redirected to a disk file.  To prevent this problem, use the /D 
  6239.  switch to disable color coding when redirecting the output of DIR to a 
  6240.  character device. 
  6241.  
  6242.  By default, 4OS2 will display filenames in lower case on FAT drives, and in 
  6243.  the case in which the filenames are stored on HPFS drives (HPFS drives support 
  6244.  upper-case, lower-case, and mixed-case filenames).  You can override these 
  6245.  defaults and force filenames to display in upper case with /E, or in lower 
  6246.  case with /L. 
  6247.  
  6248.  When displaying file descriptions, DIR will wrap long lines to fit on the 
  6249.  screen.  DIR displays a maximum of 40 characters of text in each line of a 
  6250.  description, unless your screen width allows a wider display.  If you disable 
  6251.  description wrapping with the /R switch, the description is truncated at the 
  6252.  right edge of the screen, and a right arrow is added at the end of the line to 
  6253.  alert you to the existence of additional description text. 
  6254.  
  6255.  If you attempt to redirect the output of DIR to a character device, such as a 
  6256.  serial port or the printer, long descriptions will be wrapped at the screen 
  6257.  width in the redirected output.  If this is not what you want, use /R to 
  6258.  disable wrapping. 
  6259.  
  6260.  When sorting file names and extensions, 4OS2 normally assumes that sequences 
  6261.  of digits should be sorted numerically (for example, the file DRAW2 would come 
  6262.  before DRAW03 because 2 is numerically smaller than 03), rather than strictly 
  6263.  alphabetically (where DRAW2 would come second because "2" is after "0" in 
  6264.  alphanumeric order). You can defeat this behavior and force a strict 
  6265.  alphabetic sort with the /O:a option. 
  6266.  
  6267.  If you have selected a specific country code for your system, DIR will display 
  6268.  the date in the format for that country.  The default date format is U.S. 
  6269.  (mm-dd-yy).  The separator character in the file time will also be affected by 
  6270.  the country code. 
  6271.  
  6272.  DIR can handle directories of any size, limited only by available memory. 
  6273.  Memory requirements for DIR are generally not a concern under 4OS2, because of 
  6274.  the virtual memory available under these operating systems. 
  6275.  
  6276.  Options on the command line apply only to the filenames which follow the 
  6277.  option, and options at the end of the line apply to the preceding filename 
  6278.  only.  This allows you to specify different options for different groups of 
  6279.  files, yet retains compatibility with the traditional DIR command when a 
  6280.  single filename is specified. 
  6281.  
  6282.  Options 
  6283.  
  6284.     /1:     Single column display -- display the filename, size, date, time, 
  6285.             and description.  This is the default. If /T is used the attributes 
  6286.             are displayed instead of the description; if /C or /O:c is used the 
  6287.             compression ratio is displayed instead of the description. 
  6288.  
  6289.     /2:     Two column display -- display the filename, size, date, and time. 
  6290.             If you use /2 (or /4) on an HPFS drive, DIR will only display the 
  6291.             file names.  Also, the number of columns may be reduced to one for 
  6292.             names too long to fit on half the screen.  Due to these 
  6293.             restrictions, /2 is normally most useful on HPFS drives when used 
  6294.             with /Z to force the display to FAT format. 
  6295.  
  6296.     /4:     Four column display -- display the filename and size, in K 
  6297.             (kilobytes) or M (megabytes).  The note under /2 above regarding 
  6298.             HPFS drives applies to /4 as well. 
  6299.  
  6300.     /A:     (Attribute select) Select only those files that have the specified 
  6301.             attribute(s) set.  Preceding the attribute character with a hyphen 
  6302.             [-] will select files that do not have that attribute set.  The 
  6303.             colon [:] after /A is optional.  The attributes are: attributes 
  6304.             are: 
  6305.  
  6306.               R  Read-only 
  6307.               H  Hidden 
  6308.               S  System 
  6309.               D  Subdirectory 
  6310.               A  Archive 
  6311.  
  6312.             If no attributes are listed at all (e.g., DIR /A ...), DIR will 
  6313.             display all files and subdirectories including hidden and system 
  6314.             files.  If attributes are combined, all the specified attributes 
  6315.             must match for a file to be included in the listing.  For example, 
  6316.             /A:RHS will display only those files with all three attributes set. 
  6317.  
  6318.     /B:     (Bare)  Suppress the header and summary lines, and display file or 
  6319.             subdirectory names only, in a single column. This option is most 
  6320.             useful when you want to redirect a list of names to a file or 
  6321.             another program.  If you use /B with /S, DIR will show the full 
  6322.             path of each file instead of simply its name and extension. 
  6323.  
  6324.     /D:     (Disable color coding)  Temporarily disable directory color coding. 
  6325.             May be required when color-coded directories are used and DIR 
  6326.             output is redirected to a character device like the printer (e.g., 
  6327.             PRN or LPT1) or serial port (e.g., COM1 or COM2).  /D is not 
  6328.             required when DIR output is redirected to a file. 
  6329.  
  6330.     /E:     Display filenames in the traditional upper case; also see SETDOS /U 
  6331.             and the UpperCase directive in 4OS2.INI. 
  6332.  
  6333.     /F:     (Full path)  Display each filename with its drive letter and path 
  6334.             in a single column, without other information. 
  6335.  
  6336.     /H:     (Hide dots)  Suppress the display of the "." and ".." directories. 
  6337.  
  6338.     /I:     Display filenames by matching text in their descriptions.  The text 
  6339.             can include wild cards and extended wildcards.  The search text 
  6340.             must be enclosed in quotation marks.  /I may be used to select 
  6341.             files even if descriptions are not displayed (for example, if /2 is 
  6342.             used).  However, /I will be ignored if /C or /O:c is used. 
  6343.  
  6344.     /J:     (Justify names)  Justify (align) filename extensions and display 
  6345.             them in the traditional format. 
  6346.  
  6347.     /K:     Suppress the header (disk and directory name) display. 
  6348.  
  6349.     /L:     (Lower case)  Display file and directory names in lower case; also 
  6350.             see SETDOS /U and the UpperCase directive in 4OS2.INI. 
  6351.  
  6352.     /M:     Suppress the footer (file and byte count totals) display. 
  6353.  
  6354.     /N:     Use the HPFS display format, even if the files are stored on a FAT 
  6355.             file system volume. 
  6356.  
  6357.     /O:     (Order) Set the sorting order.  You may use any combination of the 
  6358.             following sorting options; if multiple options are used, the 
  6359.             listing will be sorted with the first sort option as the primary 
  6360.             key, the next as the secondary key, and so on: 
  6361.  
  6362.               -  Reverse the sort order for the next option 
  6363.               a  Sort in ASCII order, not numerically, when there are digits in 
  6364.             the name 
  6365.               d  Sort by date and time (oldest first); for HPFS drives also see 
  6366.             /T 
  6367.               e  Sort by extension 
  6368.               g  Group subdirectories first, then files 
  6369.               i  Sort by file description (ignored if /C or /O:c is used) 
  6370.               n  Sort by filename (this is the default) 
  6371.               r  Reverse the sort order for all options 
  6372.               s  Sort by size 
  6373.               u  Unsorted 
  6374.  
  6375.     /P:     (Pause)  Wait for a key to be pressed after each screen page before 
  6376.             continuing the display.  Your options at the prompt are explained 
  6377.             in detail under Page and File Prompts. 
  6378.  
  6379.     /R      (disable wRap)  Forces long descriptions to be displayed on a 
  6380.             single line, rather than wrapped onto two or more lines.  Use /R 
  6381.             when output is redirected to a character device, such as a serial 
  6382.             port or the printer; or when you want descriptions truncated, 
  6383.             rather than wrapped, in the on-screen display. 
  6384.  
  6385.     /S:     (Subdirectories)  Display file information from the current 
  6386.             directory and all of its subdirectories.  DIR will only display 
  6387.             headers and summaries for those directories which contain files 
  6388.             that match the filename(s) and attributes (if /A is used) that you 
  6389.             specify on the command line. 
  6390.  
  6391.     /T      (aTtribute display)  Display the filenames, attributes, and 
  6392.             descriptions.  The descriptions will be wrapped onto the next line, 
  6393.             if necessary, unless you also use the /R (truncate) option.  If you 
  6394.             use both /T and /R, descriptions are truncated after 34 characters 
  6395.             on an 80-column display.  The attributes are displayed in the 
  6396.             format RHSA, with the following meanings: 
  6397.  
  6398.               R  Read-only 
  6399.               H  Hidden 
  6400.               S  System 
  6401.               A  Archive 
  6402.             If you wish to add another option after /T, you must start the next 
  6403.             option with a forward slash.  If you don't, 4OS2 will interpret the 
  6404.             /T as the time display switch and the following character as a 
  6405.             valid or invalid time selector  For example: 
  6406.  
  6407.                                         [c:\] dir /tz             incorrect, will display error
  6408.                                         [c:\] dir /t/z            correct
  6409.  
  6410.  
  6411.     /T:acw  (Time display)  Specify which of the date and time fields on an 
  6412.             HPFS drive should be displayed and used for sorting: 
  6413.  
  6414.               a  Last access time 
  6415.               c  Creation time 
  6416.               w  Last write time (default) 
  6417.  
  6418.     /U      (sUmmary information)  Only display the number of files, the total 
  6419.             file size, and the total amount of disk space used. 
  6420.  
  6421.     /V:     (Vertical sort)  Display the filenames sorted vertically rather 
  6422.             than horizontally (use with the /2, /4 or /W options). 
  6423.  
  6424.     /W:     (Wide)  Display filenames only, horizontally across the screen (5 
  6425.             columns on an 80-character wide display). 
  6426.  
  6427.     /Z:     Display an HPFS directory in FAT format.  Long names will be 
  6428.             truncated to 12 characters.  If the name is longer than 12 
  6429.             characters, it will be followed by a right arrow to show that one 
  6430.             or more characters have been truncated. 
  6431.  
  6432.  
  6433. ΓòÉΓòÉΓòÉ 14.19. DIRS - Display the directory stack ΓòÉΓòÉΓòÉ
  6434.  
  6435.  Purpose:    Display the current directory stack. 
  6436.  
  6437.  Format:     DIRS 
  6438.  
  6439.  See also:  PUSHD and POPD. 
  6440.  
  6441.  Usage 
  6442.  
  6443.  The PUSHD command adds the current default drive and directory to the 
  6444.  directory stack, a list that 4OS2 maintains in memory.  The POPD command 
  6445.  removes the top entry of the directory stack and makes that drive and 
  6446.  directory the new default.  The DIRS command displays the contents of the 
  6447.  directory stack, with the most recent entries on top (i.e., the next POPD will 
  6448.  retrieve the first entry that DIRS displays). 
  6449.  
  6450.  The directory stack holds 255 characters, enough for 10 to 20 typical drive 
  6451.  and directory entries. 
  6452.  
  6453.  
  6454. ΓòÉΓòÉΓòÉ 14.20. DO - Create loops in batch files ΓòÉΓòÉΓòÉ
  6455.  
  6456.  Purpose:    Create loops in batch files. 
  6457.  
  6458.  Format:     DO [n | FOREVER] 
  6459.                 or 
  6460.              DO varname = start TO end [BY n ] 
  6461.                 or 
  6462.              DO [WHILE | UNTIL] condition 
  6463.                 ... 
  6464.              [ITERATE] 
  6465.              [LEAVE] 
  6466.                 ... 
  6467.              ENDDO 
  6468.  
  6469.              n, start, end :  An integer between 0 and 2,147,483,647 inclusive, 
  6470.              or an internal variable or variable function that evaluates to 
  6471.              such a value. 
  6472.              varname :  The environment variable that will hold the loop 
  6473.              counter. 
  6474.              condition :  A test to determine if the loop should be executed. 
  6475.  
  6476.  Usage 
  6477.  
  6478.  DO can only be used in batch files. 
  6479.  
  6480.  DO can be used to create 3 different kinds of loops.  The first, introduced by 
  6481.  DO n, is a counted loop.  The batch file lines between DO and ENDDO are 
  6482.  repeated n times.  You can also specify "forever" for n if you wish to create 
  6483.  an endless loop. For example: 
  6484.  
  6485.           do 5
  6486.              beep
  6487.           enddo
  6488.  
  6489.  The second type of loop is similar to a "for loop" in programming languages 
  6490.  like BASIC.  DO creates an environment variable, varname, and sets it equal to 
  6491.  the value start (if varname already exists in the environment, it will be 
  6492.  overwritten).  DO then begins the loop process by comparing the value of 
  6493.  varname with the value of end.  If varname is less than or equal to end, DO 
  6494.  executes the batch file lines up to the ENDDO.  Next, DO adds 1 to the value 
  6495.  of varname, or adds the value n if BY n is specified, and repeats the compare 
  6496.  and execute process until varname is greater than end. This example displays 
  6497.  the even numbers from 2 through 20: 
  6498.  
  6499.           do i = 2 to 20 by 2
  6500.              echo %i
  6501.           enddo
  6502.  
  6503.  DO can also count down, rather than up.  If n is negative, varname will 
  6504.  decrease by n with each loop, and the loop will stop when varname is less than 
  6505.  end.  For example, to display the even numbers from 2 through 20 in reverse 
  6506.  order, replace the first line of the example above with: 
  6507.  
  6508.           do i = 20 to 2 by -2
  6509.  
  6510.  The third type of loop is called a "while loop" or "until loop." DO evaluates 
  6511.  the condition, which can be any of the tests supported by the IF command, and 
  6512.  executes the lines between DO and ENDDO as long as the condition is true.  The 
  6513.  loop ends when the condition becomes false. 
  6514.  
  6515.  WHILE tests the condition at the start of the loop; UNTIL tests it at the end. 
  6516.  If you use WHILE, the loop may never be executed (if the condition is false at 
  6517.  the start of the loop); if you use UNTIL, the loop will always be executed at 
  6518.  least once. 
  6519.  
  6520.  Two special commands, ITERATE and LEAVE, can only be used inside a DO / ENDDO 
  6521.  loop.  ITERATE ignores the remaining lines inside the loop and returns to the 
  6522.  beginning of loop for another iteration (unless DO determines that the loop is 
  6523.  finished).  LEAVE exits from the current DO loop and continues with the line 
  6524.  following ENDDO. Both ITERATE and LEAVE are most often used in an IF or IFF 
  6525.  command: 
  6526.  
  6527.           do while "%var" != "%val1"
  6528.              ...
  6529.              if "%var" == "%val2" leave
  6530.           enddo
  6531.  
  6532.  You can nest DO loops up to 15 levels deep. 
  6533.  
  6534.  You can exit from all DO / ENDDO loops by using GOTO to a line past the last 
  6535.  ENDDO.  However, be sure to read the cautionary notes about GOTO and DO under 
  6536.  the GOTO command before using a GOTO inside any DO loop. 
  6537.  
  6538.  
  6539. ΓòÉΓòÉΓòÉ 14.21. DPATH - Set the data search path ΓòÉΓòÉΓòÉ
  6540.  
  6541.  Purpose:    Specify the subdirectories which applications will search to find 
  6542.              files that are not in the current directory. 
  6543.  
  6544.  Format:     DPATH [directory [;directory... ]] 
  6545.  
  6546.              directory :  The full name of a directory to include in the DPATH 
  6547.              (data path) setting. 
  6548.  
  6549.  See also:  PATH, SET, and ESET. 
  6550.  
  6551.  Usage 
  6552.  
  6553.  When most OS/2 applications try to open a data file, they look for the file in 
  6554.  the current directory first.  If they fail to find the file there, they search 
  6555.  each of the directories in the DPATH setting in the order that they are 
  6556.  included.  Internal commands like TYPE do not search the DPATH directories for 
  6557.  files. 
  6558.  
  6559.  For example, the following DPATH command directs applications to look for 
  6560.  files in this order:  the current directory, the INIT directory on C, and the 
  6561.  CONFIG directory on D: 
  6562.  
  6563.           [c:\] dpath c:\init;d:\config
  6564.  
  6565.  The listing of directories to be searched can be set or viewed with DPATH. 
  6566.  The list is stored as an environment string with the variable name DPATH, and 
  6567.  can also be set or viewed with the SET command and edited with the ESET 
  6568.  command. 
  6569.  
  6570.  Directory names in the DPATH must be separated with semicolons [;].  4OS2 will 
  6571.  not shift directory names in the DPATH to upper case as it does with those in 
  6572.  the PATH setting.  If you want the names in the DPATH to be in upper case you 
  6573.  must enter them that way. 
  6574.  
  6575.  If you enter DPATH with no parameters, 4OS2 displays the current DPATH search 
  6576.  list. 
  6577.  
  6578.  
  6579. ΓòÉΓòÉΓòÉ 14.22. DRAWBOX - Draw a box ΓòÉΓòÉΓòÉ
  6580.  
  6581.  Purpose:    Draw a box on the screen. 
  6582.  
  6583.  Format:     DRAWBOX ulrow ulcol lrrow lrcol style [BRIght] [BLInk] fg ON 
  6584.              [BRIght] bg [FILl [BRIght] bgfill ] [ZOOm] [SHAdow] 
  6585.  
  6586.              ulrow :  Row for upper left corner 
  6587.              ulcol :  Column for upper left corner 
  6588.              lrrow :  Row for lower right corner 
  6589.              lrcol :  Column for lower right corner 
  6590.              style :  Box drawing style: 
  6591.              0   No lines (box is drawn with blanks) 
  6592.              1   Single line 
  6593.              2   Double line 
  6594.              3   Single line on top and bottom, double on sides 
  6595.              4   Double line on top and bottom, single on sides 
  6596.              fg :  Foreground character color 
  6597.              bg :  Background character color 
  6598.              bgfill :  Background fill color (for the inside of the box) 
  6599.  
  6600.  See also:  DRAWHLINE and DRAWVLINE. 
  6601.  
  6602.  Usage 
  6603.  
  6604.  DRAWBOX is useful for creating attractive screen displays in batch files. 
  6605.  
  6606.  For example, to draw a box around the entire screen with bright white lines on 
  6607.  a blue background: 
  6608.  
  6609.           drawbox 0 0 24 79 1 bri whi on blu fill blu
  6610.  
  6611.  See Colors and Color Names for details about colors and notes on the use of 
  6612.  bright background colors. 
  6613.  
  6614.  If you use ZOOM, the box appears to grow in steps to its final size.  The 
  6615.  speed of the zoom operation depends on the speed of your video system. 
  6616.  
  6617.  If you use SHADOW, a drop shadow is created by changing the characters in the 
  6618.  row under the box and the 2 columns to the right of the box to normal 
  6619.  intensity text with a black background (this will make characters displayed in 
  6620.  black disappear entirely). 
  6621.  
  6622.  The row and column values are zero-based, so on a standard 25 line by 80 
  6623.  column display, valid rows are 0 - 24 and valid columns are 0 - 79. 
  6624.  
  6625.  DRAWBOX checks for valid row and column values, and displays a "Usage" error 
  6626.  message if any values are out of range. 
  6627.  
  6628.  Unlike DRAWHLINE and DRAWVLINE, DRAWBOX does not automatically connect boxes 
  6629.  to existing lines on the screen with the proper connector characters.  If you 
  6630.  want to draw lines inside a box and have the proper connectors drawn 
  6631.  automatically, draw the box first, then use DRAWHLINE and DRAWVLINE to draw 
  6632.  the lines. 
  6633.  
  6634.  DRAWBOX uses the standard line and box drawing characters in the U.S. English 
  6635.  extended ASCII character set.  If your system is configured for a different 
  6636.  country or language, the box may not appear on your screen as you expect. 
  6637.  
  6638.  
  6639. ΓòÉΓòÉΓòÉ 14.23. DRAWHLINE - Draw a horizontal line ΓòÉΓòÉΓòÉ
  6640.  
  6641.  Purpose:    Draw a horizontal line on the screen. 
  6642.  
  6643.  Format:     DRAWHLINE row column len style [BRIght] [BLInk] fg ON [BRIght] bg 
  6644.  
  6645.              row :  Starting row 
  6646.              column :  Starting column 
  6647.              len :  Length of line 
  6648.              style :  Line drawing style: 
  6649.              1   Single line 
  6650.              2   Double line 
  6651.              fg :  Foreground character color 
  6652.              bg :  Background character color 
  6653.  
  6654.  See also:  DRAWBOX and DRAWVLINE. 
  6655.  
  6656.  Usage 
  6657.  
  6658.  DRAWHLINE is useful for creating attractive screen displays in batch files. 
  6659.  It detects other lines and boxes on the display, and creates the appropriate 
  6660.  connector characters when possible (not all types of lines can be connected 
  6661.  with the available characters). 
  6662.  
  6663.  For example, the following command draws a double line along the top row of 
  6664.  the display with green characters on a blue background: 
  6665.  
  6666.           drawhline 0 0 80 2 green on blue
  6667.  
  6668.  The row and column values are zero-based, so on a standard 25 line by 80 
  6669.  column display, valid rows are 0 - 24 and valid columns are 0 - 79.  DRAWHLINE 
  6670.  checks for a valid row and column, and displays a "Usage" error message if 
  6671.  either value is out of range. 
  6672.  
  6673.  See Colors and Color Names for details about colors and notes on the use of 
  6674.  bright background colors. 
  6675.  
  6676.  DRAWHLINE uses the standard line and box drawing characters in the U.S. 
  6677.  English extended ASCII character set.  If your system is configured for a 
  6678.  different country or language, the line may not appear on your screen as you 
  6679.  expect. 
  6680.  
  6681.  
  6682. ΓòÉΓòÉΓòÉ 14.24. DRAWVLINE - Draw a vertical line ΓòÉΓòÉΓòÉ
  6683.  
  6684.  Purpose:    Draw a vertical line on the screen. 
  6685.  
  6686.  Format:     DRAWVLINE row column len style [BRIght][BLInk] fg ON [BRIght] bg 
  6687.  
  6688.              row :  Starting row 
  6689.              column :  Starting column 
  6690.              len :  Length of line 
  6691.              style :  Line drawing style: 
  6692.              1   Single line 
  6693.              2   Double line 
  6694.              fg :  Foreground character color 
  6695.              bg :  Background character color 
  6696.  
  6697.  See also:  DRAWBOX and DRAWHLINE. 
  6698.  
  6699.  Usage 
  6700.  
  6701.  DRAWVLINE is useful for creating attractive screen displays in batch files. 
  6702.  It detects other lines and boxes on the display, and creates the appropriate 
  6703.  connector characters when possible (not all types of lines can be connected 
  6704.  with the available characters). 
  6705.  
  6706.  For example, to draw a double width line along the left margin of the display 
  6707.  with bright red characters on a black background: 
  6708.  
  6709.           drawvline 0 0 25 2 bright red on black
  6710.  
  6711.  The row and column values are zero-based, so on a standard 25 line by 80 
  6712.  column display, valid rows are 0 - 24 and valid columns are 0 - 79.  DRAWVLINE 
  6713.  checks for a valid row and column, and displays a "Usage" error message if 
  6714.  either value is out of range. 
  6715.  
  6716.  See Colors and Color Names for details about colors and notes on the use of 
  6717.  bright background colors. 
  6718.  
  6719.  DRAWVLINE uses the standard line and box drawing characters in the U.S. 
  6720.  English extended ASCII character set.  If your system is configured for a 
  6721.  different country or language, the line may not appear on your screen as you 
  6722.  expect. 
  6723.  
  6724.  
  6725. ΓòÉΓòÉΓòÉ 14.25. ECHO - Display a message / set echo state ΓòÉΓòÉΓòÉ
  6726.  
  6727.  Purpose:    Display a message, enable or disable batch file or command-line 
  6728.              echoing, or display the echo status. 
  6729.  
  6730.  Format:     ECHO [ON | OFF | message ] 
  6731.  
  6732.              message :  Text to display. 
  6733.  
  6734.  See also:  ECHOS, SCREEN, SCRPUT, SETDOS and TEXT. 
  6735.  
  6736.  Usage 
  6737.  
  6738.  4OS2 has a separate echo capability for batch files and for the command line. 
  6739.  The command-line ECHO state is independent of the batch file ECHO state; 
  6740.  changing ECHO in a batch file has no effect on the display at the command 
  6741.  prompt, and vice versa. 
  6742.  
  6743.  To see the current echo state, use the ECHO command with no arguments.  This 
  6744.  displays either the batch file or command-line echo state, depending on where 
  6745.  the ECHO command is performed. 
  6746.  
  6747.  In a batch file, if you turn ECHO on, each line of the file is displayed 
  6748.  before it is executed.  If you turn ECHO off, each line is executed without 
  6749.  being displayed.  ECHO can also be used in a batch file to display a message 
  6750.  on the screen.  Regardless of the ECHO state, a batch file line that begins 
  6751.  with the [@] character will not be displayed.  To turn off batch file echoing, 
  6752.  without displaying the ECHO command, use this line: 
  6753.  
  6754.           @echo off
  6755.  
  6756.  ECHO commands in a batch file will send messages to the screen while the batch 
  6757.  file executes, even if ECHO is set OFF.  For example, this line will display a 
  6758.  message in a batch file: 
  6759.  
  6760.           echo Processing your print files...
  6761.  
  6762.  If you want to echo a blank line from within a batch file, enter: 
  6763.  
  6764.           echo.
  6765.  
  6766.  You cannot use the command separator character [&], or the redirection symbols 
  6767.  [| > <] in an ECHO message, unless you enclose them in quotes (see Argument 
  6768.  Quoting) or precede them with the escape character. 
  6769.  
  6770.  ECHO defaults to ON in batch files.  The current ECHO state is inherited by 
  6771.  called batch files.  You can change the default setting to ECHO OFF with the 
  6772.  SETDOS /V0 command or the BatchEcho directive in the .INI file. 
  6773.  
  6774.  If you turn the command-line ECHO on, each command will be displayed before it 
  6775.  is executed.  This will let you see the command line after expansion of all 
  6776.  aliases and variables.  The command- line ECHO is most useful when you are 
  6777.  learning how to use advanced features.  This example will turn command-line 
  6778.  echoing on: 
  6779.  
  6780.           [c:\] echo on
  6781.  
  6782.  ECHO defaults to OFF at the command line. 
  6783.  
  6784.  
  6785. ΓòÉΓòÉΓòÉ 14.26. ECHOS - Display a message without CR/LF ΓòÉΓòÉΓòÉ
  6786.  
  6787.  Purpose:    Display a message without a trailing carriage return and line 
  6788.              feed. 
  6789.  
  6790.  Format:     ECHOS message 
  6791.  
  6792.  See also:  ECHO, SCREEN, SCRPUT, TEXT, and VSCRPUT. 
  6793.  
  6794.  Usage 
  6795.  
  6796.  ECHOS is useful for text output when you don't want to add a carriage return / 
  6797.  linefeed pair at the end of the line.  For example, you can use ECHOS when you 
  6798.  need to redirect control sequences to your printer; this example sends the 
  6799.  sequence Esc P to the printer on LPT1: 
  6800.  
  6801.           [c:\] echos ^eP > lpt1:
  6802.  
  6803.  You cannot use the command separator character [&] or the redirection symbols 
  6804.  [| > <] in an ECHOS message, unless you enclose them in quotes (see Argument 
  6805.  Quoting) or precede them with the escape character. 
  6806.  
  6807.  ECHOS does not translate or modify the message text.  For example, carriage 
  6808.  return characters are not translated to CR/LF pairs. ECHOS sends only the 
  6809.  characters you enter (after escape character and back quote processing).  The 
  6810.  only character you cannot put into an ECHOS message is the NUL character 
  6811.  (ASCII 0). 
  6812.  
  6813.  
  6814. ΓòÉΓòÉΓòÉ 14.27. ENDLOCAL - Restore the saved environment ΓòÉΓòÉΓòÉ
  6815.  
  6816.  Purpose:    Restore the saved disk drive, directory, environment, and alias 
  6817.              list. 
  6818.  
  6819.  Format:     ENDLOCAL 
  6820.  
  6821.  See also:  SETLOCAL. 
  6822.  
  6823.  Usage 
  6824.  
  6825.  The SETLOCAL command in a batch file saves the current disk drive, default 
  6826.  directory, all environment variables, and the alias list. ENDLOCAL restores 
  6827.  everything that was saved by the previous SETLOCAL command. 
  6828.  
  6829.  SETLOCAL and ENDLOCAL can only be used in batch files, not in aliases or from 
  6830.  the command line. 
  6831.  
  6832.  
  6833. ΓòÉΓòÉΓòÉ 14.28. ESET - Edit environment variables and aliases ΓòÉΓòÉΓòÉ
  6834.  
  6835.  Purpose:    Edit environment variables and aliases. 
  6836.  
  6837.  Format:     ESET [/A] variable name... 
  6838.  
  6839.              variable name :  The name of an environment variable or alias to 
  6840.              edit. 
  6841.  
  6842.              /A(lias) 
  6843.  
  6844.  See also:  ALIAS, UNALIAS, SET, and UNSET. 
  6845.  
  6846.  Usage 
  6847.  
  6848.  ESET allows you to edit environment variables and aliases using line editing 
  6849.  commands (see Command-Line Editing). 
  6850.  
  6851.  For example, to edit the executable file search path: 
  6852.  
  6853.           [c:\] eset path
  6854.           path=c:\;c:\dos;c:\util
  6855.  
  6856.  To create and then edit an alias: 
  6857.  
  6858.           [c:\] alias d = dir /d/j/p
  6859.           [c:\] eset d
  6860.           d=dir /d/j/p
  6861.  
  6862.  ESET will search for environment variables first and then aliases. If you have 
  6863.  an environment variable and an alias with the same name, ESET will edit the 
  6864.  environment variable and ignore the alias unless you use the /A option. 
  6865.  
  6866.  Environment variable and alias names are normally limited to 80 characters, 
  6867.  and their contents to 1,023 characters.  However, if you use special 
  6868.  techniques to create a longer environment variable, ESET will edit it provided 
  6869.  the variable contains no more than 2,047 characters of text. 
  6870.  
  6871.  If you have enabled global aliases (see ALIAS), any changes made to an alias 
  6872.  with ESET will immediately affect all other copies of 4OS2 which are using the 
  6873.  same alias list. 
  6874.  
  6875.  Option 
  6876.  
  6877.     /A:     (Alias) Edit the named alias even if an environment variable of the 
  6878.             same name exists.  If you have an alias and an environment variable 
  6879.             with the same name, you must use this switch to be able to edit the 
  6880.             alias. 
  6881.  
  6882.  
  6883. ΓòÉΓòÉΓòÉ 14.29. EXCEPT - Exclude files from a command ΓòÉΓòÉΓòÉ
  6884.  
  6885.  Purpose:    Perform a command on all available files except those specified. 
  6886.  
  6887.  Format:     EXCEPT (file ) command 
  6888.  
  6889.              file :  The file or files to exclude from the command. 
  6890.              command :  The command to execute, including all appropriate 
  6891.              arguments and switches. 
  6892.  
  6893.  See also:  ATTRIB. 
  6894.  
  6895.  File Selection 
  6896.  
  6897.  Supports extended wildcards, ranges, multiple file names, and include lists. 
  6898.  Date, time, or size ranges must appear immediately after the EXCEPT keyword. 
  6899.  
  6900.  Usage 
  6901.  
  6902.  EXCEPT provides a means of executing a command on a group of files and/or 
  6903.  subdirectories, and excluding a subgroup from the operation. The command can 
  6904.  be an internal command or alias, an external command, or a batch file. 
  6905.  
  6906.  You may use wildcards to specify the files to exclude from the command.  The 
  6907.  first example erases all the files in the current directory except those 
  6908.  beginning with MEMO, and those whose extension is .WKS.  The second example 
  6909.  copies all the files and subdirectories on drive C to drive D except those in 
  6910.  C:\MSC and C:\DOS, using the COPY command: 
  6911.  
  6912.           [c:\] except (memo*.* *.wks) erase *.*
  6913.           [c:\] except (c:\msc c:\dos) copy c:\*.* d:\ /s
  6914.  
  6915.  Date, time, and size ranges can be used immediately after the word EXCEPT to 
  6916.  further qualify which files should be excluded from the command.  If the 
  6917.  command is an internal command that supports ranges, an independent range can 
  6918.  also be used in the command itself. 
  6919.  
  6920.  EXCEPT prevents operations on the specified file(s) by setting the hidden 
  6921.  attribute, performing the command, and then clearing the hidden attribute.  If 
  6922.  the command is aborted in an unusual way, you may need to use the ATTRIB 
  6923.  command to remove the hidden attribute from the file(s). 
  6924.  
  6925.  Caution:  EXCEPT will not work with programs or commands that ignore the 
  6926.  hidden attribute or which work explicitly with hidden files, including DEL /Z, 
  6927.  and the /H (process hidden files) switch available in some 4OS2 file 
  6928.  processing commands. 
  6929.  
  6930.  You can use command grouping to execute multiple commands with a single 
  6931.  EXCEPT.  For example, the following command copies all files in the current 
  6932.  directory whose extensions begin with .DA, except the .DAT files, to the 
  6933.  D:\SAVE directory, then changes the first two characters of the extension of 
  6934.  the copied files to .SA: 
  6935.  
  6936.           [c:\data] except (*.dat) (copy *.da* d:\save & ren *.da* *.sa*)
  6937.  
  6938.  If you use filename completion (see Filename Completion) to enter the 
  6939.  filenames inside the parentheses, type a space after the open parenthesis 
  6940.  before entering a partial filename or pressing Tab.  Otherwise, the 
  6941.  command-line editor will treat the open parenthesis as the first character of 
  6942.  the filename to be completed. 
  6943.  
  6944.  
  6945. ΓòÉΓòÉΓòÉ 14.30. EXIT - Exit 4OS2 ΓòÉΓòÉΓòÉ
  6946.  
  6947.  Purpose:    Return from 4OS2. 
  6948.  
  6949.  Format:     EXIT [value ] 
  6950.  
  6951.              value :  The exit code to return (0 - 255). 
  6952.  
  6953.  Usage 
  6954.  
  6955.  EXIT terminates the current copy of 4OS2.  Use it to return to an application 
  6956.  when you have "shelled out" to work at the prompt, or to end an OS/2 
  6957.  command-line session. 
  6958.  
  6959.  To close the session, or to return to the application that started 4OS2, type: 
  6960.  
  6961.           [c:\] exit
  6962.  
  6963.  If you specify a value, EXIT will return that value to the program that 
  6964.  started 4OS2.  For example: 
  6965.  
  6966.           [c:\] exit 255
  6967.  
  6968.  The value is a number you can use to inform the program of some result, such 
  6969.  as the success or failure of a batch file.  This feature is most useful for 
  6970.  systems which use batch files to automate their operation, such as bulletin 
  6971.  boards, or custom application programs like databases that shell to 4OS2 to 
  6972.  perform certain tasks. 
  6973.  
  6974.  
  6975. ΓòÉΓòÉΓòÉ 14.31. FFIND - Search for files ΓòÉΓòÉΓòÉ
  6976.  
  6977.  Purpose:    Search for files by name or contents. 
  6978.  
  6979.  Format:     FFIND [/A:[[-]rhsda] /B /C /D[list] /E /K /L /M 
  6980.              /O[[:][-]acdeginrsu] /P /S /T"xx" /V /X["xx xx ..."] file... 
  6981.  
  6982.              list :  A list of disk drive letters (without colons). 
  6983.              file :  The file, directory, or list of files or directories to 
  6984.              display. 
  6985.  
  6986.              /A(ttribute select)             /M (no footers) 
  6987.              /B(are)                         /O(rder) 
  6988.              /C(ase sensitive)               /P(ause) 
  6989.              /D(rive)                        /S(ubdirectories) 
  6990.              /E (upper case display)         /T(ext search string) 
  6991.              /K (no headers)                 /V(erbose) 
  6992.              /L(ine numbers)                 /X (hex display/search string) 
  6993.  
  6994.  File Selection 
  6995.  
  6996.  Supports extended wildcards, ranges, multiple file names, and include lists. 
  6997.  
  6998.  Usage 
  6999.  
  7000.  FFIND is a flexible search command that looks for files based on their names 
  7001.  and their contents. Depending on the options you choose, FFIND can display 
  7002.  filenames, matching text, or a combination of both in a variety of formats. 
  7003.  
  7004.  If you want to search for files by name, FFIND works much like the DIR 
  7005.  command.  For example, to generate a list of all the .BTM files in the current 
  7006.  directory, you could use the command: 
  7007.  
  7008.           [c:\] ffind *.btm
  7009.  
  7010.  The output from this command is a list of full pathnames, followed by the 
  7011.  number of files found. 
  7012.  
  7013.  If you want to limit the output to a list of *.BTM files which contain the 
  7014.  string color, you could use this command instead: 
  7015.  
  7016.           [c:\] ffind /t"color" *.btm
  7017.  
  7018.  The output from this version of FFIND is a list of files that contain the 
  7019.  string color along with the first line in each file that contains that string. 
  7020.  By default, FFIND uses a case-insensitve search, so the command above will 
  7021.  include files that contain COLOR, Color, color, or any other combination of 
  7022.  upper-case and lower-case letters. 
  7023.  
  7024.  You can use extended wildcards in the search string to increase the 
  7025.  flexibility of FFIND's search.  For example, the following command will find 
  7026.  .TXT files which contain either the string June or July.  It will also find 
  7027.  Juny and Jule.  The /C option makes the search case-sensitive: 
  7028.  
  7029.           [c:\] ffind /c/t"Ju[nl][ey]" *.txt
  7030.  
  7031.  At times, you may need to search for data that cannot be represented by ASCII 
  7032.  characters.  You can use FFIND's /X option to represent the search string in 
  7033.  hexadecimal format.  With /X, the search must be represented by pairs of 
  7034.  hexadecimal digits separated by spaces; a search of this type is always 
  7035.  case-sensitive (41 63 65 is the hex code for "Ace"): 
  7036.  
  7037.           [c:\] ffind /x"41 63 65" *.txt
  7038.  
  7039.  You can use FFIND's other options to further specify the files for which you 
  7040.  are searching and to modify the way in which the output is displayed. 
  7041.  
  7042.  Options 
  7043.  
  7044.     /A:     (Attribute select) Select only those files that have the specified 
  7045.             attribute(s) set.  Preceding the attribute character with a hyphen 
  7046.             [-] will select files that do not have that attribute set.  The 
  7047.             colon [:] after /A is required.  The attributes are: 
  7048.  
  7049.                            R  Read-only 
  7050.                            H  Hidden 
  7051.                            S  System 
  7052.                            D  Subdirectory 
  7053.                            A  Archive 
  7054.  
  7055.             If no attributes are listed at all (e.g., FFIND /A: ...), FFIND 
  7056.             will select all files and subdirectories including hidden and 
  7057.             system files.  If attributes are combined, all the specified 
  7058.             attributes must match for a file to be selected. For example, 
  7059.             /A:RHS will select only those files with all three attributes set. 
  7060.  
  7061.     /B:     (Bare) Display file names only and omit the text that matches the 
  7062.             search.  This option is only useful in combination with /T or /X, 
  7063.             which normally force FFIND to display file names and matching text. 
  7064.  
  7065.     /C:     (Case sensitive) Perform a case-sensitive search.  This option is 
  7066.             only valid with /T, which defaults to a case-insenitive search.  It 
  7067.             is not needed with a /X hexadecimal search, which is always 
  7068.             case-sensitive. 
  7069.  
  7070.     /D:     (Drive)  Search all files on one or more drives.  If you use /D 
  7071.             without a list of drives, FFIND will search the drives specified in 
  7072.             the list of files.  If no drive letters are listed, FFIND will 
  7073.             search the default drive.  You can include a list of drives or a 
  7074.             range of drives to search as part of the /D option.  For example, 
  7075.             to search drives C:, D:, E:, and G:, you can use either of these 
  7076.             commands: 
  7077.  
  7078.                                 [c:\] ffind /dcdeg ...
  7079.                                 [c:\] ffind /dc-eg ...
  7080.  
  7081.     /E:     Display filenames in the traditional upper case; also see SETDOS /U 
  7082.             and the UpperCase directive in 4OS2.INI. 
  7083.  
  7084.     /K:     (No headers) Suppress the display of the header or filename for 
  7085.             each matching text line. 
  7086.  
  7087.     /L:     (Line numbers) Include the line number for each text line 
  7088.             displayed. 
  7089.  
  7090.     /M:     (No footers) Suppress the footer (the number of files and number of 
  7091.             matches) at the end of FFIND's display. 
  7092.  
  7093.     /O:     (Order) Set the sorting order.  You may use any combination of the 
  7094.             following sorting options; if multiple options are used, the 
  7095.             listing will be sorted with the first sort option as the primary 
  7096.             key, the next as the secondary key, and so on: 
  7097.  
  7098.               -  Reverse the sort order for the next option 
  7099.  
  7100.               a  Sort in ASCII order, not numerically, when there are digits in 
  7101.             the name 
  7102.  
  7103.               d  Sort by date and time (oldest first); for HPFS drives also see 
  7104.             /T 
  7105.  
  7106.               e  Sort by extension 
  7107.  
  7108.               g  Group subdirectories first, then files 
  7109.  
  7110.               i  Sort by file description (ignored if /C or /O:c is used) 
  7111.  
  7112.               n  Sort by filename (this is the default) 
  7113.  
  7114.               r  Reverse the sort order for all options 
  7115.  
  7116.               s  Sort by size 
  7117.  
  7118.               u  Unsorted 
  7119.  
  7120.     /P:     (Pause) Wait for a key to be pressed after each screen page before 
  7121.             continuing the display.  Your options at the prompt are explained 
  7122.             in detail under Page and File Prompts. 
  7123.  
  7124.     /S:     (Subdirectories) Display matches from the current directory and all 
  7125.             of its subdirectories. 
  7126.  
  7127.     /T:     (Text search) Specify the text search string.  /T must be followed 
  7128.             by a text string in double quotes (e.g., /t"color").  FFIND will 
  7129.             perform a case-insensitive search unless you also use the /C 
  7130.             option.  For a hexadecimal search and/or hexadecimal display of the 
  7131.             location where the search string is found, see /X.   You can 
  7132.             specify a search string with either /T or /X, but not both. 
  7133.  
  7134.     /V:     (Verbose) Show every matching line.  FFIND's default behavior is to 
  7135.             show only the first matching line then and then go on to the next 
  7136.             file.  This option is only valid with /T or /X. 
  7137.  
  7138.     /X:     (Hexadecimal display / search) Specify hexadecimal display and an 
  7139.             optional hexadecimal search string. 
  7140.  
  7141.             If /X is followed by one or more pairs of hexadecimal digits in 
  7142.             quotes (e.g., /x"44 63 65"), FFIND will search for that exact 
  7143.             sequence of characters or data bytes without regard to the meaning 
  7144.             of those bytes as text.  If those bytes are found, the offset is 
  7145.             displayed (also in hexadecimal).  A search of this type will always 
  7146.             be case-sensitive. 
  7147.  
  7148.             If /X is not followed by a hexadecimal search string it must be 
  7149.             used in conjunction with /T, and will change the output format to 
  7150.             display hexadecimal offsets rather than actual text lines when the 
  7151.             search string is found.  For example, this command uses /T to 
  7152.             display the first line in each BTM file containing the word hello: 
  7153.  
  7154.                                 [c:\] ffind /t"hello" *.btm
  7155.                                 ---- c:\test.btm:
  7156.                                 echo hello
  7157.  
  7158.                                 1 line in 1 file
  7159.  
  7160.             If you use the same command with /X, the hexadecimal offset is 
  7161.             displayed instead of the text: 
  7162.  
  7163.                                 [c:\] ffind /t"hello" /x *.btm
  7164.                                 ---- c:\test.btm:
  7165.                                 Offset: 1A
  7166.  
  7167.                                 1 line in 1 file
  7168.  
  7169.             You can specify a search string with either /T or /X, but not both. 
  7170.  
  7171.  
  7172. ΓòÉΓòÉΓòÉ 14.32. FOR - Repeat a command ΓòÉΓòÉΓòÉ
  7173.  
  7174.  Purpose:    Repeat a command for several values of a variable. 
  7175.  
  7176.  Format:     FOR [/A:[[-]rhsda] /H] %var IN ([@]set ) [DO] command ... 
  7177.  
  7178.              %var :  The variable to be used in the command ("FOR variable"). 
  7179.              set :  A set of values for the variable. 
  7180.              command :  A command or group of commands to be executed for each 
  7181.              value of the variable. 
  7182.  
  7183.              /A(ttribute select)             /H(ide dots) 
  7184.  
  7185.  File Selection 
  7186.  
  7187.  Supports extended wildcards, ranges, multiple file names, and include lists. 
  7188.  Date, time, or size ranges must appear immediately after the FOR keyword. 
  7189.  
  7190.  Usage 
  7191.  
  7192.  FOR begins by creating a set.  It then executes a command for every member of 
  7193.  the set.  The command can be an internal command, an alias, an external 
  7194.  command, or a batch file. 
  7195.  
  7196.  Normally, the set is a list of files specified with wildcards.  For example, 
  7197.  if you use this line in a batch file: 
  7198.  
  7199.           for %x in (*.txt) do list %x
  7200.  
  7201.  then LIST will be executed once for each file in the current directory with 
  7202.  the extension .TXT.  The FOR variable %x is set equal to each of the file 
  7203.  names in turn, then the LIST command is executed for each file.  (You could do 
  7204.  the same thing more easily with a simple LIST *.TXT.  We used FOR here so you 
  7205.  could get a feel for how it operates, using a simple example.) 
  7206.  
  7207.  The set can include multiple files or an include list, like this: 
  7208.  
  7209.           for %x in (d:\*.txt;*.doc;*.asc) do type %x
  7210.  
  7211.  If the set includes filenames, the file list can be further refined by using 
  7212.  date, time, and size ranges.  The range must be placed immediately after the 
  7213.  word FOR.  The range will be ignored if no wildcards are used inside the 
  7214.  parentheses.  For example, this set is made up of all of the *.TXT files that 
  7215.  were created or updated on October 4, 1994: 
  7216.  
  7217.           for /[d10-4-94,+0] %x in (*.txt) do ...
  7218.  
  7219.  If the command is an internal command that supports ranges, an independent 
  7220.  range can also be used in the command itself. 
  7221.  
  7222.  The set can also be made up of text instead of file names.  For example, to 
  7223.  display the free space on drives C:, D:, and E:, you could use: 
  7224.  
  7225.           for %drive in (c d e) do free %drive:
  7226.  
  7227.  When the set is made up of text or several separate file names (not an include 
  7228.  list), the elements must be separated by spaces, tabs, commas, or the switch 
  7229.  character (normally a slash [/]). 
  7230.  
  7231.  You can also set the FOR variable equal to each line in a file by placing an 
  7232.  [@] in front of the file name.  If you have a file called DRIVES.TXT that 
  7233.  contains a list of drives on your computer, one drive name per line (with a 
  7234.  ":" after each drive letter), you can print the free space on each drive this 
  7235.  way: 
  7236.  
  7237.           for %d in (@drives.txt) do free %d > prn
  7238.  
  7239.  Because the [@] is also a valid filename character, FOR first checks to see if 
  7240.  the file exists with the [@] in its name (i.e., a file named @DRIVES.TXT ). 
  7241.  If so, the filename is treated as a normal argument.  If it doesn't exist, FOR 
  7242.  uses the filename (without the [@]) as the file from which to retrieve text. 
  7243.  
  7244.  You can use FOR to process the output of a command by using a Redirection and 
  7245.  Piping. To do so, use @CON as the file name.  For example, this command 
  7246.  creates a list of the names of all .MSG files in date/time order, then calls 
  7247.  the MSGPROC batch file for each file: 
  7248.  
  7249.           dir /b /od *.msg | for %fn in (@con) do call msgproc %fn
  7250.  
  7251.  You can use either % or %% in front of the variable name. Either form will 
  7252.  work, whether the FOR command is typed from the command line or is part of an 
  7253.  alias or batch file (some of the traditional command processors require a 
  7254.  single % if FOR is used at the command line, but use %% if it is used in a 
  7255.  batch file).  The variable name can be up to 80 characters long.  The word DO 
  7256.  is optional. 
  7257.  
  7258.  If you use a single-character FOR variable name, that name is given priority 
  7259.  over any environment variable which starts with the same letter, in order to 
  7260.  maintain compatibility with the traditional FOR command.  For example, the 
  7261.  following command tries to add a: and b: to the end of the PATH, but will not 
  7262.  work as intended: 
  7263.  
  7264.           [c:\] for %p in (a: b:) do path %path;%p
  7265.  
  7266.  The "%p" in "%path" will be interpreted as the FOR variable %p followed by the 
  7267.  text "ath", which is not what was intended.  To get around this, use a 
  7268.  different letter or a longer name for the FOR variable, or use square brackets 
  7269.  around the variable name (see Environment). 
  7270.  
  7271.  The following example uses FOR with variable functions to delete the .BAK 
  7272.  files for which a corresponding .TXT file exists in the current directory: 
  7273.  
  7274.           [c:\docs] for %file in (*.txt) do del %@name[%file].bak
  7275.  
  7276.  You can use command grouping to execute multiple commands for each element in 
  7277.  the list.  For example, the following command copies each .WKQ file in the 
  7278.  current directory to the D:\WKSAVE directory, then changes the extension of 
  7279.  each file in the current directory to .SAV.  This should be entered on one 
  7280.  line: 
  7281.  
  7282.           [c:\text] for %file in (*.wkq) do (copy %file d:\wksave\ &
  7283.                     ren %file *.sav)
  7284.  
  7285.  In a batch file you can use GOSUB to execute a subroutine for every element in 
  7286.  the set.  Within the subroutine, the FOR variable can be used just like any 
  7287.  environment variable.  This is a convenient way to execute a complex sequence 
  7288.  of commands for every element in the set without CALLing another batch file. 
  7289.  
  7290.  One unusual use of FOR is to execute a collection of batch files or other 
  7291.  commands with the same parameter.  For example, you might want to have three 
  7292.  batch files all operate on the same data file. The FOR command could look like 
  7293.  this: 
  7294.  
  7295.           [c:\] for %cmd in (filetest fileform fileprnt) do %cmd datafile
  7296.  
  7297.  This line will expand to three separate commands: 
  7298.  
  7299.           filetest datafile
  7300.           fileform datafile
  7301.           fileprnt datafile
  7302.  
  7303.  The variable that FOR uses (the %CMD in the example above) is created in the 
  7304.  environment and then erased when the FOR command is done.  However, for 
  7305.  compatibility with CMD.EXE, single-character FOR variables do not overwrite 
  7306.  existing environment variables with the same name.  As a result, when using a 
  7307.  multi-character variable name you must be careful not to use the name of one 
  7308.  of your environment variables as a FOR variable.  For example, a command that 
  7309.  begins 
  7310.  
  7311.           [c:\] for %path in ...
  7312.  
  7313.  will write over your current path setting and then erase the path variable 
  7314.  completely. 
  7315.  
  7316.  FOR statements can be nested. 
  7317.  
  7318.  Options 
  7319.  
  7320.     /A:     (Attribute select) Select only those files that have the specified 
  7321.             attribute(s) set.  /A will be used only when processing wildcard 
  7322.             file names in the set.  It will be ignored for filenames without 
  7323.             wildcards or other items in the set.  Preceding the attribute 
  7324.             character with a hyphen [-] will select files that do not have that 
  7325.             attribute set.  The colon [:] after /A is required.  The attributes 
  7326.             are: 
  7327.  
  7328.               R  Read-only 
  7329.               H  Hidden 
  7330.               S  System 
  7331.               D  Subdirectory 
  7332.               A  Archive 
  7333.  
  7334.             If no attributes are listed (e.g., FOR /A: ...), FOR will process 
  7335.             all files including hidden and system files.  If attributes are 
  7336.             combined, all the specified attributes must match for a file to be 
  7337.             included.  For example, /A:RHS will include only those files with 
  7338.             all three attributes set. 
  7339.  
  7340.             For example, to process only those files with the archive attribute 
  7341.             set: 
  7342.  
  7343.                                 for /a:a %f in (*.*) echo %f needs a backup!
  7344.  
  7345.     /H:     (Hide dots) Suppress the assignment of the "." and ".." directories 
  7346.             to "var". 
  7347.  
  7348.  
  7349. ΓòÉΓòÉΓòÉ 14.33. FREE - Display total and free disk space ΓòÉΓòÉΓòÉ
  7350.  
  7351.  Purpose:    Display the total disk space, total bytes used, and total bytes 
  7352.              free on the specified (or default) drive(s). 
  7353.  
  7354.  Format:     FREE [drive: ... ] 
  7355.  
  7356.              drive :  One or more drives to include in the report. 
  7357.  
  7358.  See also:  MEMORY. 
  7359.  
  7360.  Usage 
  7361.  
  7362.  FREE provides the same disk information as the external command CHKDSK, but 
  7363.  without the wait, since it does not check the integrity of the file and 
  7364.  directory structure of the disk. 
  7365.  
  7366.  A colon [:] is required after each drive letter.  This example displays the 
  7367.  status of drives A and C: 
  7368.  
  7369.           [c:\] free a: c:
  7370.  
  7371.  
  7372. ΓòÉΓòÉΓòÉ 14.34. GLOBAL - Execute a command all subdirectories ΓòÉΓòÉΓòÉ
  7373.  
  7374.  Purpose:    Execute a command in the current directory and its subdirectories. 
  7375.  
  7376.  Format:     GLOBAL [/H /I /P /Q] command 
  7377.  
  7378.              command :  The command to execute, including arguments and 
  7379.              switches. 
  7380.  
  7381.              /H(idden directories)           /P(rompt) 
  7382.              /I(gnore exit codes)            /Q(uiet) 
  7383.  
  7384.  Usage 
  7385.  
  7386.  GLOBAL performs the command first in the current directory and then in every 
  7387.  subdirectory under the current directory.  The command can be an internal 
  7388.  command, an alias, an external command, or a batch file. 
  7389.  
  7390.  This example copies the files in every directory on drive A to the directory 
  7391.  C:\TEMP : 
  7392.  
  7393.           [a:\] global copy *.* c:\temp
  7394.  
  7395.  If you use the /P option, GLOBAL will prompt for each subdirectory before 
  7396.  performing the command.  You can use this option if you want to perform the 
  7397.  command in most, but not all subdirectories of the current directory. 
  7398.  
  7399.  You can use command grouping to execute multiple commands in each 
  7400.  subdirectory.  For example, the following command copies each .TXT file in the 
  7401.  current directory and all of its subdirectories to drive A.  It then changes 
  7402.  the extension of each of the copied files to .SAV : 
  7403.  
  7404.           [c:\] global (copy *.txt a: & ren *.txt *.sav)
  7405.  
  7406.  Options 
  7407.  
  7408.     /H:     (Hidden directories) Forces GLOBAL to look for hidden directories. 
  7409.             If you don't use this switch, hidden directories are ignored. 
  7410.  
  7411.     /I:     (Ignore exit codes) If this option is not specified, GLOBAL will 
  7412.             terminate if the command returns a non- zero exit code.  Use /I if 
  7413.             you want command to continue in additional subdirectories even if 
  7414.             it returns an error in a previous subdirectory.  Even if you use 
  7415.             /I, GLOBAL will halt execution in response to Ctrl-C or Ctrl-Break. 
  7416.  
  7417.     /P:     (Prompt) Forces GLOBAL to prompt with each directory name before it 
  7418.             performs the command.  Your options at the prompt are explained in 
  7419.             detail under Page and File Prompts. 
  7420.  
  7421.     /Q:     (Quiet) Do not display the directory names as each directory is 
  7422.             processed. 
  7423.  
  7424.  
  7425. ΓòÉΓòÉΓòÉ 14.35. GOSUB - Execute a subroutine in a batch file ΓòÉΓòÉΓòÉ
  7426.  
  7427.  Purpose:    Execute a subroutine in the current batch file. 
  7428.  
  7429.  Format:     GOSUB label 
  7430.  
  7431.              label :  The batch file label at the beginning of the subroutine. 
  7432.  
  7433.  See also:  CALL, GOTO and RETURN. 
  7434.  
  7435.  Usage 
  7436.  
  7437.  GOSUB can only be used in batch files. 
  7438.  
  7439.  4OS2 allows subroutines in batch files.  A subroutine must start with a label 
  7440.  (a colon [:] followed by a one-word label name) which appears on a line by 
  7441.  itself.  Case differences are ignored when matching labels.  The subroutine 
  7442.  must end with a RETURN statement. 
  7443.  
  7444.  The subroutine is invoked with a GOSUB command from another part of the batch 
  7445.  file.  After the RETURN, processing will continue with the command following 
  7446.  the GOSUB command.  For example, the following batch file fragment calls a 
  7447.  subroutine which displays the directory and returns: 
  7448.  
  7449.           echo Calling a subroutine
  7450.           gosub subr1
  7451.           echo Returned from the subroutine
  7452.           quit
  7453.           :subr1
  7454.           dir /a/w
  7455.           return
  7456.  
  7457.  If the label doesn't exist, the batch file is terminated with the error 
  7458.  message "Label not found." 
  7459.  
  7460.  GOSUB saves the IFF state, so IFF statements inside a subroutine won't 
  7461.  interfere with IFF statements in the part of the batch file from which the 
  7462.  subroutine was called. 
  7463.  
  7464.  Subroutines can be nested. 
  7465.  
  7466.  
  7467. ΓòÉΓòÉΓòÉ 14.36. GOTO - Branch within a batch file ΓòÉΓòÉΓòÉ
  7468.  
  7469.  Purpose:    Branch to a specified line inside the current batch file. 
  7470.  
  7471.  Format:     GOTO [/I] label 
  7472.  
  7473.              label :  The batch file label to branch to. 
  7474.  
  7475.              /I(FF and DO continue) 
  7476.  
  7477.  See also:  GOSUB. 
  7478.  
  7479.  Usage 
  7480.  
  7481.  GOTO can only be used in batch files. 
  7482.  
  7483.  After a GOTO command in a batch file, the next line to be executed will be the 
  7484.  one immediately after the label.  The label must begin with a colon [:] and 
  7485.  appear on a line by itself. The colon is required on the line where the label 
  7486.  is defined, but is not required in the GOTO command itself.  Case differences 
  7487.  are ignored when matching labels. 
  7488.  
  7489.  This batch file fragment checks for the existence of the file CONFIG.SYS.  If 
  7490.  the file exists, the batch file jumps to C_EXISTS and copies all the files 
  7491.  from the current directory to the root directory on A:.  Otherwise, it prints 
  7492.  an error message and exits. 
  7493.  
  7494.           if exist config.sys goto C_EXISTS
  7495.           echo CONFIG.SYS doesn't exist - exiting.
  7496.           quit
  7497.           :C_EXISTS
  7498.           copy *.* a:\
  7499.  
  7500.  If the label doesn't exist, the batch file is terminated with the error 
  7501.  message "Label not found." 
  7502.  
  7503.  To avoid errors in the processing of nested statements and loops, GOTO cancels 
  7504.  all active IFF statements and DO / ENDDO loops unless you use /I.  This means 
  7505.  that a normal GOTO (without /I) may not branch to any label that is between an 
  7506.  IFF and the corresponding ENDIFF or between a DO and the corresponding ENDDO. 
  7507.  
  7508.  Options 
  7509.  
  7510.     /I:     (IFF and DO continue) Prevents GOTO from canceling IFF statements 
  7511.             and DO loops.  Use this option only if you are absolutely certain 
  7512.             that your GOTO command is branching entirely within any current IFF 
  7513.             statement and any active DO / ENDDO block.  Using /I under any 
  7514.             other conditions will cause an error later in your batch file. 
  7515.  
  7516.             You cannot branch into another IFF statement, another DO loop, or a 
  7517.             different IFF or DO nesting level, whether you use the /I option or 
  7518.             not.  If you do, you will eventually receive an "unknown command" 
  7519.             error (or execution of the UNKNOWN_CMD alias) on a subsequent 
  7520.             ENDDO, ELSE, ELSEIFF, or ENDIFF statement. 
  7521.  
  7522.  
  7523. ΓòÉΓòÉΓòÉ 14.37. HELP - Display help ΓòÉΓòÉΓòÉ
  7524.  
  7525.  Purpose:    Display help for internal commands, and optionally for external 
  7526.              commands. 
  7527.  
  7528.  Format:     HELP [topic ] 
  7529.  
  7530.              topic :  A help topic, internal command, or external command. 
  7531.  
  7532.  Usage 
  7533.  
  7534.  Online help is available for 4OS2.  The 4OS2 help system uses the OS/2 help 
  7535.  facility. 
  7536.  
  7537.  If you type the command HELP by itself (or press F1 when the command line is 
  7538.  empty), the table of contents is displayed.  If you type HELP plus a topic 
  7539.  name, that topic is displayed.  For example, 
  7540.  
  7541.           help copy
  7542.  
  7543.  displays information about the COPY command and its options. 
  7544.  
  7545.  
  7546. ΓòÉΓòÉΓòÉ 14.38. HISTORY - Manage the history list ΓòÉΓòÉΓòÉ
  7547.  
  7548.  Purpose:    Display, add to, clear, or read the history list. 
  7549.  
  7550.  Format:     HISTORY [/A command /F /P /R filename ] 
  7551.  
  7552.              /A(dd)                          /P(ause) 
  7553.              /F(ree)                         /R(ead) 
  7554.  
  7555.  See also:  LOG. 
  7556.  
  7557.  Usage 
  7558.  
  7559.  4OS2 keeps a list of the commands you have entered on the command line.  See 
  7560.  Command History and Recall for additional details. 
  7561.  
  7562.  The HISTORY command lets you view and manipulate the command history list 
  7563.  directly.  If no parameters are entered, HISTORY will display the current 
  7564.  command history list: 
  7565.  
  7566.           [c:\] history
  7567.  
  7568.  With the options explained below, you can clear the list, add new commands to 
  7569.  the list without executing them, save the list in a file, or read a new list 
  7570.  from a file. 
  7571.  
  7572.  The number of commands saved in the history list depends on the length of each 
  7573.  command line.  The history list size can be specified at startup from 256 to 
  7574.  8192 characters (see the History directive).  The default size is 1024 
  7575.  characters. 
  7576.  
  7577.  Your history list can be stored either locally (a separate history list for 
  7578.  each copy of 4OS2) or globally (all copies of 4OS2 share the same list).  For 
  7579.  full details see the discussion of local and global history lists under 
  7580.  Command History and Recall. 
  7581.  
  7582.  You can use the HISTORY command as an aid in writing batch files by 
  7583.  redirecting the HISTORY output to a file and then editing the file 
  7584.  appropriately.  However, it is easier to use the LOG /H command for this 
  7585.  purpose. 
  7586.  
  7587.  You can disable the history list or specify a minimum command-line length to 
  7588.  save with the HistMin directive in the .INI file. 
  7589.  
  7590.  Options 
  7591.  
  7592.     /A:     (Add) Add a command to the history list.  This performs the same 
  7593.             function as the Ctrl-K key at the command line (see Command History 
  7594.             and Recall). 
  7595.  
  7596.     /F:     (Free) Erase all entries in the command history list. 
  7597.  
  7598.     /P:     (Prompt) Wait for a key after displaying each page of the list. 
  7599.             Your options at the prompt are explained in detail under Page and 
  7600.             File Prompts. 
  7601.  
  7602.     /R:     (Read) Read the command history from the specified file and append 
  7603.             it to the history list currently held in memory.  Each line in the 
  7604.             file must fit within the command-line length limit). 
  7605.  
  7606.             You can save the history list by redirecting the output of HISTORY 
  7607.             to a file.  This example saves the command history to a file called 
  7608.             HISTFILE and reads it back again immediately.  If you leave out the 
  7609.             HISTORY /F command on the second line, the contents of the file 
  7610.             will be appended to the current history list instead of replacing 
  7611.             it: 
  7612.  
  7613.                                 [c:\] history > histfile
  7614.                                 [c:\] history /f
  7615.                                 [c:\] history /r histfile
  7616.  
  7617.             If you need to save your history at the end of each day's work, you 
  7618.             might use commands like this in your AUTOEXEC.BAT or other startup 
  7619.             file: 
  7620.  
  7621.                                 if exist c:\histfile history /r c:\histfile
  7622.                                 alias shut*down `history > c:\histfile`
  7623.  
  7624.             This restores the previous history list if it exists, then defines 
  7625.             an alias which will save the history before shutting off the 
  7626.             system. 
  7627.  
  7628.             If you are creating a HISTORY /R file by hand, and need to create 
  7629.             an entry that spans multiple lines in the file, you can do so by 
  7630.             terminating each line, except the last, with an escape character. 
  7631.             However, you cannot use this method to exceed the command-line 
  7632.             length limit. 
  7633.  
  7634.  
  7635. ΓòÉΓòÉΓòÉ 14.39. IF - Execute a command if a condition is true ΓòÉΓòÉΓòÉ
  7636.  
  7637.  Purpose:    Execute a command if a condition or set of conditions is true. 
  7638.  
  7639.  Format:     IF [NOT] condition [.AND. | .OR. | .XOR. [NOT] condition ...] 
  7640.              command 
  7641.  
  7642.              condition :  A test to determine if the command should be 
  7643.              executed. 
  7644.              command :  The command to execute if the condition is true. 
  7645.  
  7646.  See also:  IFF, @IF. 
  7647.  
  7648.  Usage 
  7649.  
  7650.  IF is normally used only in aliases and batch files.  It is always followed by 
  7651.  one or more conditions and then a command. First, the conditions are 
  7652.  evaluated.  If they are true, the command is executed.  Otherwise, the command 
  7653.  is ignored. If you add a NOT before a condition, the command is executed only 
  7654.  when the condition is false. 
  7655.  
  7656.  You can link conditions with .AND., .OR., or .XOR., and you can nest IF 
  7657.  statements.  The conditions can test strings, numbers, the existence of a file 
  7658.  or subdirectory, the exit code returned by the preceding external command, and 
  7659.  the existence of alias names and internal commands. 
  7660.  
  7661.  The command can be an alias, an internal command, an external command, or a 
  7662.  batch file.  The entire IF statement, including all conditions and the 
  7663.  command, must fit on one line. 
  7664.  
  7665.  You can use command grouping to execute multiple commands if the condition is 
  7666.  true.  For example, the following command tests if any .TXT files exist.  If 
  7667.  they do, they are copied to drive A: and their extensions are changed to .TXO 
  7668.  : 
  7669.  
  7670.           if exist *.txt (copy *.txt a: & ren *.txt *.txo)
  7671.  
  7672.  (Note that the IFF command provides a more structured method of executing 
  7673.  multiple commands if a condition or set of conditions is true.) 
  7674.  
  7675.  Conditions 
  7676.  
  7677.  The following conditional tests are available in both the IF and IFF commands. 
  7678.  They fit into two categories:  string and numeric tests, and status tests. 
  7679.  The tests can use environment variables, internal variables and variable 
  7680.  functions, file names, literal text, and numeric values as their arguments. 
  7681.  
  7682.  Spaces are required on either side of the test condition in all cases, except 
  7683.  == which will work with or without spaces around it. 
  7684.  
  7685.  String and Numeric Tests 
  7686.  
  7687.  Six test conditions can be used to test character strings.  The same 
  7688.  conditions are available for both numeric and normal text strings (see below 
  7689.  for details).  In each case you enter the test as: 
  7690.  
  7691.           string1 operator string2
  7692.  
  7693.  The operator defines the type of test (equal, greater than or equal, and so 
  7694.  on).  The operators are: 
  7695.  
  7696.         EQ or ==    string1 equal to string2 
  7697.         NE or !=    string1 not equal to string2 
  7698.         LT          string1 less than string2 
  7699.         LE          string1 less than or equal to string2 
  7700.         GE          string1 greater than or equal to string2 
  7701.         GT          string1 greater than string2 
  7702.  
  7703.  Status Tests 
  7704.  
  7705.  These conditions test the system or command processor status.  You can use 
  7706.  internal variables and variable functions to test many other parts of the 
  7707.  system status. 
  7708.  
  7709.     ERRORLEVEL [operator] n
  7710.         This test retrieves the exit code of the preceding external program. 
  7711.         By convention, programs return an exit code of 0 when they are 
  7712.         successful and a number between 1 and 255 to indicate an error.  The 
  7713.         condition can be any of the operators listed above (EQ, !=, GT, etc.). 
  7714.         If no operator is specified, the default is GE.  The comparison is done 
  7715.         numerically. 
  7716.  
  7717.         Not all programs return an explicit exit code.  For programs which do 
  7718.         not, the behavior of ERRORLEVEL is undefined. 
  7719.  
  7720.     EXIST filename
  7721.         If the file exists, the condition is true.  You can use wildcards in 
  7722.         the filename, in which case the condition is true if any file matching 
  7723.         the wildcard name exists. 
  7724.  
  7725.     ISALIAS aliasname
  7726.         If the name is defined as an alias, the condition is true. 
  7727.  
  7728.     ISDIR path
  7729.         If the subdirectory exists, the condition is true. 
  7730.  
  7731.     ISINTERNAL command
  7732.         If the specified command is an active internal command, the condition 
  7733.         is true.  Commands can be activated and deactivated with the SETDOS /I 
  7734.         command. 
  7735.  
  7736.  Combining Tests 
  7737.  
  7738.  You can negate the result of any test with NOT, and combine tests of any type 
  7739.  with .AND., .OR., and .XOR.  Test conditions are always scanned from left to 
  7740.  right -- there is no implied order of precedence, as there is in some 
  7741.  programming languages. 
  7742.  
  7743.  When two tests are combined with .AND., the result is true if both individual 
  7744.  tests are true.  When two tests are combined with .OR., the result is true if 
  7745.  either (or both) individual tests are true.  When two tests are combined with 
  7746.  .XOR., the result is true only if one of the tests is true and the other is 
  7747.  false. 
  7748.  
  7749.  This example runs a program called HIGHRES if either an EGA or VGA video 
  7750.  adapter is in use: 
  7751.  
  7752.           if "%_video" == "EGA" .or. "%_video" == "VGA" highres
  7753.  
  7754.  Using the IF Tests 
  7755.  
  7756.  When IF compares two character strings, it will use either a numeric 
  7757.  comparison or a string comparison.  A numeric comparison treats the strings as 
  7758.  numeric values and tests them arithmetically.  A string comparison treats the 
  7759.  strings as text. 
  7760.  
  7761.  The difference between numeric and string comparisons is best explained by 
  7762.  looking at the way two values are tested.  For example, consider comparing the 
  7763.  values 2 and 19.  Numerically, 2 is smaller, but as a string it is "larger" 
  7764.  because its first digit is larger than the first digit of 19.  So the first of 
  7765.  these condition s will be true, and the second will be false: 
  7766.  
  7767.           if 2 lt 19 ...
  7768.           if "2" lt "19" ...
  7769.  
  7770.  IF determines which kind of test to do by examining the first character of 
  7771.  each string.  If both strings begin with a numeric character (a digit, sign, 
  7772.  or decimal point), a numeric comparison is used.  If either value does not 
  7773.  begin with a numeric character, a string comparison is used.  To force a 
  7774.  string comparison when both values are or may be numeric, use double quotes 
  7775.  around the values you are testing, as shown above.  Because the double quote 
  7776.  is not a numeric character, it forces IF to do a string comparison. 
  7777.  
  7778.  Case differences are ignored in string comparisons.  If two strings begin with 
  7779.  the same text but one is shorter, the shorter string is considered to be "less 
  7780.  than" the longer one.  For example, "a" is less than "abc", and "hello_there" 
  7781.  is greater than "hello". 
  7782.  
  7783.  When you compare text strings, you should always enclose the arguments in 
  7784.  double quotes in order to avoid syntax errors which may occur if one of the 
  7785.  argument values is empty. 
  7786.  
  7787.  Numeric comparisons work with both integer and decimal values.  The values to 
  7788.  be compared must contain only numeric digits, decimal points, and an optional 
  7789.  sign (+ or -).  The number to the left of the decimal point may not exceed 
  7790.  2,147,483,648 (the maximum possible 32-bit positive integer).  The number of 
  7791.  digits to the right of the decimal point is limited only by the length of the 
  7792.  command line. 
  7793.  
  7794.  Internal variables and variable functions are very powerful when combined with 
  7795.  string and numeric comparisons.  They allow you to test the state of your 
  7796.  system, the characteristics of a file, date and time information, or the 
  7797.  result of a calculation.  You may want to review the variables and variable 
  7798.  functions when determining the best way to set up an IF test. 
  7799.  
  7800.  This first example is a batch file fragment which runs a program called 
  7801.  MONOPROG if a monochrome monitor is attached to the system: 
  7802.  
  7803.           if "%_monitor" == "mono" monoprog
  7804.  
  7805.  The second batch file fragment tests for a string value: 
  7806.  
  7807.           input "Enter your selection : " %%cmd
  7808.           if "%cmd" == "WP" goto wordproc
  7809.           if "%cmd" NE "GRAPHICS" goto badentry
  7810.  
  7811.  This example calls GO.BTM if the first two characters in the file MYFILE are 
  7812.  "GO" (enter this example on one line): 
  7813.  
  7814.           if "%@instr[0,2,%@line[myfile,0]]"=="GO"
  7815.           call go.btm
  7816.  
  7817.  This batch file fragment tests for the existence of A:\JAN.DOC before copying 
  7818.  it to drive C. 
  7819.  
  7820.           if exist a:\jan.doc copy a:\jan.doc c:\
  7821.  
  7822.  This example tests the exit code of the previous program and stops all batch 
  7823.  file processing if an error occurred: 
  7824.  
  7825.           if errorlevel==0 goto success
  7826.           echo "External Error -- Batch File Ends!"
  7827.           cancel
  7828.  
  7829.  
  7830. ΓòÉΓòÉΓòÉ 14.40. IFF - IF / THEN / ELSE conditional command execution ΓòÉΓòÉΓòÉ
  7831.  
  7832.  Purpose:    Perform IF / THEN / ELSE conditional execution of commands. 
  7833.  
  7834.  Format:     IFF [NOT] condition [.AND. | .OR. | .XOR. [NOT] condition ...] 
  7835.              THEN & commands 
  7836.              [ELSEIFF condition  THEN & commands ] ... 
  7837.              [ELSE & commands ] 
  7838.              & ENDIFF 
  7839.  
  7840.              condition :  A test to determine if the command(s) should be 
  7841.              executed. 
  7842.              commands :  One or more commands to execute if the condition(s) is 
  7843.              true.  If you use multiple commands, they must be separated by 
  7844.              command separators or be placed on separate lines of a batch file. 
  7845.  
  7846.  See also:  IF. 
  7847.  
  7848.  Usage 
  7849.  
  7850.  IFF is similar to the IF command, except that it can perform one set of 
  7851.  commands when a condition or set of conditions is true and different commands 
  7852.  when the conditions are false. 
  7853.  
  7854.  IFF can execute multiple commands when the conditions are true or false; IF 
  7855.  normally executes only one command.  IFF imposes no limit on the number of 
  7856.  commands and is generally a "cleaner" and more structured command than IF. 
  7857.  
  7858.  IFF is always followed by one or more conditions.  If they are true, the 
  7859.  commands that follow the word THEN are executed. Additional conditions can be 
  7860.  tested with ELSEIFF.  If none of these conditions are true, the commands that 
  7861.  follow the word ELSE are executed.  In both cases, after the selected commands 
  7862.  are executed, processing continues after the word ENDIFF. 
  7863.  
  7864.  If you add a NOT before the condition, the THEN commands are executed only 
  7865.  when the condition is false and the ELSE commands are executed only when the 
  7866.  condition is true. 
  7867.  
  7868.  The commands may be separated by command separators, or may be on separate 
  7869.  lines of a batch file.  You should include a command separator or a line break 
  7870.  after a THEN, before an ELSEIFF, and before and after an ELSE. 
  7871.  
  7872.  You can link conditions with .AND., .OR., or .XOR., and you can nest IFF 
  7873.  statements up to 15 levels deep.  The conditions can test strings or numbers, 
  7874.  the existence of a file or subdirectory, the errorlevel returned from the 
  7875.  preceding external command, and the existence of alias names and internal 
  7876.  commands. 
  7877.  
  7878.  See the IF command for a list of the possible conditions. 
  7879.  
  7880.  The commands can include any internal command, alias, external command, or 
  7881.  batch file. 
  7882.  
  7883.  The following batch file fragment tests the monitor type (monochrome or 
  7884.  color), and sets the appropriate colors and prompt (enter the "prompt" lines 
  7885.  on one line of the batch file): 
  7886.  
  7887.           iff "%_monitor" == "color" then
  7888.              color bright white on blue & cls
  7889.              prompt=$e[s$e[1;1f$e[41;1;37m$e[K  Path: $p$e[u$e[44;37m$n$g
  7890.           else
  7891.              prompt=$e[s$e[1;1f$e[0;7m$e[K  Path: $p$e[u$e[0m$n$g
  7892.           endiff
  7893.  
  7894.  The alias in this second example checks to see if the argument is a 
  7895.  subdirectory.  If so, the alias deletes the subdirectory's files and removes 
  7896.  it (enter this on one line): 
  7897.  
  7898.           [c:\] alias prune `iff isdir %1 then & del /sxz %1
  7899.                 & else & echo Not a directory! & endiff`
  7900.  
  7901.  Be sure to read the cautionary notes about GOTO and IFF under the GOTO command 
  7902.  before using a GOTO inside an IFF statement. 
  7903.  
  7904.  
  7905. ΓòÉΓòÉΓòÉ 14.41. INKEY - Get a character from the keyboard ΓòÉΓòÉΓòÉ
  7906.  
  7907.  Purpose:    Get a single keystroke from the user and store it in an 
  7908.              environment variable. 
  7909.  
  7910.  Format:     INKEY [/C /D /K"keys" /P /Wn /X] [prompt ] %%varname 
  7911.  
  7912.              prompt :  Optional text that is displayed as a prompt. 
  7913.              varname :  The variable that will hold the user's keystroke. 
  7914.  
  7915.              /C(lear buffer)                 /P(assword) 
  7916.              /D(igits only)                  /W(ait) 
  7917.              /K(valid keystrokes)            /X (no carriage return) 
  7918.  
  7919.  See also:  INPUT. 
  7920.  
  7921.  Usage 
  7922.  
  7923.  INKEY optionally displays a prompt.  Then it waits for a specified time or 
  7924.  indefinitely for a keystroke, and places the keystroke into an environment 
  7925.  variable.  It is normally used in batch files and aliases to get a menu choice 
  7926.  or other single-key input.  Along with the INPUT command, INKEY allows great 
  7927.  flexibility in reading input from within a batch file or alias. 
  7928.  
  7929.  If prompt text is included in an INKEY command, it is displayed while INKEY 
  7930.  waits for input. 
  7931.  
  7932.  The following batch file fragment prompts for a character and stores it in the 
  7933.  variable NUM : 
  7934.  
  7935.           inkey Enter a number from 1 to 9:  %%num
  7936.  
  7937.  INKEY reads standard input for the keystroke, so it will accept keystrokes 
  7938.  from a redirected file.  You can supply a list of valid keystrokes with the /K 
  7939.  option. 
  7940.  
  7941.  Standard keystrokes with ASCII values between 1 and 255 are stored directly in 
  7942.  the environment variable.  Extended keystrokes (for example, function keys and 
  7943.  cursor keys) are stored as a string in decimal format, with a leading @ (for 
  7944.  example, the F1 key is @59).  The Enter key is stored as an extended 
  7945.  keystroke, with the code @28.  See see the Reference Tables for a list of the 
  7946.  ASCII and extended key codes. 
  7947.  
  7948.  If you press Ctrl-C or Ctrl-Break while INKEY is waiting for a key, execution 
  7949.  of an alias will be terminated, and execution of a batch file will be 
  7950.  suspended while you are asked whether to cancel the batch jobIn a batch file 
  7951.  you can handle Ctrl-C and Ctrl-Break yourself with the ON BREAK command. 
  7952.  
  7953.  Options 
  7954.  
  7955.     /C:     (Clear buffer) Clears the keyboard buffer before INKEY accepts 
  7956.             keystrokes.  If you use this option, INKEY will ignore any 
  7957.             keystrokes which you type, either accidentally or intentionally, 
  7958.             before INKEY is ready to accept input. 
  7959.  
  7960.     /D:     (Digits only) Prevents INKEY from accepting any keystroke except a 
  7961.             digit from 0 to 9. 
  7962.  
  7963.     /K["keys"]:Specify the permissible keystrokes.  The list of valid 
  7964.             keystrokes should be enclosed in double quotes.  For alphabetic 
  7965.             keys the validity test is not case sensitive.  You can specify 
  7966.             extended keys by enclosing their names in square brackets (within 
  7967.             the quotes), for example: 
  7968.  
  7969.                                 inkey /k"ab[Alt-F10]" Enter A, B, Alt-F10 %%var
  7970.  
  7971.             See Keys and Key Names for a complete listing of the key names you 
  7972.             can use within the square brackets, and a description of the key 
  7973.             name format. 
  7974.  
  7975.             If an invalid keystroke is entered, 4OS2 will echo the keystroke if 
  7976.             possible, beep, move the cursor back one character, and wait for 
  7977.             another keystroke. 
  7978.  
  7979.     /P:     (Password) Prevents INKEY from echoing the character. 
  7980.  
  7981.     /W:     (Wait) Timeout period, in seconds, to wait for a response. If no 
  7982.             keystroke is entered by the end of the timeout period, INKEY 
  7983.             returns with the variable unchanged. You can specify /W0 to return 
  7984.             immediately if there are no keys waiting in the keyboard buffer. 
  7985.  
  7986.     /X:     (No carriage return) Prevents INKEY from displaying a carriage 
  7987.             return and line feed after the user's entry. 
  7988.  
  7989.             For example, the following batch file fragment waits up to 10 
  7990.             seconds for a character, then tests to see if a "Y" was entered: 
  7991.  
  7992.                                 set net=N
  7993.                                 inkey /K"YN" /w10 Load network (Y/N)?  %%net
  7994.                                 iff "%net" == "Y" then
  7995.                                 rem Commands to load the network go here
  7996.                                 endiff
  7997.  
  7998.  
  7999. ΓòÉΓòÉΓòÉ 14.42. INPUT - Get a string from the keyboard ΓòÉΓòÉΓòÉ
  8000.  
  8001.  Purpose:    Get a string from the keyboard and save it in an environment 
  8002.              variable. 
  8003.  
  8004.  Format:     INPUT [/C /D /E /Ln /N /P /Wn /X] [prompt ] %%varname 
  8005.  
  8006.              prompt :  Optional text that is displayed as a prompt. 
  8007.              varname :  The variable that will hold the user's input. 
  8008.  
  8009.              /C(lear buffer)                 /N(o colors) 
  8010.              /D(igits only)                  /P(assword) 
  8011.              /E(dit)                         /W(ait) 
  8012.              /L(ength)                       /X (no carriage return) 
  8013.  
  8014.  See also:  INKEY. 
  8015.  
  8016.  Usage 
  8017.  
  8018.  INPUT optionally displays a prompt.  Then it waits for a specified time or 
  8019.  indefinitely for your entry.  It places any characters you type into an 
  8020.  environment variable.  INPUT is normally used in batch files and aliases to 
  8021.  get multi-key input.  Along with the INKEY command, INPUT allows great 
  8022.  flexibility in reading user input from within a batch file or alias. 
  8023.  
  8024.  If prompt text is included in an INPUT command, it is displayed while INPUT 
  8025.  waits for input.  Standard command-line editing keys may be used to edit the 
  8026.  input string as it is entered.  If you use the /P password option, INPUT will 
  8027.  echo asterisks instead of the keys you type. 
  8028.  
  8029.  All characters entered up to, but not including, the carriage return are 
  8030.  stored in the variable. 
  8031.  
  8032.  The following batch file fragment prompts for a string and stores it in the 
  8033.  variable FNAME: 
  8034.  
  8035.           input Enter the file name:  %%fname
  8036.  
  8037.  INPUT reads standard input, so it will accept text from a re- directed file. 
  8038.  
  8039.  If you press Ctrl-C or Ctrl-Break while INPUT is waiting for input, execution 
  8040.  of an alias will be terminated, and execution of a batch file will be 
  8041.  suspended while you are asked whether to cancel the batch job.  In a batch 
  8042.  file you can handle Ctrl-C and Ctrl-Break yourself with the ON BREAK command. 
  8043.  
  8044.  Options 
  8045.  
  8046.     /C:     (Clear buffer) Clears the keyboard buffer before INPUT accepts 
  8047.             keystrokes.  If you use this option, INPUT will ignore any 
  8048.             keystrokes which you type, either accidentally or intentionally, 
  8049.             before INPUT is ready. 
  8050.  
  8051.     /D:     (Digits only) Prevents INKEY from accepting any keystroke except a 
  8052.             digit from 0 to 9. 
  8053.  
  8054.     /E:     (Edit) Allows you to edit an existing value.  If there is no 
  8055.             existing value for varname, INPUT proceeds as if /E had not been 
  8056.             used, and allows you to enter a new value. 
  8057.  
  8058.     /Ln:    (Length) Sets the maximum number of characters which INPUT will 
  8059.             accept to "n".  If you attempt to enter more than this number of 
  8060.             characters, INPUT will beep and prevent further input (you will 
  8061.             still be able to edit the characters typed before the limit was 
  8062.             reached). 
  8063.  
  8064.     /N:     (No colors) Disables the use of input colors defined in the 
  8065.             InputColors directive in 4OS2.INI, and forces INPUT to use the 
  8066.             default display colors. 
  8067.  
  8068.     /P:     (Password) Tells INPUT to echo asterisks, instead of the characters 
  8069.             you type. 
  8070.  
  8071.     /W:     (Wait) Timeout period, in seconds, to wait for a response. If no 
  8072.             keystroke is entered by the end of the timeout period, INPUT 
  8073.             returns with the variable unchanged. If you enter a key before the 
  8074.             timeout period, INPUT will wait indefinitely for the remainder of 
  8075.             the line.  You can specify /W0 to return immediately if there are 
  8076.             no keys waiting in the keyboard buffer. 
  8077.  
  8078.     /X:     (No carriage return) Prevents INPUT from displaying a carriage 
  8079.             return and line feed after the user's entry. 
  8080.  
  8081.  
  8082. ΓòÉΓòÉΓòÉ 14.43. KEYBD - Set the keyboard toggles ΓòÉΓòÉΓòÉ
  8083.  
  8084.  Purpose:    Set the state of the keyboard toggles:  Caps Lock, Num Lock, and 
  8085.              Scroll Lock. 
  8086.  
  8087.  Format:     KEYBD [/Cn /Nn /Sn] 
  8088.  
  8089.              n :  0 to turn off the toggle, or 1 to turn on the toggle. 
  8090.  
  8091.              /C(aps lock)                    /S(croll lock) 
  8092.              /N(um lock) 
  8093.  
  8094.  Usage 
  8095.  
  8096.  Most keyboards have 3 toggle keys, the Caps Lock, Num Lock, and Scroll Lock. 
  8097.  The toggle key status is usually displayed by three lights at the top right 
  8098.  corner of the keyboard. 
  8099.  
  8100.  This command lets you turn any toggle key on or off.  It is most useful in 
  8101.  batch files and aliases if you want the keys set a particular way before 
  8102.  collecting input from the user. 
  8103.  
  8104.  For example, to turn off the Num Lock and Caps Lock keys, you can use this 
  8105.  command: 
  8106.  
  8107.           [c:\] keybd /c0 /n0
  8108.  
  8109.  If you use the KEYBD command with no switches, it will display the present 
  8110.  state of the toggle keys. 
  8111.  
  8112.  In OS/2, the toggle key state is different for each session. Changes made with 
  8113.  KEYBD will affect the session in which the command is executed, but will not 
  8114.  affect other sessions. 
  8115.  
  8116.  Options 
  8117.  
  8118.     /C:     (Caps lock) Turn the Caps Lock key on or off. 
  8119.  
  8120.     /N:     (Num lock) Turn the Num Lock key on or off. 
  8121.  
  8122.     /S:     (Scroll lock) Turn the Scroll Lock key on or off. 
  8123.  
  8124.  
  8125. ΓòÉΓòÉΓòÉ 14.44. KEYS - Enable or disable the history list ΓòÉΓòÉΓòÉ
  8126.  
  8127.  Purpose:    Enable, disable, or display the history list. 
  8128.  
  8129.  Format:     KEYS [ON | OFF | LIST] 
  8130.  
  8131.  See also:  HISTORY. 
  8132.  
  8133.  Usage 
  8134.  
  8135.  This command is provided for compatibility with KEYS command in CMD.EXE, which 
  8136.  controls the history list in OS/2. The same functions are available by setting 
  8137.  the HistMin directive in the .INI file, and by using the HISTORY command. 
  8138.  
  8139.  The history list collects the commands you type for later recall, editing, and 
  8140.  viewing.  You can view the contents of the list through the history list 
  8141.  window or by typing any of the following commands: 
  8142.  
  8143.           [c:\] history
  8144.           [c:\] history /p
  8145.           [c:\] keys list
  8146.  
  8147.  The first command displays the entire history list.  The second displays the 
  8148.  entire list and pauses at the end of each full screen. The third command 
  8149.  produces the same output as the first, except that each line is numbered. 
  8150.  
  8151.  You can disable the collection and storage of commands in the history list by 
  8152.  typing: 
  8153.  
  8154.           [c:\] keys off
  8155.  
  8156.  You can turn the history back on with the command: 
  8157.  
  8158.           [c:\] keys on
  8159.  
  8160.  If you issue the KEYS command without any parameters, 4OS2 will show you the 
  8161.  current status of the history list. 
  8162.  
  8163.  KEYS also affects the way 4OS2 reads input from the keyboard.  KEYS OFF will 
  8164.  force 4OS2 into line input mode; KEYS ON will return input to the usual 
  8165.  character by character method.  See the LineInput directive, or the /L option 
  8166.  of the SETDOS command, for details on line input mode. 
  8167.  
  8168.  
  8169. ΓòÉΓòÉΓòÉ 14.45. LIST - Display a file ΓòÉΓòÉΓòÉ
  8170.  
  8171.  Purpose:    Display a file, with forward and backward paging and scrolling. 
  8172.  
  8173.  Format:     LIST [/A:[[-]rhsda] /H /S /W /X] file... 
  8174.  
  8175.              file :  A file or list of files to display. 
  8176.  
  8177.              /A:(ttribute select)            /W(rap) 
  8178.              /H(igh bit off)                 /X (heX display mode) 
  8179.              /S(tandard input) 
  8180.  
  8181.  See also:  TYPE. 
  8182.  
  8183.  File Selection 
  8184.  
  8185.  Supports extended wildcards, ranges, multiple file names, and include lists. 
  8186.  
  8187.  Usage 
  8188.  
  8189.  LIST provides a much faster and more flexible way to view a file than TYPE, 
  8190.  without the overhead of loading and using a text editor. 
  8191.  
  8192.  LIST is most often used for displaying ASCII text files.  Most other files 
  8193.  contain non-alphabetic characters and may be unreadable, except in hex mode. 
  8194.  
  8195.  For example, to display a file called MEMO.DOC : 
  8196.  
  8197.           [c:\] list memo.doc
  8198.  
  8199.  If the file argument is a directory name, LIST will display all files in the 
  8200.  directory. 
  8201.  
  8202.  LIST uses the cursor pad to scroll through the file.  The following keys have 
  8203.  special meanings: 
  8204.  
  8205.         Space       Display the next page of the file (same as PgDn). 
  8206.         Home        Display the first page of the file. 
  8207.         End         Display the last page of the file. 
  8208.         Esc         Exit the current file. 
  8209.         Ctrl-C      Quit LIST. 
  8210.                    Scroll up one line. 
  8211.                    Scroll down one line. 
  8212.                    Scroll left 8 columns. 
  8213.                    Scroll right 8 columns. 
  8214.         Ctrl       Scroll left 40 columns. 
  8215.         Ctrl       Scroll right 40 columns. 
  8216.         F1          Display online help 
  8217.         B           Go back one file to the previous file in the current group 
  8218.                     of files. 
  8219.         F           Prompt and search for a string. 
  8220.         G           Go to a specific line, or, in hex mode, to a specific 
  8221.                     hexadecimal offset. 
  8222.         H           Toggle the "strip high bit" (/H) option. 
  8223.         I           Display information on the current file (the full name, 
  8224.                     size, date, and time). 
  8225.         N           Find next matching string. 
  8226.         P           Print the current page or the entire file. 
  8227.         W           Toggle the "line wrap" (/W) option. 
  8228.         X           Toggle the hex-mode display (/X) option. 
  8229.  
  8230.  Text searches performed with F and N are not case sensitive.  However, if the 
  8231.  display is currently in hexadecimal mode and you press F, you will be prompted 
  8232.  for whether you want to search in hexadecimal as well.  If you answer Y, you 
  8233.  should then enter the search string as a sequence of 2-digit hexadecimal 
  8234.  numbers separated by spaces, for example 41 63 65 (these are the ASCII values 
  8235.  for the string "Ace"; see ASCII for a complete list of ASCII codes). 
  8236.  Hexadecimal searches are case sensitive, and search for exactly the string you 
  8237.  enter. 
  8238.  
  8239.  You can use wildcards in the search string.  For example, you can search for 
  8240.  the string "to*day" to find the next line which contains the word "to" 
  8241.  followed by the word "day" later on the same line, or search for the numbers 
  8242.  "101" or "401" with the search string "[14]01". 
  8243.  
  8244.  LIST saves the search string used by F and N, so you can LIST multiple files 
  8245.  and search for the same string simply by pressing N in each file, or repeat 
  8246.  your search the next time you use LIST. 
  8247.  
  8248.  LIST normally allows long lines in the file to extend past the right edge of 
  8249.  the screen.  You can use the horizontal scrolling keys (see above) to view 
  8250.  text that extends beyond the screen width.  If you use the W command or /W 
  8251.  switch to wrap the display, each line is wrapped when it reaches the right 
  8252.  edge of the screen, and the horizontal scrolling keys are disabled. 
  8253.  
  8254.  If you print the file which LIST is displaying, the print format will match 
  8255.  the display format.  If you have switched to hexadecimal or wrapped mode, that 
  8256.  mode will be used for the printed output as well.  If you print in wrapped 
  8257.  mode, long lines will be wrapped at the width of the display.  If you print in 
  8258.  normal display mode without line wrap, long lines will be wrapped or truncated 
  8259.  by the printer, not by LIST. 
  8260.  
  8261.  Printed output normally goes to device LPT1.  If you wish to send the printed 
  8262.  output to another device, use the Printer directive in the .INI file. 
  8263.  
  8264.  Most of the LIST keystrokes can be reassigned with key mapping directives in 
  8265.  the .INI file . 
  8266.  
  8267.  You can set the colors used by LIST with the ListColors and ListStatBarColors 
  8268.  directives in the .INI file.  If ListColors is not used, the LIST display will 
  8269.  use the current default colors.  If ListStatBarColors is not used, the status 
  8270.  bar will use the reverse of the LIST display colors. 
  8271.  
  8272.  Options 
  8273.  
  8274.     /A:     (Attribute select) Select only those files that have the specified 
  8275.             attribute(s) set.  Preceding the attribute character with a hyphen 
  8276.             [-] will select files that do not have that attribute set.  The 
  8277.             colon [:] after /A is required.  The attributes are: 
  8278.                            R  Read-only 
  8279.                            H  Hidden 
  8280.                            S  System 
  8281.                            D  Subdirectory 
  8282.                            A  Archive 
  8283.  
  8284.             If no attributes are listed at all (e.g., LIST /A: ...), LIST will 
  8285.             select all files and subdirectories including hidden and system 
  8286.             files.  If attributes are combined, all the specified attributes 
  8287.             must match for a file to be selected. For example, /A:RHS will 
  8288.             select only those files with all three attributes set. 
  8289.     /H:     (High bit off) Strip the high bit from each character before 
  8290.             displaying.  This is useful when displaying files created by some 
  8291.             word processors that turn on the high bit for formatting purposes. 
  8292.             You can toggle this option on and off from within LIST with the H 
  8293.             key. 
  8294.  
  8295.     /S:     (Standard input) Read from standard input rather than a file.  This 
  8296.             allows you to redirect command output and view it with LIST.  For 
  8297.             example, to use LIST to display the output of DIR: 
  8298.  
  8299.                                 [c:\] dir | list /s
  8300.  
  8301.     /W:     (Wrap) Wrap the text at the right edge of the screen.  This option 
  8302.             is useful when displaying files that don't have a carriage return 
  8303.             at the end of each line.  The horizontal scrolling keys do not work 
  8304.             when the display is wrapped.  You can toggle this option on and off 
  8305.             from within LIST with the W key. 
  8306.  
  8307.     /X      (heX mode):  Display the file in hexadecimal (hex) mode. This 
  8308.             option is useful when displaying executable files and other files 
  8309.             that contain non-text characters.  Each byte of the file is shown 
  8310.             as a pair of hex characters.  The corresponding text is displayed 
  8311.             to the right of each line of hexadecimal data.  You can toggle this 
  8312.             mode on and off from within LIST with the X key. 
  8313.  
  8314.  
  8315. ΓòÉΓòÉΓòÉ 14.46. LOADBTM - Switch a batch file's mode ΓòÉΓòÉΓòÉ
  8316.  
  8317.  Purpose:    Switch a batch file to or from BTM mode. 
  8318.  
  8319.  Format:     LOADBTM [ON | OFF] 
  8320.  
  8321.  Usage 
  8322.  
  8323.  4OS2 recognizes two kinds of batch files: .BAT or .CMD, and .BTM.  Batch files 
  8324.  executing in BTM mode run two to five times faster than in BAT or CMD mode. 
  8325.  Batch files automatically start in the mode indicated by their extension. 
  8326.  
  8327.  The LOADBTM command turns BTM mode on and off.  It can be used to switch modes 
  8328.  in either a .BAT / .CMD or .BTM file.  If you use LOADBTM with no argument, it 
  8329.  will display the current batch mode:  LOADBTM ON or LOADBTM OFF. 
  8330.  
  8331.  LOADBTM can only be used within a batch file.  It is most often used to switch 
  8332.  a .BAT file into BTM mode after memory-resident programs are loaded, or to 
  8333.  convert a .BAT or .CMD file to BTM mode without changing its extension. 
  8334.  
  8335.  Using LOADBTM to repeatedly switch modes within a batch file is not efficient. 
  8336.  In most cases the speed gained by running some parts of the file in BTM mode 
  8337.  will be more than offset by the speed lost through repeated loading of the 
  8338.  file each time BTM mode is invoked. 
  8339.  
  8340.  
  8341. ΓòÉΓòÉΓòÉ 14.47. LOG - Save a log of commands ΓòÉΓòÉΓòÉ
  8342.  
  8343.  Purpose:    Save a log of commands to a disk file. 
  8344.  
  8345.  Format:     LOG [/H /W file ] [ON | OFF | text ] 
  8346.  
  8347.              file :  The name of the file to hold the log. 
  8348.              text :  An optional message that will be added to the log. 
  8349.  
  8350.              /H(istory log)                  /W(rite to). 
  8351.  
  8352.  See also:  HISTORY. 
  8353.  
  8354.  Usage 
  8355.  
  8356.  LOG keeps a record of all internal and external commands you use. Each entry 
  8357.  includes the current system date and time, along with the actual command after 
  8358.  any alias or variable expansion.  You can use the log file as a record of your 
  8359.  daily activities. 
  8360.  
  8361.  LOG with the /H option keeps a similar record, but it does not record the date 
  8362.  and time for each command.  In addition, it records commands before aliases 
  8363.  and variables are expanded. 
  8364.  
  8365.  By default, LOG writes to the file 4OS2LOG in the root directory of the boot 
  8366.  drive.  The default file name for LOG /H is 4OS2HLOG. 
  8367.  
  8368.  Entering LOG or LOG /H with no parameters displays the name of the log file 
  8369.  and the log status (ON or OFF): 
  8370.  
  8371.           [c:\] log
  8372.           LOG (C:\4OS2LOG) is OFF
  8373.  
  8374.  To enable or disable logging, add the word "ON" or "OFF" after the LOG 
  8375.  command: 
  8376.  
  8377.           [c:\] log on
  8378.  
  8379.  or 
  8380.  
  8381.           [c:\] log /h on
  8382.  
  8383.  Entering LOG or LOG /H with text writes a message to the log file, even if 
  8384.  logging  is set OFF.  This allows you to enter headers in the log file: 
  8385.  
  8386.           [c:\] log "Started work on the database system"
  8387.  
  8388.  The LOG file format looks like this: 
  8389.  
  8390.           [mm-dd-yy  hh:mm:ss]  command
  8391.  
  8392.  The LOG /H output can be used as the basis for writing batch files. Start LOG 
  8393.  /H, then execute the commands that you want the batch file to execute.  When 
  8394.  you are finished, turn LOG /H off.  The resulting file can be turned into a 
  8395.  batch file that performs the same commands with little or no editing. 
  8396.  
  8397.  You can have both a regular log (with time and date stamping) and a history 
  8398.  log (without the time stamps) enabled simultaneously. 
  8399.  
  8400.  Options 
  8401.  
  8402.     /H:     (History log) This option turns on (or off) the history log, which 
  8403.             saves commands without the time and date stamp.  For example, to 
  8404.             turn on history logging and write to the file C:\LOG\HLOG: 
  8405.  
  8406.                                 [c:\]  log /h /w c:\log\hlog
  8407.  
  8408.     /W:     (Write) This switch specifies a different filename for the LOG or 
  8409.             LOG /H output.  It also automatically performs a LOG ON command. 
  8410.             For example, to turn logging on and write the log to C:\LOG\LOGFILE 
  8411.             : 
  8412.  
  8413.                                 [c:\] log /w c:\log\logfile
  8414.  
  8415.             Once you select a new file name with the LOG /W or LOG /H/W 
  8416.             command, LOG will use that file until you issue another LOG /W or 
  8417.             LOG /H/W command, or until you reboot your computer.  Turning LOG 
  8418.             or LOG /H off or on does not change the file name.  You can set the 
  8419.             default log file names when 4OS2 starts with the LogName and 
  8420.             HistLogName directives in the .INI file. 
  8421.  
  8422.  
  8423. ΓòÉΓòÉΓòÉ 14.48. MD - Create a subdirectory ΓòÉΓòÉΓòÉ
  8424.  
  8425.  Purpose:    Create a subdirectory. 
  8426.  
  8427.  Format:     MD [/S] pathname... 
  8428.                 or 
  8429.              MKDIR [/S] pathname... 
  8430.  
  8431.              pathname :  The name of one or more directories to create. 
  8432.  
  8433.              /S(ubdirectories) 
  8434.  
  8435.  See also:  RD. 
  8436.  
  8437.  Usage 
  8438.  
  8439.  MD and MKDIR are synonyms.  You can use either one. 
  8440.  
  8441.  MD creates a subdirectory anywhere in the directory tree.  To create a 
  8442.  subdirectory from the root, start the pathname with a backslash [\].  For 
  8443.  example, this command creates a subdirectory called MYDIR in the root 
  8444.  directory: 
  8445.  
  8446.           [c:\] md \mydir
  8447.  
  8448.  If no path is given, the new subdirectory is created in the current directory. 
  8449.  This example creates a subdirectory called DIRTWO in the current directory: 
  8450.  
  8451.           [c:\mydir] md dirtwo
  8452.  
  8453.  To create a directory from the parent of the current directory (that is, to 
  8454.  create a sibling of the current directory), start the pathname with two 
  8455.  periods and a backslash [..\]. 
  8456.  
  8457.  Option 
  8458.  
  8459.     /S:     (Subdirectories) MD creates one directory at a time unless you use 
  8460.             the /S option.  If you need to create the directory 
  8461.             C:\ONE\TWO\THREE and none of the named directories exist, you can 
  8462.             use /S to have MD create all of the necessary subdirectories for 
  8463.             you in a single command: 
  8464.  
  8465.                                 [c:\] md /s \one\two\three
  8466.  
  8467.  
  8468. ΓòÉΓòÉΓòÉ 14.49. MEMORY - Display memory statistics ΓòÉΓòÉΓòÉ
  8469.  
  8470.  Purpose:    Display the amount and status of system RAM. 
  8471.  
  8472.  Format:     MEMORY 
  8473.  
  8474.  Usage 
  8475.  
  8476.  MEMORY lists the total physical and resident RAM in your system, the largest 
  8477.  free block of RAM, the total size of your swap file, the total and free 
  8478.  environment and alias space, and the total history space.  (The first two RAM 
  8479.  size values are displayed by 4OS2/32, but not by 4OS2/16.) 
  8480.  
  8481.  If the OS/2 swap file is not stored in the \OS2\SYSTEM directory of the boot 
  8482.  drive, you must use the SwapFilePath directive in 4OS2.INI or MEMORY will not 
  8483.  be able to display the swap file size. 
  8484.  
  8485.  
  8486. ΓòÉΓòÉΓòÉ 14.50. MOVE - Move files ΓòÉΓòÉΓòÉ
  8487.  
  8488.  Purpose:    Move files to a new directory and drive. 
  8489.  
  8490.  Format:     MOVE  [/A:[[-]rhsda] /C /D /F /H /M /N /P /Q /R /S /T /U /V] 
  8491.              source...  destination 
  8492.  
  8493.              source :  A file or list of files to move. 
  8494.              destination :  The new location for the files. 
  8495.  
  8496.              /A:(ttribute select)            /P(rompt) 
  8497.              /C(hanged)                      /Q(uiet) 
  8498.              /D(irectory)                    /R(eplace) 
  8499.              /F(orce delete)                 /S(ubdirectory tree) 
  8500.              /H(idden and system)            /T(otal) 
  8501.              /M(odified files)               /U(pdate) 
  8502.              /N(othing)                      /V(erify) 
  8503.  
  8504.  See also:  COPY and RENAME. 
  8505.  
  8506.  File Selection 
  8507.  
  8508.  Supports extended wildcards, ranges, multiple file names, and include lists. 
  8509.  Date, time, or size ranges anywhere on the line apply to all source files. 
  8510.  
  8511.  Usage 
  8512.  
  8513.  The MOVE command moves one or more files from one directory to another, 
  8514.  whether the directories are on the same drive or not.  It has the same effect 
  8515.  as copying the files to a new location and then deleting the originals.  Like 
  8516.  COPY and RENAME, MOVE works with single files, multiple files, and sets of 
  8517.  files specified with an include list. 
  8518.  
  8519.  The simplest MOVE command moves a single source file to a new location and, 
  8520.  optionally, gives it a new name.  These two examples both move one file from 
  8521.  drive C: to the root directory on drive A: 
  8522.  
  8523.           [c:\] move myfile.dat a:\
  8524.           [c:\] move myfile.dat a:\savefile.dat
  8525.  
  8526.  In both cases, MYFILE.DAT is removed from drive C: after it has been copied to 
  8527.  drive A:.  If a file called MYFILE.DAT in the first example, or SAVEFILE.DAT 
  8528.  in the second example, already existed on drive A:, it would be overwritten. 
  8529.  (This demonstrates the difference between MOVE and RENAME.  MOVE will move 
  8530.  files between drives and will overwrite the destination file if it exists; 
  8531.  RENAME will not.) 
  8532.  
  8533.  If you MOVE multiple files, the destination must be a directory name.  MOVE 
  8534.  will move each file into the destination directory with its original name (if 
  8535.  the target is not a directory, MOVE will display an error message and exit): 
  8536.  
  8537.           [c:\] move *.wks *.txt c:\finance\myfiles
  8538.  
  8539.  You cannot move a file to a character device like the printer, or to itself. 
  8540.  
  8541.  When you move files to another directory, if you add a backslash [\] to the 
  8542.  end of the destination name MOVE will display an error message if the name 
  8543.  does not refer to an existing directory. You can use this feature to keep MOVE 
  8544.  from treating a mistyped destination directory name as a file name, and 
  8545.  attempting to move all source files to that name.  The /D option performs the 
  8546.  same function but will also prompt to see if you want to create the 
  8547.  destination directory if it doesn't exist. 
  8548.  
  8549.  Be careful when you use MOVE with the SELECT command.  If you SELECT multiple 
  8550.  files and the target is not a directory (for example, because of a 
  8551.  misspelling), MOVE will assume it is a file name.  In this case each file will 
  8552.  be moved in turn to the target file, overwriting the previous file, and then 
  8553.  the original will be erased before the next file is moved.  At the end of the 
  8554.  command, all of the original files will have been erased and only the last 
  8555.  file will exist as the target file.  You can avoid this problem by using 
  8556.  square brackets with SELECT instead of parentheses (be sure that you don't 
  8557.  allow the command line to get too long -- watch the character count in the 
  8558.  upper left corner while you're selecting files).  MOVE will then receive one 
  8559.  list of files to move instead of a series of individual filenames, and it will 
  8560.  detect the error and halt.  You can also add a backslash [\] to the end of the 
  8561.  destination name to ensure that it is the name of a subdirectory (see above). 
  8562.  
  8563.  MOVE first attempts to rename the file(s), which is the fastest way to move 
  8564.  files between subdirectories on the same drive.  If that fails (the 
  8565.  destination is on a different drive or already exists), MOVE will copy the 
  8566.  file(s) and then delete the originals. 
  8567.  
  8568.  If MOVE must physically copy the files and delete the originals, rather than 
  8569.  renaming them (see above), then some disk space may be freed on the source 
  8570.  drive.  The free space may be the result of moving the files to another drive, 
  8571.  or of overwriting a larger destination file with a smaller source file.  MOVE 
  8572.  displays the amount of disk space recovered unless the /Q option is used (see 
  8573.  below).  It does so by comparing the amount of free disk space before and 
  8574.  after the MOVE command is executed.  However, this amount may be incorrect if 
  8575.  you are using a deletion tracking system which stores deleted files in a 
  8576.  hidden directory, or if, under a multitasking system, another program performs 
  8577.  a file operation while the MOVE command is executed. 
  8578.  
  8579.  When physically copying files, MOVE preserves the hidden, system, and 
  8580.  read-only attributes of the source files, and sets the archive attribute of 
  8581.  the destination files.  However, if the files can be renamed, and no copying 
  8582.  is required, then the source file attributes are not changed. 
  8583.  
  8584.  Options 
  8585.  
  8586.     /A:     (Attribute select) Select only those files that have the specified 
  8587.             attribute(s) set.  Preceding the attribute character with a hyphen 
  8588.             [-] will select files that do not have that attribute set.  The 
  8589.             colon [:] after /A is required.  The attributes are: 
  8590.  
  8591.                            R  Read-only 
  8592.                            H  Hidden 
  8593.                            S  System 
  8594.                            D  Subdirectory 
  8595.                            A  Archive 
  8596.  
  8597.             If no attributes are listed at all (e.g., MOVE /A: ...), MOVE will 
  8598.             select all files and subdirectories including hidden and system 
  8599.             files.  If attributes are combined, all the specified attributes 
  8600.             must match for a file to be selected. For example, /A:RHS will 
  8601.             select only those files with all three attributes set. 
  8602.  
  8603.     /C:     (Changed files) Move files only if the destination file exists and 
  8604.             is older than the source (see also /U).  This option is useful for 
  8605.             updating the files in one directory from those in another without 
  8606.             moving any newly-created files. 
  8607.  
  8608.     /D:     (Directory) Requires that the destination be a directory.  If the 
  8609.             destination does not exist, MOVE will prompt to see if you want to 
  8610.             create it. If the destination exists as a file, MOVE will fail with 
  8611.             an "Access denied" error.  Use this option to avoid having MOVE 
  8612.             accidentally interpret your destination name as a file name when 
  8613.             it's really a mistyped directory name. 
  8614.  
  8615.     /F:     (Force delete) This option only works in the 32-bit version of 
  8616.             4OS2.  It forces deletion of the source file without saving it to 
  8617.             the DELDIR directory (if DELDIR is not in use, /F has no effect). 
  8618.  
  8619.     /H:     (Hidden) Move all files, including hidden and system files. 
  8620.  
  8621.     /M:     (Modified files) Move only files that have the archive bit set. The 
  8622.             archive bit will remain set after the MOVE; to clear it use ATTRIB. 
  8623.  
  8624.     /N:     (Nothing) Do everything except actually move the file(s). This 
  8625.             option is most useful for testing what a complex MOVE command will 
  8626.             do. 
  8627.  
  8628.     /P:     (Prompt) Prompt the user to confirm each move.  Your options at the 
  8629.             prompt are explained in detail under Page and File Prompts. 
  8630.  
  8631.     /Q:     (Quiet) Don't display filenames, the total number of files moved, 
  8632.             or the amount of disk space recovered, if any.  This option is most 
  8633.             often used in batch files. See also /T. 
  8634.  
  8635.     /R:     (Replace) Prompt for a Y or N response before overwriting an 
  8636.             existing destination file. 
  8637.  
  8638.     /S:     (Subdirectories) Move an entire subdirectory tree to another 
  8639.             location.  MOVE will attempt to create the destination directories 
  8640.             if they don't exist, and will remove empty subdirectories after the 
  8641.             move. When /D is used with /S, you will be prompted if the first 
  8642.             destination directory does not exist, but subdirectories below that 
  8643.             will be created automatically by MOVE.  If you attempt to use /S to 
  8644.             move a subdirectory tree into part of itself, MOVE will display an 
  8645.             error message and halt. 
  8646.  
  8647.     /T:     (Total) Don't display filenames as they are moved, but display the 
  8648.             total number of files deleted and the amount of free disk space 
  8649.             recovered, if any. 
  8650.  
  8651.     /U:     (Update) Move each source file only if it is newer than a matching 
  8652.             destination file or if a matching destination file does not exist 
  8653.             (also see /C).  This option is useful for moving new or changed 
  8654.             files from one directory to another. 
  8655.  
  8656.     /V:     (Verify) Verify each disk write.  This is the same as executing the 
  8657.             VERIFY ON command, but is only active during the MOVE.  /V does not 
  8658.             read back the file and compare its contents with what was written; 
  8659.             it only verifies that the data written to disk is physically 
  8660.             readable. 
  8661.  
  8662.  
  8663. ΓòÉΓòÉΓòÉ 14.51. ON - Handle Ctrl-Break and errors in batch files ΓòÉΓòÉΓòÉ
  8664.  
  8665.  Purpose:    Execute a command in a batch file when a specific condition 
  8666.              occurs. 
  8667.  
  8668.  Format:     ON BREAK [command ] 
  8669.                 or 
  8670.              ON ERROR [command ] 
  8671.                 or 
  8672.              ON ERRORMSG [command ] 
  8673.  
  8674.  Usage 
  8675.  
  8676.  ON can only by used in batch files. 
  8677.  
  8678.  ON sets a "watchdog" that remains in effect for the duration of the current 
  8679.  batch file.  Whenever a BREAK or ERROR condition occurs after ON has been 
  8680.  executed, the command is automatically executed. 
  8681.  
  8682.  ON BREAK will execute its command if the user presses Ctrl- C or Ctrl-Break. 
  8683.  
  8684.  ON ERROR will execute its command after any command processor or operating 
  8685.  system error (including critical errors). That is, ON ERROR will detect errors 
  8686.  such as a disk write error, and 4OS2 errors such as a COPY command that fails 
  8687.  to copy any files, or the use of an unacceptable command option.  The normal 
  8688.  error message is not displayed when ON ERROR is used. 
  8689.  
  8690.  ON ERRORMSG is the same as ON ERROR, but displays the usual error message 
  8691.  before executing the command.  The additional information about ON ERROR below 
  8692.  also applies to ON ERRORMSG. 
  8693.  
  8694.  ON BREAK and ON ERROR are independent of each other.  You can use either one, 
  8695.  or both, in any batch file. 
  8696.  
  8697.  Each time ON BREAK or ON ERROR is used, it defines a new command to be 
  8698.  executed for a break or error, and any old command is discarded.  If you use 
  8699.  ON BREAK or ON ERROR with no following command, that type of error handling is 
  8700.  disabled. Error handling is also automatically disabled when the batch file 
  8701.  exits. 
  8702.  
  8703.  ON BREAK and ON ERROR only affect the current batch file.  If you CALL another 
  8704.  batch file, the first batch file's error handling is suspended, and the CALLed 
  8705.  file must define its own error handling. When control returns to the first 
  8706.  batch file, its error handling is reactivated. 
  8707.  
  8708.  The command can be any command that can be used on a batch file line by 
  8709.  itself.  Frequently, it is a GOTO or GOSUB command.  For example, the 
  8710.  following fragment traps any user attempt to end the batch file by pressing 
  8711.  Ctrl-C or Ctrl-Break.  It scolds the user for trying to end the batch file and 
  8712.  then continues displaying the numbers from 1 to 1000: 
  8713.  
  8714.           on break gosub gotabreak
  8715.           do i = 1 to 1000
  8716.              echo %i
  8717.           enddo
  8718.           quit
  8719.           :gotabreak
  8720.           echo Hey!  Stop that!!
  8721.           return
  8722.  
  8723.  You can use a command group as the command if you want to execute multiple 
  8724.  commands, for example: 
  8725.  
  8726.           on break (echo Oops, got a break! & quit)
  8727.  
  8728.  ON BREAK and ON ERROR always assume that you want to continue executing the 
  8729.  batch file.  After the command is executed, control automatically returns to 
  8730.  the next command in the batch file (the command after the one that was 
  8731.  interrupted by the break or error).  The only way to avoid continuing the 
  8732.  batch file after a break or error is for the command to transfer control to 
  8733.  another point with GOTO, end the batch file with QUIT or CANCEL, or start 
  8734.  another batch file (without CALLing it). 
  8735.  
  8736.  When handling an error condition with ON ERROR, you may find it useful to use 
  8737.  internal variables, particularly %_? and %_SYSERR, to help determine the cause 
  8738.  of the error. 
  8739.  
  8740.  Caution:  If a break or error occurs while the command specified in ON BREAK 
  8741.  or ON ERROR is executing, the command will be restarted. This means you must 
  8742.  use caution to avoid or handle any possible errors in the commands invoked by 
  8743.  ON ERROR, since such errors can cause an infinite loop. 
  8744.  
  8745.  
  8746. ΓòÉΓòÉΓòÉ 14.52. PATH - Set the executable file search path ΓòÉΓòÉΓòÉ
  8747.  
  8748.  Purpose:    Display or alter the list of directories that 4OS2 will search for 
  8749.              executable files, batch files, and files with executable 
  8750.              extensions that are not in the current directory. 
  8751.  
  8752.  Format:     PATH [directory [;directory...]] 
  8753.  
  8754.              directory :  The full name of a directory to include in the path 
  8755.              setting. 
  8756.  
  8757.  See also:  ESET and SET. 
  8758.  
  8759.  Usage 
  8760.  
  8761.  When 4OS2 is asked to execute an external command (a .COM, .EXE, .BTM, .BAT, 
  8762.  or .CMD file or executable extension), it first looks for the file in the 
  8763.  current directory. If it fails to find an executable file there, it then 
  8764.  searches each of the directories specified in the PATH setting. 
  8765.  
  8766.  For example, after the following PATH command, 4OS2 will search for an 
  8767.  executable file in four directories:  the current directory, then the root 
  8768.  directory on drive C, then the DOS subdirectory on C, and then the UTIL 
  8769.  subdirectory on C: 
  8770.  
  8771.           [c:\] path c:\;c:\dos;c:\util
  8772.  
  8773.  The list of directories to search can be set or viewed with the PATH command. 
  8774.  The list is stored as an environment string, and can also be set or viewed 
  8775.  with SET, and edited with ESET. 
  8776.  
  8777.  Directory names in the path must be separated by semicolons [;].  Each 
  8778.  directory name is shifted to upper case to maintain compatibility with 
  8779.  programs which can only recognize upper case directory names in the path.  If 
  8780.  you modify your path with the SET or ESET command, you may include directory 
  8781.  names in lower case.  These may cause trouble with some programs, which assume 
  8782.  that all path entries have been shifted to upper case. 
  8783.  
  8784.  If you enter PATH with no parameters, the current path is displayed: 
  8785.  
  8786.           [c:\] path
  8787.           PATH=C:\;C:\DOS;C:\UTIL
  8788.  
  8789.  Entering PATH and a semicolon clears the search path so that only the current 
  8790.  directory is searched for executable files (this is the default at system 
  8791.  startup). 
  8792.  
  8793.  Some applications also use the PATH to search for their data files. 
  8794.  
  8795.  If you include an explicit file extension on a command name (for example, 
  8796.  WP.EXE ), the search will find files with that name and extension in the 
  8797.  current directory and every directory in the path. It will not locate other 
  8798.  executable files with the same base name. 
  8799.  
  8800.  If you have an entry in the path which consists of a single period [.], the 
  8801.  current directory will not be searched first, but instead will be searched 
  8802.  when 4OS2 reaches the "." in the path. This allows you to delay the search of 
  8803.  the current directory for executable files and files with executable 
  8804.  extensions.  In rare cases, this feature may not be compatible with 
  8805.  applications which use the path to find their files; if you experience a 
  8806.  problem, you will have to remove the "." from the path while using any such 
  8807.  application. 
  8808.  
  8809.  To create a path longer than the command-line length limit, use PATH 
  8810.  repeatedly to append additional directories to the path: 
  8811.  
  8812.           path [first list of directories]
  8813.           path %path;[second list of directories]
  8814.           ...
  8815.  
  8816.  You cannot use this method to extend the path beyond 2042 characters (the 
  8817.  internal buffer limit, with room for "PATH ").  It is usually more efficient 
  8818.  to use aliases to load application programs than to create a long PATH.  See 
  8819.  ALIAS for details. 
  8820.  
  8821.  If you specify an invalid directory in the path, it will be skipped and the 
  8822.  search will continue with the next directory in the path. 
  8823.  
  8824.  
  8825. ΓòÉΓòÉΓòÉ 14.53. PAUSE - Suspend batch file or alias execution ΓòÉΓòÉΓòÉ
  8826.  
  8827.  Purpose:    Suspend batch file or alias execution. 
  8828.  
  8829.  Format:     PAUSE [text ] 
  8830.  
  8831.              text :  The message to be displayed as a user prompt. 
  8832.  
  8833.  Usage 
  8834.  
  8835.  A PAUSE command will suspend execution of a batch file or alias, giving you 
  8836.  the opportunity to change disks, turn on the printer, etc. 
  8837.  
  8838.  PAUSE waits for any key to be pressed and then continues execution. You can 
  8839.  specify the text that PAUSE displays while it waits for a keystroke, or let 
  8840.  4OS2 use the default message: 
  8841.  
  8842.           Press any key when ready...
  8843.  
  8844.  For example, the following batch file fragment prompts the user before erasing 
  8845.  files: 
  8846.  
  8847.           pause Press Ctrl-C to abort, any other key to erase all .LST files
  8848.           erase *.lst
  8849.  
  8850.  If you press Ctrl-C or Ctrl-Break while PAUSE is waiting for a key, execution 
  8851.  of an alias will be terminated, and execution of a batch file will be 
  8852.  suspended while you are asked whether to cancel the batch job.  In a batch 
  8853.  file you can handle Ctrl-C and Ctrl-Break yourself with the ON BREAK command. 
  8854.  
  8855.  
  8856. ΓòÉΓòÉΓòÉ 14.54. POPD - Restore the disk drive and directory ΓòÉΓòÉΓòÉ
  8857.  
  8858.  Purpose:    Return to the disk drive and directory at the top of the directory 
  8859.              stack.. 
  8860.  
  8861.  Format:     POPD [*] 
  8862.  
  8863.  See also:  DIRS and PUSHD. 
  8864.  
  8865.  Usage 
  8866.  
  8867.  Each time you use the PUSHD command, it saves the current disk drive and 
  8868.  directory on the internal directory stack.  POPD restores the last drive and 
  8869.  directory that was saved with PUSHD and removes that entry from the stack. 
  8870.  You can use these commands together to change directories, perform some work, 
  8871.  and return to the starting drive and directory. 
  8872.  
  8873.  Directory changes made with POPD are recorded for display in the directory 
  8874.  history window. 
  8875.  
  8876.  This example saves and changes the current disk drive and directory with 
  8877.  PUSHD, and then restores it.  The current directory is shown in the prompt: 
  8878.  
  8879.           [c:\] pushd d:\database\test
  8880.           [d:\database\test] popd
  8881.           [c:\]
  8882.  
  8883.  You can use the DIRS command to see the complete list of saved drives and 
  8884.  directories (the directory stack). 
  8885.  
  8886.  The POPD command followed by an asterisk [*] clears the directory stack 
  8887.  without changing the current drive and directory. 
  8888.  
  8889.  If the directory on the top of the stack is not on the current drive, POPD 
  8890.  will switch to the drive and directory on the top of the stack without 
  8891.  changing the default directory on the current drive. 
  8892.  
  8893.  
  8894. ΓòÉΓòÉΓòÉ 14.55. PROMPT - Change the command-line prompt ΓòÉΓòÉΓòÉ
  8895.  
  8896.  Purpose:    Change the command-line prompt. 
  8897.  
  8898.  Format:     PROMPT [text ] 
  8899.  
  8900.              text :  Text to be used as the new command-line prompt. 
  8901.  
  8902.  Usage 
  8903.  
  8904.  You can change and customize the command-line prompt at any time. The prompt 
  8905.  can include normal text, and system information such as the current drive and 
  8906.  directory, the time and date, and the amount of memory available.  You can 
  8907.  create an informal "Hello, Bob!" prompt or an official-looking prompt full of 
  8908.  impressive information. The prompt text can contain special commands in the 
  8909.  form $?, where ? is one of the characters listed below: 
  8910.  
  8911.         b     The vertical bar character [|]. 
  8912.         c     The open parenthesis [(]. 
  8913.         d     Current date, in the format:  Fri  1-06-95 (the month, day, and 
  8914.               year are formatted according to your current country settings). 
  8915.         D     Current date, in the format:  Fri  Jan 6, 1995. 
  8916.         e     The ASCII ESC character (decimal 27). 
  8917.         f     The close parenthesis [)]. 
  8918.         g     The > character. 
  8919.         h     Backspace over the previous character. 
  8920.         i     Display the OS/2 prompt header line, which reminds you of how to 
  8921.               return to the OS/2 desktop, or get help. 
  8922.         l     The < character. 
  8923.         m     Time in hours and minutes using 24-hour format:  16:07 
  8924.         M     Time in hours and minutes using the default country format and 
  8925.               retaining "a" or "p", e.g. 4:07p. 
  8926.         n     Current drive letter. 
  8927.         p     Current directory on drive d: (including drive letter), in lower 
  8928.               case. 
  8929.         P     Current directory on drive d: (including drive letter), in upper 
  8930.               case. 
  8931.         q     The = character. 
  8932.         r     The numeric exit code of the last external command. 
  8933.         s     The space character. 
  8934.         t     Current 24-hour time, in the format hh:mm:ss. 
  8935.         T     Current 12-hour time, in the format hh:mm:ss[a|p]. 
  8936.         v     Operating system version number, in the format 3.10. 
  8937.         xd:   Current directory on drive d:, in lower case (uses the actual 
  8938.               case of the directory name as stored on the disk for HPFS 
  8939.               drives). 
  8940.         Xd:   Current directory on drive d:, in upper case. 
  8941.         z     Current shell nesting level; the primary command processor is 
  8942.               shell 0. 
  8943.         $     The $ character. 
  8944.         _     CR/LF (go to beginning of a new line). 
  8945.  
  8946.  For example, to set the prompt to the current date and time, with a ">" at the 
  8947.  end: 
  8948.  
  8949.           [c:\] prompt $d $t $g
  8950.           Fri  Dec 2, 1994 10:29:19 >
  8951.  
  8952.  To set the prompt to the current date and time, followed by the current drive 
  8953.  and directory in upper case on the next line, with a ">" at the end: 
  8954.  
  8955.           [c:\] prompt $d $t$_$P$g
  8956.           Fri  Dec 2, 1994 10:29:19
  8957.           [c:\]
  8958.  
  8959.  The 4OS2 prompt can be set in CONFIG.SYS (see below), and the prompt for any 
  8960.  command processor can be set in 4START, or in any batch file that runs when 
  8961.  4OS2 starts. 
  8962.  
  8963.  The 4OS2 default prompt is [$n] (drive name in square brackets) on floppy 
  8964.  drives, and [$p] (current drive and directory in square brackets) on all other 
  8965.  drives.  When OS/2 is installed, it inserts a SET PROMPT statement in 
  8966.  CONFIG.SYS to set the prompt to $i[$p].  This prompt will override the 4OS2 
  8967.  defaults.  The $i adds a header line to the default prompt to remind you of 
  8968.  certain OS/2 keystrokes.  You must delete this statement if you want to use 
  8969.  the default prompt. 
  8970.  
  8971.  If you enter PROMPT with no arguments, the prompt will be reset to its default 
  8972.  value.  The PROMPT command sets the environment variable PROMPT, so to view 
  8973.  the current prompt setting use the command: 
  8974.  
  8975.           [c:\] set prompt
  8976.  
  8977.  (If the prompt is not set at all, the PROMPT environment variable will not be 
  8978.  used, in which case the SET command above will give a "Not in environment" 
  8979.  error.) 
  8980.  
  8981.  Along with literal text, special characters, and ANSI sequences you can 
  8982.  include the text of any environment variable, internal variable, or variable 
  8983.  function in a prompt.  For example, if you want to include the size of the 
  8984.  largest free memory block in the command prompt, plus the current drive and 
  8985.  directory, you could use this command: 
  8986.  
  8987.           [c:\] prompt (%%@dosmem[K]K) $p$g
  8988.           (601K) [c:\data]
  8989.  
  8990.  Notice that the @DOSMEM function is shown with two leading percent signs [%]. 
  8991.  If you used only one percent sign, the @DOSMEM function would be expanded once 
  8992.  when the PROMPT command was executed, instead of every time the prompt is 
  8993.  displayed.  As a result, the amount of memory would never change from the 
  8994.  value it had when you entered the PROMPT command.  You can also use back 
  8995.  quotes to delay expanding the variable function until the prompt is displayed: 
  8996.  
  8997.           [c:\] prompt `(%@dosmem[K]K) $p$g`
  8998.  
  8999.  You can include ANSI escape sequences in the PROMPT text.  See ANSI for 
  9000.  complete details on ANSI commands.  This example uses ANSI sequences to set a 
  9001.  prompt that displays the shell level, date, time and path in color on the top 
  9002.  line of the screen (enter the command as one line): 
  9003.  
  9004.           [c:\] prompt $e[s$e[1;1f$e[41;1;37m$e[K[$z] $d
  9005.                 Time: $t$h$h$h  Path: $p$e[u$e[0;32m$n$g
  9006.  
  9007.  You may find it helpful to define a different prompt in secondary shells, 
  9008.  perhaps including $z in the prompt to display the shell level.  To do so, 
  9009.  place a PROMPT command in your 4START file and use IF or IFF statements to set 
  9010.  the appropriate prompt for different shells. 
  9011.  
  9012.  
  9013. ΓòÉΓòÉΓòÉ 14.56. PUSHD - Save the disk drive and directory ΓòÉΓòÉΓòÉ
  9014.  
  9015.  Purpose:    Save the current disk drive and directory, optionally changing to 
  9016.              a new drive and directory. 
  9017.  
  9018.  Format:     PUSHD [pathname ] 
  9019.  
  9020.              pathname :  The name of the new default drive and directory. 
  9021.  
  9022.  See also:  DIRS, POPD and the CDPATH environment variable. 
  9023.  
  9024.  Usage 
  9025.  
  9026.  PUSHD saves the current drive and directory on a "last in, first out" 
  9027.  directory stack.  The POPD command returns to the last drive and directory 
  9028.  that was saved by PUSHD.  You can use these commands together to change 
  9029.  directories, perform some work, and return to the starting drive and 
  9030.  directory.  The DIRS command displays the contents of the directory stack. 
  9031.  
  9032.  To save the current drive and directory, without changing directories, use the 
  9033.  PUSHD command by itself, with no pathname. 
  9034.  
  9035.  If a pathname is specified as part of the PUSHD command, the current drive and 
  9036.  directory are saved and PUSHD changes to the specified drive and directory. 
  9037.  If the pathname includes a drive letter, PUSHD changes to the specified 
  9038.  directory on the new drive without changing the current directory on the 
  9039.  original drive. 
  9040.  
  9041.  This example saves the current directory and changes to C:\WORDP\MEMOS, then 
  9042.  returns to the original directory: 
  9043.  
  9044.           [c:\] pushd \wordp\memos
  9045.           [c:\wordp\memos] popd
  9046.           [c:\]
  9047.  
  9048.  Directory changes made with PUSHD are recorded for display in the directory 
  9049.  history window. 
  9050.  
  9051.  The directory stack can hold up to 255 characters, or about 10 to 20 entries 
  9052.  (depending on the length of the names).  If you exceed this limit, the oldest 
  9053.  entry is removed before adding a new entry. 
  9054.  
  9055.  If PUSHD can't change directly to the specified directory, it will look for 
  9056.  the CDPATH variable; see CDPATH for details. 
  9057.  
  9058.  
  9059. ΓòÉΓòÉΓòÉ 14.57. QUIT - Terminate a batch file ΓòÉΓòÉΓòÉ
  9060.  
  9061.  Purpose:    Terminate the current batch file. 
  9062.  
  9063.  Format:     QUIT [value ] 
  9064.  
  9065.              value :  The exit code from 0 to 255 to return to 4OS2 or to the 
  9066.              previous batch file. 
  9067.  
  9068.  See also:  CANCEL. 
  9069.  
  9070.  Usage 
  9071.  
  9072.  QUIT provides a simple way to exit a batch file before reaching the end of the 
  9073.  file.  If you QUIT a batch file called from another batch file, you will be 
  9074.  returned to the previous file at the line following the original CALL. 
  9075.  
  9076.  QUIT only ends the current batch file.  To end all batch file processing, use 
  9077.  the CANCEL command. 
  9078.  
  9079.  If you specify a value, QUIT will set the ERRORLEVEL or exit code (see the IF 
  9080.  command, and the %? variable) to that value. 
  9081.  
  9082.  You can also use QUIT to terminate an alias.  If you QUIT an alias while 
  9083.  inside a batch file, QUIT will end both the alias and the batch file and 
  9084.  return you to the command prompt or to the calling batch file. 
  9085.  
  9086.  
  9087. ΓòÉΓòÉΓòÉ 14.58. RD - Remove subdirectories ΓòÉΓòÉΓòÉ
  9088.  
  9089.  Purpose:    Remove one or more subdirectories. 
  9090.  
  9091.  Format:     RD pathname... 
  9092.                 or 
  9093.              RMDIR pathname... 
  9094.  
  9095.              pathname :  The name of a subdirectory to remove. 
  9096.  
  9097.  See also:  MD. 
  9098.  
  9099.  File Selection 
  9100.  
  9101.  Supports extended wildcards, ranges, multiple file names, and include lists. 
  9102.  
  9103.  Usage 
  9104.  
  9105.  RD and RMDIR are synonyms.  You can use either one. 
  9106.  
  9107.  RD removes directories from the directory tree.  For example, to remove the 
  9108.  subdirectory MEMOS from the subdirectory WP, you can use this command: 
  9109.  
  9110.           [c:\] rd \wp\memos
  9111.  
  9112.  Before using RD, you must delete all files and subdirectories (and their 
  9113.  files) in the pathname you want to remove.  Remember to remove hidden and 
  9114.  read-only files as well as normal files (you can use DEL /Z to delete hidden 
  9115.  and read-only files). 
  9116.  
  9117.  You can use wildcards in the pathname. 
  9118.  
  9119.  You cannot remove the root directory, the current directory (.), any directory 
  9120.  above the current directory in the directory tree, or any directory in use by 
  9121.  another process in a multitasking system. 
  9122.  
  9123.  
  9124. ΓòÉΓòÉΓòÉ 14.59. REBOOT - Reboot the system ΓòÉΓòÉΓòÉ
  9125.  
  9126.  Purpose:    Do a system reboot. 
  9127.  
  9128.  Format:     REBOOT [/S /V] 
  9129.  
  9130.              /S(hutdown)                     /V(erify) 
  9131.  
  9132.  Usage 
  9133.  
  9134.  REBOOT will completely restart your computer.  It normally performs a warm 
  9135.  reboot, which is comparable to pressing Ctrl-Alt-Delete. A reboot is necessary 
  9136.  to activate any changes to your CONFIG.SYS file. 
  9137.  
  9138.  The following example prompts you to verify the reboot, then does a warm boot: 
  9139.  
  9140.           [c:\] reboot /v
  9141.  
  9142.  REBOOT defaults to performing a warm boot, with no prompting. 
  9143.  
  9144.  REBOOT flushes the disk buffers, resets the drives, and waits one second 
  9145.  before rebooting, to allow disk caching programs to finish writing any cached 
  9146.  data.  4OS2 issues the proper commands to shut down OS/2 before rebooting. 
  9147.  
  9148.  REBOOT uses the DOS.SYS device driver to reboot your system.  DOS.SYS is 
  9149.  loaded via a DEVICE= statement in your CONFIG.SYS file.  If DOS.SYS is not 
  9150.  loaded, REBOOT will not work. 
  9151.  
  9152.  Options 
  9153.  
  9154.     /S:     (Shutdown) Shut down the system, but do not reboot.  This option is 
  9155.             equivalent to clicking the "Shutdown" choice on the OS/2 2.x 
  9156.             Workplace Shell popup menu. 
  9157.  
  9158.     /V:     (Verify) Prompt for confirmation (Y or N) before rebooting or 
  9159.             taking the action specified by other REBOOT options. 
  9160.  
  9161.  
  9162. ΓòÉΓòÉΓòÉ 14.60. REM - Put a comment in a batch file ΓòÉΓòÉΓòÉ
  9163.  
  9164.  Purpose:    Put a comment in a batch file. 
  9165.  
  9166.  Format:     REM [comment ] 
  9167.  
  9168.              comment :  The text to include in the batch file. 
  9169.  
  9170.  Usage 
  9171.  
  9172.  The REM command lets you place a remark or comment in a batch file. Batch file 
  9173.  comments are useful for documenting the purpose of a batch file and the 
  9174.  procedures you have used. 
  9175.  
  9176.  REM must be followed by a space or tab character and then your comment. 
  9177.  Comments can be up to 1023 characters long.  4OS2 will normally ignore 
  9178.  everything on the line after the REM command, including quote characters, 
  9179.  redirection symbols, and other commands (see below for the exception to this 
  9180.  rule). 
  9181.  
  9182.  If ECHO is ON, the comment is displayed.  Otherwise, it is ignored. If ECHO is 
  9183.  ON and you don't want to display the line, preface the REM command with an at 
  9184.  sign [@]. 
  9185.  
  9186.  You can use REM to create a zero-byte file if you use a redirection symbol 
  9187.  after the REM command.  No text is permitted between the REM command and the 
  9188.  redirection symbol.  For example, to create the zero-byte file C:\FOO : 
  9189.  
  9190.           [c:\] rem > foo
  9191.  
  9192.  (This capability is included for compatibility with CMD.EXE.  A simpler method 
  9193.  for creating a zero-byte file with 4OS2 is to enter  >filename as a command, 
  9194.  with no actual command before the [>] redirection character.) 
  9195.  
  9196.  
  9197. ΓòÉΓòÉΓòÉ 14.61. REN - Rename files or subdirectories ΓòÉΓòÉΓòÉ
  9198.  
  9199.  Purpose:    Rename files or subdirectories. 
  9200.  
  9201.  Format:     REN [/A:[[-]rhsda] /N /P /Q /S /T] old_name... new_name 
  9202.                 or 
  9203.              RENAME [/A:[[-]rhsda] /N /P /Q /S /T] old_name... new_name 
  9204.  
  9205.              old_name :  Original name of the file(s) or subdirectory. 
  9206.              new_name :  New name to use, or new path on the same drive. 
  9207.  
  9208.              /A:(ttribute select)            /Q(uiet) 
  9209.              /N(othing)                      /S(ubdirectory) 
  9210.              /P(rompt)                       /T(otal) 
  9211.  
  9212.  See also:  COPY and MOVE. 
  9213.  
  9214.  File Selection 
  9215.  
  9216.  Supports extended wildcards, ranges, multiple file names, and include lists. 
  9217.  
  9218.  Usage 
  9219.  
  9220.  REN and RENAME are synonyms.  You may use either one. 
  9221.  
  9222.  REN lets you change the name of a file or a subdirectory, or move one or more 
  9223.  files to a new subdirectory on the same drive.  (If you want to move files to 
  9224.  a different drive, use MOVE.) 
  9225.  
  9226.  In its simplest form, you simply give REN the old_name of an existing file or 
  9227.  subdirectory and then a new_name.  The new_name must not already exist -- you 
  9228.  can't give two files the same name (unless they are in different directories). 
  9229.  The first example renames the file MEMO.TXT to MEM.TXT.  The second example 
  9230.  changes the name of the \WORD directory to \WP : 
  9231.  
  9232.           [c:\] rename memo.txt mem.txt
  9233.           [c:\] rename \word \wp
  9234.  
  9235.  You can also use REN to rename a group of files that you specify with 
  9236.  wildcards, as multiple files, or in an include list.  When you do, the 
  9237.  new_name must use one or more wildcards to show what part of each filename to 
  9238.  change.  Both of the next two examples change the extensions of multiple files 
  9239.  to .SAV : 
  9240.  
  9241.           [c:\] ren config.sys autoexec.bat 4start.btm *.sav
  9242.           [c:\] ren *.txt *.sav
  9243.  
  9244.  REN can move files to a different subdirectory on the same drive. When it is 
  9245.  used for this purpose, REN requires one or more filenames for the old_name and 
  9246.  a directory name for the new_name : 
  9247.  
  9248.           [c:\] ren memo.txt \wp\memos\
  9249.           [c:\] ren oct.dat nov.dat \data\save\
  9250.  
  9251.  The final backslash in the last two examples is optional.  If you use it, you 
  9252.  force REN to recognize the last argument as the name of a directory, not a 
  9253.  file.  The advantage of this approach is that if you accidentally mistype the 
  9254.  directory name, REN will report an error instead of renaming your files in a 
  9255.  way that you didn't intend. 
  9256.  
  9257.  Finally, REN can move files to a new directory and change their name at the 
  9258.  same time if you specify both a path and file name for new_name.  In this 
  9259.  example, the files are renamed with an extension of .SAV as they are moved to 
  9260.  a new directory: 
  9261.  
  9262.           [c:\] ren *.dat \data\save\*.sav
  9263.  
  9264.  When new_name refers to a file or files (rather than a directory), the file(s) 
  9265.  must not already exist.  Also, you cannot rename a subdirectory to a new 
  9266.  location on the directory tree. 
  9267.  
  9268.  REN does not change a file's attributes.  The new_name file(s) will have the 
  9269.  same attributes as old_name. 
  9270.  
  9271.  Options 
  9272.  
  9273.     /A:     (Attribute select) Select only those files that have the specified 
  9274.             attribute(s) set.  Preceding the attribute character with a hyphen 
  9275.             [-] will select files that do not have that attribute set.  The 
  9276.             colon [:] after /A is required.  The attributes are: 
  9277.  
  9278.                            R  Read-only 
  9279.                            H  Hidden 
  9280.                            S  System 
  9281.                            D  Subdirectory 
  9282.                            A  Archive 
  9283.  
  9284.             If no attributes are listed at all (e.g., REN /A: ...), REN will 
  9285.             select all files and subdirectories including hidden and system 
  9286.             files.  If attributes are combined, all the specified attributes 
  9287.             must match for a file to be selected. For example, /A:RHS will 
  9288.             select only those files with all three attributes set. 
  9289.  
  9290.     /N:     (Nothing) Do everything except actually rename the file(s). This 
  9291.             option is useful for testing what a REN command will actually do. 
  9292.  
  9293.     /P:     (Prompt) Prompt the user to confirm each rename operation. Your 
  9294.             options at the prompt are explained in detail under Page and File 
  9295.             Prompts. 
  9296.  
  9297.     /Q:     (Quiet) Don't display filenames  or the number of files renamed. 
  9298.             This option is most often used in batch files.  See also /T. 
  9299.  
  9300.     /S:     (Subdirectory) Normally, you can rename a subdirectory only if you 
  9301.             do not use any wildcards in the new_name.  This prevents 
  9302.             subdirectories from being renamed inadvertently when a group of 
  9303.             files is being renamed with wildcards.  /S will let you rename a 
  9304.             subdirectory even when you use wildcards. 
  9305.  
  9306.     /T:     (Total) Don't display filenames as they are renamed, but report the 
  9307.             number of files renamed.  See also /Q. 
  9308.  
  9309.  
  9310. ΓòÉΓòÉΓòÉ 14.62. RETURN - Return from a subroutine in a batch file ΓòÉΓòÉΓòÉ
  9311.  
  9312.  Purpose:    Return from a GOSUB (subroutine) in a batch file. 
  9313.  
  9314.  Format:     RETURN 
  9315.  
  9316.  See also:  GOSUB. 
  9317.  
  9318.  Usage 
  9319.  
  9320.  4OS2 allows subroutines in batch files. 
  9321.  
  9322.  A subroutine begins with a label (a colon followed by a word) and ends with a 
  9323.  RETURN command. 
  9324.  
  9325.  The subroutine is invoked with a GOSUB command from another part of the batch 
  9326.  file.  When a RETURN command is encountered the subroutine terminates, and 
  9327.  execution of the batch file continues on the line following the original 
  9328.  GOSUB. 
  9329.  
  9330.  The following batch file fragment calls a subroutine which displays the files 
  9331.  in the current directory: 
  9332.  
  9333.           echo Calling a subroutine
  9334.           gosub subr1
  9335.           echo Returned from the subroutine
  9336.           quit
  9337.  
  9338.           :subr1
  9339.           dir /a/w
  9340.           return
  9341.  
  9342.  
  9343. ΓòÉΓòÉΓòÉ 14.63. SCREEN - Position the cursor and display text ΓòÉΓòÉΓòÉ
  9344.  
  9345.  Purpose:    Position the cursor on the screen and optionally display a 
  9346.              message. 
  9347.  
  9348.  Format:     SCREEN row column [text ] 
  9349.  
  9350.              row :  The new row location for the cursor. 
  9351.              column :  The new column location for the cursor. 
  9352.              text :  Optional text to display at the new cursor location. 
  9353.  
  9354.  See also:  ECHO, SCRPUT, TEXT, and VSCRPUT. 
  9355.  
  9356.  Usage 
  9357.  
  9358.  SCREEN allows you to create attractive screen displays in batch files.  You 
  9359.  use it to specify where a message will appear on the screen.  You can use 
  9360.  SCREEN to create menu displays, logos, etc. The following batch file fragment 
  9361.  displays a menu: 
  9362.  
  9363.           @echo off
  9364.           cls
  9365.           screen 3 10  Select a number from 1 to 4:
  9366.           screen 6 20  1 - Word Processing
  9367.           ...
  9368.  
  9369.  SCREEN does not change the screen colors.  To display text in specific colors, 
  9370.  use SCRPUT or VSCRPUT.  SCREEN always leaves the cursor at the end of the 
  9371.  displayed text. 
  9372.  
  9373.  The row and column values are zero-based, so on a standard 25 line by 80 
  9374.  column display, valid rows are 0 - 24 and valid columns are 0 - 79.  You can 
  9375.  also specify the row and column as offsets from the current cursor position. 
  9376.  Begin the value with a plus sign [+] to move the cursor down the specified 
  9377.  number of rows or to the right the specified number of columns, or with a 
  9378.  minus sign [-] to move the cursor up or to the left.  This example prints a 
  9379.  string 3 lines above the current position, in absolute column 10: 
  9380.  
  9381.           screen -3 10 Hello, World!
  9382.  
  9383.  SCREEN checks for a valid row and column, and displays a "Usage" error message 
  9384.  if either value is out of range. 
  9385.  
  9386.  
  9387. ΓòÉΓòÉΓòÉ 14.64. SCRPUT - Display text in color ΓòÉΓòÉΓòÉ
  9388.  
  9389.  Purpose:    Position text on the screen and display it in color. 
  9390.  
  9391.  Format:     SCRPUT row col [BRIght] [BLInk] fg ON [BRIght] bg text 
  9392.  
  9393.              row :  Starting row 
  9394.              col :  Starting column 
  9395.              fg :  Foreground character color 
  9396.              bg :  Background character color 
  9397.              text :  The text to display 
  9398.  
  9399.  See also:  CLS, ECHO, SCREEN, TEXT, and VSCRPUT. 
  9400.  
  9401.  Usage 
  9402.  
  9403.  SCRPUT allows you to create attractive screen displays in batch files.  You 
  9404.  use it to specify where a message will appear on the screen and what colors 
  9405.  will be used to display the message text. You can use SCRPUT to create menu 
  9406.  displays, logos, etc. 
  9407.  
  9408.  SCRPUT works like SCREEN, but allows you to specify the display colors.  It 
  9409.  writes directly to the screen and does not require ANSI support.  It always 
  9410.  leaves the cursor in its current position.  See Colors and Color Names for 
  9411.  details about colors and notes on the use of bright background colors. 
  9412.  
  9413.  The row and column are zero-based, so on a standard 25 line by 80 column 
  9414.  display, valid rows are 0 - 24 and valid columns are 0 - 79.  You can also 
  9415.  specify the row and column as offsets from the current cursor position.  Begin 
  9416.  the value with a plus sign [+] to move down the specified number of rows or to 
  9417.  the right the specified number of columns, or with a minus sign [-] to move up 
  9418.  or to the left. 
  9419.  
  9420.  The following batch file fragment displays part of a menu, in color: 
  9421.  
  9422.           cls white on blue
  9423.           scrput 6 20 bri red on blu 1 - Word Processing
  9424.           scrput 7 20 bri yel on blu 2 - Spreadsheet
  9425.           ...
  9426.  
  9427.  
  9428. ΓòÉΓòÉΓòÉ 14.65. SELECT - Select files for a command ΓòÉΓòÉΓòÉ
  9429.  
  9430.  Purpose:    Interactively select files for a command. 
  9431.  
  9432.  Format:     SELECT [/A[:][-][rhsda] /D /E /H /I"text" /O[:][-]adeginrsu /Z] 
  9433.              [command ] ... (files...)... 
  9434.  
  9435.              command :  The command to execute with the selected files. 
  9436.              files :  The files from which to select.  File names may be 
  9437.              enclosed in either parentheses or square brackets.  The difference 
  9438.              is explained below. 
  9439.  
  9440.              /A(ttribute select)             /I (match descriptions) 
  9441.              /D(isable color coding)         /O(rder) 
  9442.              /E (use upper case)             /Z (use FAT format) 
  9443.              /H(ide dots) 
  9444.  
  9445.  File Selection 
  9446.  
  9447.  Supports extended wildcards, ranges, multiple file names, and include lists. 
  9448.  Date, time, or size ranges must appear immediately after the SELECT keyword. 
  9449.  
  9450.  Usage 
  9451.  
  9452.  SELECT allows you to select files for internal and external commands by using 
  9453.  a full-screen "point and shoot" display.  You can have SELECT execute a 
  9454.  command once for each file you select, or have it create a list of files for a 
  9455.  command to work with.  The command can be an internal command, an alias, an 
  9456.  external command, or a batch file. 
  9457.  
  9458.  If you use parentheses around the files, SELECT executes the command once for 
  9459.  each file you have selected.  During each execution, one of the selected files 
  9460.  is passed to the command as an argument.  If you use square brackets around 
  9461.  files, the SELECTed files are combined into a single list, separated by 
  9462.  spaces.  The command is then executed once with the entire list presented as 
  9463.  its command-line arguments. 
  9464.  
  9465.  SELECT uses the cursor up, cursor down, PgUp, and PgDn keys to scroll through 
  9466.  the file list.  Use the + key or the spacebar to select a file (or unselect a 
  9467.  marked file), and the - key to unselect a file.  The * key will reverse all of 
  9468.  the current marks (excluding subdirectories), and the / key will unmark 
  9469.  everything.  After marking the files, press Enter to execute the command. 
  9470.  
  9471.  Press the L key to view the current highlighted file with LIST.  When you exit 
  9472.  from LIST, the SELECT screen will be restored. 
  9473.  
  9474.  You can select a single file by moving the scroll bar to the filename and 
  9475.  pressing Enter without marking any other files. 
  9476.  
  9477.  To skip the files listed in the current display and go on to the next file 
  9478.  specification inside the parentheses or brackets (if any), press the Esc key. 
  9479.  To cancel the current SELECT command entirely, press Ctrl-C or Ctrl-Break. 
  9480.  
  9481.  On HPFS drives, SELECT will use the standard long name display format with the 
  9482.  filename at the right-hand side of the display.  File descriptions are not 
  9483.  displayed in this format.  To switch to the more traditional FAT (short name) 
  9484.  format, and display the file descriptions, use the /Z switch. 
  9485.  
  9486.  In the simplest form of SELECT, you merely specify the command and then the 
  9487.  list of files from which you will make your selection(s). For example: 
  9488.  
  9489.           [c:\] select copy (*.com *.exe) a:\
  9490.  
  9491.  will let you select from among the .COM and .EXE files on the current drive. 
  9492.  It will then invoke the COPY command to copy each file you select to drive A:. 
  9493.  You will be able to select first from a list of all .COM files in the current 
  9494.  directory, and then from a list of all .EXE files. 
  9495.  
  9496.  If you want to select from a list of all the .COM and .EXE files mixed 
  9497.  together, create an include list inside the parentheses by inserting a 
  9498.  semicolon: 
  9499.  
  9500.           [c:\] select copy (*.com;*.exe) a:\
  9501.  
  9502.  Finally, if you want the SELECT command to send a single list of files to 
  9503.  COPY, instead of invoking COPY once for each file you select, put the file 
  9504.  names in square brackets instead of parentheses: 
  9505.  
  9506.           [c:\] select copy [*.com;*.exe] a:\
  9507.  
  9508.  If you use brackets, you have to be sure that the resulting command (the word 
  9509.  COPY, the list of files, and the destination drive in this example) is no more 
  9510.  than 1,023 characters long.  The current line length is displayed by SELECT 
  9511.  while you are marking files to help you to conform to this limit. 
  9512.  
  9513.  The parentheses or brackets enclosing the file name(s) can appear anywhere 
  9514.  within the command; SELECT assumes that the first set of parentheses or 
  9515.  brackets it finds is the one containing the list of files from which you wish 
  9516.  to make your selection. 
  9517.  
  9518.  The list of files from which you wish to select can be further refined by 
  9519.  using date, time, and size ranges.  The range must be placed immediately after 
  9520.  the word SELECT.  If the command is an internal command that supports ranges, 
  9521.  an independent range can also be used in the command itself. 
  9522.  
  9523.  If you don't specify a command, the selected filename(s) will become the 
  9524.  command.  For example, this command defines an alias called UTILS that selects 
  9525.  from the executable files in the directory C:\UTIL, and then executes them in 
  9526.  the order marked: 
  9527.  
  9528.           [c:\] alias utils select (c:\util\*.com;*.exe;*.btm;*.bat)
  9529.  
  9530.  If you want to use filename completion to enter the filenames inside the 
  9531.  parentheses, type a space after the opening parenthesis.  Otherwise the 
  9532.  command-line editor will treat the open parenthesis as the first character of 
  9533.  the filename. 
  9534.  
  9535.  You can set the default colors used by SELECT with the SelectColors and 
  9536.  SelectStatBarColors directives in the .INI file.  If SelectColors is not used, 
  9537.  the SELECT display will use the current default colors.  If 
  9538.  SelectStatBarColors is not used, the status bar will use the reverse of the 
  9539.  SELECT display colors. 
  9540.  
  9541.  You can display the filenames in color by setting the COLORDIR environment 
  9542.  variable or using the ColorDir directive in your .INI file.  See Color-Coded 
  9543.  Directories for details.  To disable directory color coding within SELECT, use 
  9544.  the /D option. 
  9545.  
  9546.  When displaying descriptions, SELECT adds a right arrow at the end of the line 
  9547.  if the description is too long to fit on the screen.  This symbol will alert 
  9548.  you to the existence of additional description text.  You can use the left and 
  9549.  right arrow keys to scroll the screen horizontally and view the additional 
  9550.  text. 
  9551.  
  9552.  With the /I option, you can select files based on their descriptions.  SELECT 
  9553.  will display files if their description matches the text after the /I switch. 
  9554.  The search is not case sensitive.  You can use wildcards and extended wild 
  9555.  cards as part of the text. 
  9556.  
  9557.  When sorting file names and extensions for the SELECT display, 4OS2 normally 
  9558.  assumes that sequences of digits should be sorted numerically (for example, 
  9559.  the file DRAW2 would come before DRAW03 because 2 is numerically smaller than 
  9560.  03), rather than strictly alphabetically (where DRAW2 would come second 
  9561.  because "2" comes after "0").  You can defeat this behavior and force a strict 
  9562.  alphabetic sort with the /O:a option. 
  9563.  
  9564.  Options 
  9565.  
  9566.     /A:     (Attribute select) Select only those files that have the specified 
  9567.             attribute(s) set.  Preceding the attribute character with a hyphen 
  9568.             [-] will select files that do not have that attribute set.  The 
  9569.             colon [:] after /A is optional.  The attributes are: 
  9570.  
  9571.               R  Read-only 
  9572.               H  Hidden 
  9573.               S  System 
  9574.               D  Subdirectory 
  9575.               A  Archive 
  9576.  
  9577.             If no attributes are listed at all (e.g., SELECT /A ...), SELECT 
  9578.             will display all files and subdirectories including hidden and 
  9579.             system files. If attributes are combined, all the specified 
  9580.             attributes must match for a file to be included in the listing. 
  9581.             For example, /A:RHS will display only those files with all three 
  9582.             attributes set. 
  9583.  
  9584.     /D:     (Disable color coding)  Temporarily turn off directory color coding 
  9585.             within SELECT. 
  9586.  
  9587.     /E      (use upper case)  Display filenames in the traditional upper case 
  9588.             format; also see SETDOS /U and the UpperCase  directive in the .INI 
  9589.             file. 
  9590.  
  9591.     /H      (Hide dots)  Suppress the display of the "." and ".." directories 
  9592.  
  9593.     /I      (match descriptions)  Display filenames by matching text in their 
  9594.             descriptions.  The text can include wild cards and extended 
  9595.             wildcards.  The search text must be enclosed in quotation marks. 
  9596.  
  9597.     /O:     (Order)  Set the sort order for the files.  The order can be any 
  9598.             combination of the following options: 
  9599.  
  9600.               -  Reverse the sort order for the next option 
  9601.               a  Sort in ASCII order, not numerically, when there are digits in 
  9602.             the name 
  9603.               d  Sort by date and time (oldest first); for HPFS drives also see 
  9604.             /T 
  9605.               e  Sort by extension 
  9606.               g  Group subdirectories first, then files 
  9607.               i  Sort by file description 
  9608.               n  Sort by filename (this is the default) 
  9609.               r  Reverse the sort order for all options 
  9610.               s  Sort by size 
  9611.               u  Unsorted 
  9612.  
  9613.     /Z      Display HPFS filenames in FAT format.  Long names will be truncated 
  9614.             to 12 characters.  If the name is longer than 12 characters, it 
  9615.             will be followed by a right arrow to show that one or more 
  9616.             characters have been truncated. 
  9617.  
  9618.  
  9619. ΓòÉΓòÉΓòÉ 14.66. SET - Create or modify environment variables ΓòÉΓòÉΓòÉ
  9620.  
  9621.  Purpose:    Display, create, modify, or delete environment variables. 
  9622.  
  9623.  Format:     SET [/P /R filename...] [name [=][value ]] 
  9624.  
  9625.              filename :  The name of a file containing variable definitions. 
  9626.              name :  The name of the environment variable to define or modify. 
  9627.              value :  The new value for the variable. 
  9628.  
  9629.              /P(ause)                        /R(ead from file) 
  9630.  
  9631.  See also:  ESET and UNSET. 
  9632.  
  9633.  Usage 
  9634.  
  9635.  Every program and command inherits an environment, which is a list of variable 
  9636.  names, each of which is followed by an equal sign and some text.  Many 
  9637.  programs use entries in the environment to modify their own actions. 
  9638.  
  9639.  If you simply type the SET command with no options or arguments, it will 
  9640.  display all the names and values currently stored in the environment. 
  9641.  Typically, you will see an entry called COMSPEC, an entry called PATH, an 
  9642.  entry called CMDLINE, and whatever other environment variables you and your 
  9643.  programs have established: 
  9644.  
  9645.           [c:\] set
  9646.           COMSPEC=C:\4OS2\$OS2.EXE
  9647.           PATH=C:\;C:\OS2;C:\OS2\SYSTEM;C:\UTIL
  9648.           CMDLINE=C:\4OS2\4START.CMD
  9649.  
  9650.  To add a variable to the environment, type SET, a space, the variable name, an 
  9651.  equal sign, and the text: 
  9652.  
  9653.           [c:\] set mine=c:\finance\myfiles
  9654.  
  9655.  The variable name is converted to upper case by 4OS2.  The text after the 
  9656.  equal sign will be left just as you entered it.  If the variable already 
  9657.  exists, its value will be replaced with the new text that you entered. 
  9658.  
  9659.  Normally you should not put a space on either side of the equal sign.  A space 
  9660.  before the equal sign will become part of the name ; a space after the equal 
  9661.  sign will become part of the value. 
  9662.  
  9663.  If you use SET to create a variable with the same name as one of the 4OS2 
  9664.  internal variables, you will disable the internal variable.  If you later 
  9665.  execute a batch file or alias that depends on that internal variable, it may 
  9666.  not operate correctly. 
  9667.  
  9668.  To display the contents of a single variable, type SET plus the variable name: 
  9669.  
  9670.           [c:\] set mine
  9671.  
  9672.  You can edit environment variables with the ESET command.  To remove variables 
  9673.  from the environment, use UNSET, or type SET plus a variable name and an equal 
  9674.  sign: 
  9675.  
  9676.           [c:\] set mine=
  9677.  
  9678.  The variable name is limited to a maximum of 80 characters. The name and value 
  9679.  together cannot be longer than 1,023 characters. 
  9680.  
  9681.  In 4OS2 the size of the environment is set automatically, and increased as 
  9682.  necessary as you add variables. 
  9683.  
  9684.  4OS2 automatically supports the special O/2 BeginLibPath and EndLibPath 
  9685.  variables.  See your OS/2 documentation for details on these variables. 
  9686.  
  9687.  Options 
  9688.  
  9689.     /P:     (Pause) Wait for a key to be pressed after each screen page before 
  9690.             continuing the display.  Your options at the prompt are explained 
  9691.             in detail under Page and File Prompts. 
  9692.  
  9693.     /R:     (Read) Read environment variables from a file.  This is much faster 
  9694.             than loading variables from a batch file with multiple SET 
  9695.             commands.  Each entry in the file must fit within the 1,023-byte 
  9696.             command-line length limit for 4OS2:  The file is in the same format 
  9697.             as the SET display, so SET /R can accept as input a file generated 
  9698.             by redirecting SET output.  For example, the following commands 
  9699.             will save the environment variables to a file, and then reload them 
  9700.             from that file: 
  9701.  
  9702.                                 set > varlist
  9703.                                 set /r varlist
  9704.  
  9705.             You can load variables from multiple files by listing the filenames 
  9706.             individually after the /R. You can add comments to a variable file 
  9707.             by starting the comment line with a colon [:]. 
  9708.  
  9709.             If you are creating a SET /R file by hand, and need to create an 
  9710.             entry that spans multiple lines in the file, you can do so by 
  9711.             terminating each line, except the last, with an escape character. 
  9712.             However, you cannot use this method to exceed the command-line 
  9713.             length limit. 
  9714.  
  9715.  
  9716. ΓòÉΓòÉΓòÉ 14.67. SETDOS - Set the 4OS2 configuration ΓòÉΓòÉΓòÉ
  9717.  
  9718.  Purpose:    Display or set the 4OS2 configuration. 
  9719.  
  9720.  Format:     SETDOS [/B? /C? /D /E? /Fn.n /I+|- command /L? /M? /N? /P? /R? 
  9721.              /S?:? /U? /V? /X[+|-]n /Y?] 
  9722.  
  9723.              /B(right background)            /N(o clobber) 
  9724.              /C(ompound)                     /P(arameter character) 
  9725.              /D(escriptions)                 /R(ows) 
  9726.              /E(scape character)             /S(hape of cursor) 
  9727.              /F(ormat for @EVAL)             /U(pper case) 
  9728.              /I(nternal commands)            /V(erbose) 
  9729.              /L(ine)                         /X (expansion, special characters) 
  9730.              /M(ode for editing)             /Y (single step) 
  9731.  
  9732.  Usage 
  9733.  
  9734.  SETDOS allows you to customize certain aspects of 4OS2 to suit your personal 
  9735.  tastes or the configuration of your system.  Each of these options is 
  9736.  described below. 
  9737.  
  9738.  You can display the value of all SETDOS options by entering the SETDOS command 
  9739.  with no parameters. 
  9740.  
  9741.  Most of the SETDOS options can be initialized when 4OS2 executes the 
  9742.  configuration directives in the .INI file. The name of the corresponding 
  9743.  directive is listed with each option below; if none is listed, that option 
  9744.  cannot be set from the .INI file.  You can also define the SETDOS options in 
  9745.  your AUTOEXEC.BAT, 4START, or other startup file (see Automatic Batch Files), 
  9746.  in aliases, or at the command line. 
  9747.  
  9748.  Secondary shells automatically inherit most configuration settings currently 
  9749.  in effect in the previous shell.  If values have been changed by SETDOS since 
  9750.  4OS2 started, the new values will be passed to the secondary shell. 
  9751.  
  9752.  SETDOS /I settings are not inherited by secondary shells.  If you want to use 
  9753.  SETDOS /I- to disable commands in all shells, place the SETDOS command(s) in 
  9754.  your 4START file, which is executed when any shell starts. 
  9755.  
  9756.  Options 
  9757.  
  9758.     /B:     (Bright background) The BRIGHTBG option determines whether 4OS2 
  9759.             configures your video adapter for blinking text (/B0, the default) 
  9760.             or bright background colors (/B1). /B2 will prevent 4OS2 from 
  9761.             adjusting the bright / blink status. See Colors and Color Names for 
  9762.             a detailed discussion of this option.  Also see the BrightBG 
  9763.             directive. 
  9764.  
  9765.     /C:     (Compound character) The COMPOUND option sets the character used 
  9766.             for separating multiple commands on the same line.  The default is 
  9767.             the ampersand [&]. You cannot use any of the redirection characters 
  9768.             (| > <), or the blank, tab, comma, or equal sign as the command 
  9769.             separator.  This example changes the COMPOUND character to a tilde 
  9770.             [~]: 
  9771.  
  9772.                                 [c:\] setdos /c~
  9773.  
  9774.             If you want to share batch files or aliases between 4DOS and 4OS2 
  9775.             or 4DOS/NT, see the %+ variable, which retrieves the current 
  9776.             command separator, and 4DOS, 4OS2, and 4DOS/NT Compatibility for 
  9777.             details on using compatible command separators for all the products 
  9778.             you use.  Also see the CommandSep directive. 
  9779.  
  9780.     /D:     (Descriptions) The DESCRIPTIONS option controls whether file 
  9781.             processing commands like COPY, DEL, MOVE, and REN process file 
  9782.             descriptions along with the files they belong to.  /D1 turns 
  9783.             description processing on, which is the default.  /D0 turns 
  9784.             description processing off.  Also see the Descriptions directive. 
  9785.             You can also use /D to change the description file name, by placing 
  9786.             the new name (rather than a "0" or "1"), in double quotes, 
  9787.             immediately after the /D.  Use this option with caution, because 
  9788.             changing the name from the default will make it difficult to 
  9789.             transfer file descriptions to another system.  Also see the 
  9790.             DescriptionName directive. 
  9791.  
  9792.  
  9793.     /E:     (Escape character) The ESCAPE option sets the character used to 
  9794.             suppress the normal meaning of the following character.  Any 
  9795.             character following the escape character will be passed unmodified 
  9796.             to the command.  The default escape character is a caret [^]. You 
  9797.             cannot use any of the redirection characters (| > <) or the blank, 
  9798.             tab, comma, or equal sign as the escape character. Certain 
  9799.             characters (b, c, e, f, n, r, s, and t) have special meanings when 
  9800.             immediately preceded by the escape character. 
  9801.  
  9802.             If you want to share batch files or aliases between 4DOS and 4OS2 
  9803.             or 4DOS/NT, see the %= variable, which retrieves the current escape 
  9804.             character, and 4DOS, 4OS2, and 4DOS/NT Compatibility for details on 
  9805.             using compatible escape characters for all the products you use. 
  9806.             Also see the EscapeChar directive. 
  9807.  
  9808.     /F:     (Format for @EVAL) The FORMAT option lets you set default decimal 
  9809.             precision for the @EVAL variable function. The maximum precision is 
  9810.             16 digits to the left of the decimal point and 8 digits to the 
  9811.             right of the decimal point.  By default, the minimum precision to 
  9812.             the right of the decimal point is 0.  The general form of this 
  9813.             option is /Fx.y, where x sets the minimum number of digits to the 
  9814.             right of the decimal place and y sets the maximum number of digits. 
  9815.             Both values can range from 0 to 8; if x is greater than x, it is 
  9816.             ignored.  You can specify either or both values, for example /F2.5, 
  9817.             /F2, and /F.5 are all valid entries. 
  9818.  
  9819.             See @EVAL if you want to set the precision for a single 
  9820.             computation. 
  9821.  
  9822.             Also see the EvalMax and EvalMin directives. 
  9823.     /I:     (Internal) The INTERNAL option allows you to disable or enable 
  9824.             internal commands.  To disable a command, precede the command name 
  9825.             with a minus [-].  To re-enable a command, precede it with a plus 
  9826.             [+]. For example, to disable the internal LIST command to force 
  9827.             4OS2 to use an external command: 
  9828.  
  9829.                                 [c:\] setdos /i-list
  9830.  
  9831.     /L:     (Line) The LINE option controls how 4OS2 gets its input from the 
  9832.             command line.  /L0 tells 4OS2 to use character input (the default). 
  9833.             /L1 tells it to use line input (like CMD.EXE ).  /L1 will disable 
  9834.             command-line editing, history recall, filename completion, and the 
  9835.             directory history window, and will reduce the 4OS2 input length 
  9836.             limit from 1023 characters to 255 characters.  It should only be 
  9837.             used if it is needed for compatibility with a specific program.  If 
  9838.             you have a program that requires line input, you can use the 
  9839.             following line in an alias or batch file to change the line input 
  9840.             option just for that single program (change the command separator 
  9841.             to an ampersand [&] for 4OS2): 
  9842.  
  9843.                                 setdos /L1 & program %& & setdos /L0
  9844.  
  9845.             See README.DOC for information on programs which require this 
  9846.             option.  Also see the LineInput directive. 
  9847.  
  9848.     /M:     (Mode) The MODE option controls the initial line editing mode.  To 
  9849.             start in overstrike mode at the beginning of each command line, use 
  9850.             /M0 (the default).  To start in insert mode, use /M1.  Also see the 
  9851.             EditMode directive. 
  9852.  
  9853.     /N:     (No clobber) The NOCLOBBER option controls output redirection). 
  9854.             /N0 means existing files will be overwritten by output redirection 
  9855.             (with >) and that appending (with >>) does not require the file to 
  9856.             exist already.  This is the default.  /N1 means existing files may 
  9857.             not be overwritten by output redirection, and that when appending 
  9858.             the output file must exist.  A /N1 setting can be overridden with 
  9859.             the [!] character.  If you use /N1, you may have problems with a 
  9860.             few unusual programs that shell out to run a command with 
  9861.             redirection, and expect to be able to overwrite an existing file. 
  9862.             Also see the NoClobber directive. 
  9863.  
  9864.     /P:     (Parameter character) This option sets the character used after a 
  9865.             percent sign to specify all or all remaining command-line arguments 
  9866.             in a batch file or alias (e.g., %& or %n&; . The default is the 
  9867.             dollar sign [$]. 
  9868.  
  9869.             If you want to share batch files or aliases between 4DOS and 4OS2 
  9870.             or 4DOS/NT, see 4DOS, 4OS2, and 4DOS/NT Compatibility for details 
  9871.             on selecting compatible parameter characters for all the products 
  9872.             you use.  Also see the ParameterChar directive. 
  9873.  
  9874.     /R:     (Rows) The ROWS option sets the number of screen rows used by the 
  9875.             video display.  Normally 4OS2 detects the screen size, but if you 
  9876.             have a non-standard display you may need to set it explicitly. 
  9877.             This option does not affect screen scrolling (which is controlled 
  9878.             by your video driver).  It is used only for LIST, SELECT, the paged 
  9879.             output options (i.e., TYPE /P), and error checking in the screen 
  9880.             output commands.  Also see the ScreenRows directive. 
  9881.  
  9882.     /S:     (Shape) The SHAPE option sets the cursor shape.  The format is 
  9883.             /So:i where o is the cursor size for overstrike mode, i the cursor 
  9884.             size for insert mode.  The size is entered as a percentage of the 
  9885.             total character height.  The default values are 10:100 (an 
  9886.             underscore cursor for overstrike mode, and a block cursor for 
  9887.             insert mode).  Because of the way video drivers remap the cursor 
  9888.             shape, you may not get a smooth progression in the cursor size from 
  9889.             0% - 100%.  To disable the cursor, enter /S0:0.  If either value is 
  9890.             -1, 4OS2 will not attempt to modify the cursor shape at all.  You 
  9891.             can use this feature to give another program full control of the 
  9892.             cursor shape. Also see the CursorOver and CursorIns directives. 
  9893.  
  9894.     /U:     (Upper) The UPPER option controls the default case ( upper or 
  9895.             lower) for file and directory names displayed by internal commands 
  9896.             like COPY and DIR.  /U0 displays file names in lower case (the 
  9897.             default).  /U1 displays file names in the traditional upper case. 
  9898.             The /U setting is ignored for HPFS filenames.  HPFS names are 
  9899.             always displayed in the case in which they are stored. Also see the 
  9900.             UpperCase directive. 
  9901.  
  9902.     /V:     (Verbose) The VERBOSE option controls the default for command 
  9903.             echoing in batch files.  /V0 disables echoing of batch file 
  9904.             commands unless ECHO is explicitly set ON.  /V1, the default 
  9905.             setting, enables echoing of batch file commands unless ECHO is 
  9906.             explicitly set OFF.  Also see the BatchEcho directive. 
  9907.  
  9908.             /V2 forces echoing of all batch file commands, even if ECHO is set 
  9909.             OFF or the line begins with an "@".  This allows you to turn 
  9910.             echoing on for a batch file without editing the batch file and 
  9911.             removing the ECHO OFF command(s) within it.  /V2 is intended for 
  9912.             debugging, and can be set with SETDOS, but not with the BatchEcho 
  9913.             directive in 4OS2.INI. 
  9914.  
  9915.     /X[+|-]n(eXpansion and special characters): This option enables and 
  9916.             disables alias and environment variable expansion, and controls 
  9917.             whether special characters have their usual meaning or are treated 
  9918.             as text.  It is most often used in batch files to process text 
  9919.             strings which may contain special characters. 
  9920.  
  9921.             The features enabled or disabled by /X are numbered.  All features 
  9922.             are enabled when 4OS2 starts, and you can re-enable all features at 
  9923.             any time by using /X0.  To disable a particular feature, use /X-n, 
  9924.             where n is the feature number from the list below.  To re-enable 
  9925.             the feature, use /X+n.  To enable or disable multiple individual 
  9926.             features, list their numbers in sequence after the + or - (e.g. /X- 
  9927.             345 to disable features 3, 4, and 5). 
  9928.  
  9929.             The features are: 
  9930.  
  9931.               1  All alias expansion. 
  9932.               2  Nested alias expansion only. 
  9933.               3  All variable expansion (environment variables and batch and 
  9934.             alias parameters) 
  9935.               4  Nested variable expansion only. 
  9936.               5  Multiple commands, conditional commands, and piping 
  9937.               6  Redirection 
  9938.               7  Quoting (double quotes and back quotes) and square brackets 
  9939.               8  Escape character. 
  9940.  
  9941.             If nested alias expansion is disabled, the first alias of a command 
  9942.             is expanded but any aliases it invokes are not expanded.  If nested 
  9943.             variable expansion is disabled, each variable is expanded once, but 
  9944.             variables containing the names of other variables are not expanded 
  9945.             further. 
  9946.  
  9947.             For example, to disable all features except alias expansion while 
  9948.             you are processing a text file containing special characters: 
  9949.  
  9950.                                 setdos /x-35678
  9951.                                 ... [perform text processing here]
  9952.                                 setdos /x0
  9953.  
  9954.     /Y:     (Single step) /Y1 enables single-stepping through a batch file. 
  9955.             Each command is displayed on the screen along with a Y/N/R (yes / 
  9956.             no / remainder) prompt.  Press Y to execute the command, N to omit 
  9957.             the command and go on to the next, or R or Esc to execute the 
  9958.             remainder of the batch file (up to the next SETDOS /Y1 command). 
  9959.             You may also press Ctrl-C or Ctrl-Break to terminate the batch 
  9960.             file. 
  9961.  
  9962.             Batch file single stepping is disabled each time 4OS2 returns to 
  9963.             the command prompt. This means you cannot enter the SETDOS /Y1 
  9964.             command at the prompt, press Enter, and start a batch file in 
  9965.             single step mode at the next prompt.  However you can enable single 
  9966.             step operation and run a batch file from the prompt if you enter 
  9967.             both commands on one line. For example, this command runs 
  9968.             FILECOMP.CMD with single step enabled: 
  9969.  
  9970.                                 [c:\] setdos /y1 & filecomp.cmd
  9971.  
  9972.  
  9973. ΓòÉΓòÉΓòÉ 14.68. SETLOCAL - Save the environment ΓòÉΓòÉΓòÉ
  9974.  
  9975.  Purpose:    Save a copy of the current disk drive, directory, environment, and 
  9976.              alias list. 
  9977.  
  9978.  Format:     SETLOCAL 
  9979.  
  9980.  See also:  ENDLOCAL. 
  9981.  
  9982.  Usage 
  9983.  
  9984.  SETLOCAL is used in batch files to save the default disk drive and directory, 
  9985.  the environment, and the alias list to a reserved block of memory.  You can 
  9986.  then change their values and later restore the original values with the 
  9987.  ENDLOCAL command. 
  9988.  
  9989.  For example, this batch file fragment saves everything, removes all aliases so 
  9990.  that user aliases will not affect batch file commands, changes the disk and 
  9991.  directory, modifies a variable, runs a program, and then restores the original 
  9992.  values: 
  9993.  
  9994.           setlocal
  9995.           unalias *
  9996.           cdd d:\test
  9997.           set path=c:\;c:\dos;c:\util
  9998.           rem run some program here
  9999.           endlocal
  10000.  
  10001.  SETLOCAL and ENDLOCAL are not nestable within a batch file. However, you can 
  10002.  have multiple SETLOCAL / ENDLOCAL pairs within a batch file, and nested batch 
  10003.  files can each have their own SETLOCAL / ENDLOCAL.  You cannot use SETLOCAL in 
  10004.  an alias or at the command line. 
  10005.  
  10006.  An ENDLOCAL is performed automatically at the end of a batch file if you 
  10007.  forget to do so.  If you invoke one batch file from another without using 
  10008.  CALL, the first batch file is terminated, and an automatic ENDLOCAL is 
  10009.  performed.  The second batch file inherits the drive, directory, aliases, and 
  10010.  environment variables as they were prior to any unterminated SETLOCAL. 
  10011.  
  10012.  
  10013. ΓòÉΓòÉΓòÉ 14.69. SHIFT - Shift batch file parameters ΓòÉΓòÉΓòÉ
  10014.  
  10015.  Purpose:    Allows the use of more than 127 parameters in a batch file. 
  10016.  
  10017.  Format:     SHIFT [n ] 
  10018.  
  10019.              n :  Number of positions to shift. 
  10020.  
  10021.  Usage 
  10022.  
  10023.  SHIFT is provided for compatibility with older batch files, where it was used 
  10024.  to access more than 10 parameters.  4OS2 supports 128 parameters (%0 to %127), 
  10025.  so you may not need to use SHIFT for batch files running exclusively under JP 
  10026.  Software command processors. 
  10027.  
  10028.  SHIFT moves each of the batch file parameters n positions to the left.  The 
  10029.  default value for n is 1.  SHIFT 1 moves the parameter in %1 to position %0, 
  10030.  the parameter in %2 becomes %1, etc.  You can reverse a SHIFT by giving a 
  10031.  negative value for n (i.e., after SHIFT -1, the former %0 is restored, %0 
  10032.  becomes %1, %1 becomes %2, etc.). 
  10033.  
  10034.  SHIFT also affects the parameters %n$. (command-line tail) and %# (number of 
  10035.  command arguments). 
  10036.  
  10037.  
  10038. ΓòÉΓòÉΓòÉ 14.70. START - Start a program in another session ΓòÉΓòÉΓòÉ
  10039.  
  10040.  Purpose:    Start a program in another session or window. 
  10041.  
  10042.  Format:     START ["program title "] [/B[G] /C /DOS[=optfile ] /F[G] /FS /I 
  10043.              /ICON=iconfile /INV /K /L /LA /LH /MAX /MIN /N /PGM progname /PM 
  10044.              /POS=row,col,width,height /WAIT /WIN /WIN3[=optfile ] 
  10045.              /WIN3S[=optfile ]] [command ] 
  10046.  
  10047.              program title :  Title to appear on title bar. 
  10048.              optfile :  Option settings file. 
  10049.              iconfile :  Name of icon (.ICO ) file. 
  10050.              progname :  Program name (not the session name). 
  10051.              path :  Startup directory. 
  10052.              command :  Command to be executed. 
  10053.  
  10054.              /B[G] (background session)      /LH (local history list) 
  10055.              /C(lose when done)              /MAX(imized) 
  10056.              /DOS (DOS session)              /MIN(imized) 
  10057.              /F[G] (foreground session)      /N(o 4OS2.EXE ) 
  10058.              /FS (full screen)               /PGM (program name) 
  10059.              /I(nherit environment)          /PM (PM application) 
  10060.              /ICON (.ICO file)               /POS(ition of window) 
  10061.              /INV(isible)                    /WAIT (for session to finish) 
  10062.              /K(eep when done)               /WIN(dowed session) 
  10063.              /L(ocal lists)                  /WIN3 (Windows enhanced mode) 
  10064.              /LA (local aliases)             /WIN3S (Windows standard mode) 
  10065.              /LD (local dir history) 
  10066.  
  10067.  See also:  DETACH. 
  10068.  
  10069.  Usage 
  10070.  
  10071.  START is used to begin a new OS/2 session, and optionally run a program in 
  10072.  that session.  If you use START with no parameters, it will begin a new 
  10073.  command-line session.  If you add a command, START will begin a new session or 
  10074.  window and execute that command. 
  10075.  
  10076.  The program title, if it is included, will appear on the title bar, and on the 
  10077.  Presentation Manager task list (OS/2 version 1.x) or window list (OS/2 version 
  10078.  2.x).  The program title must be enclosed in quotation marks and cannot exceed 
  10079.  60 characters.  If the program title is omitted, the program name will be used 
  10080.  as the title. 
  10081.  
  10082.  START offers a large number of switches to control the session you start.  In 
  10083.  most cases you need only a few switches to accomplish what you want.  The list 
  10084.  below summarizes the most commonly used START options, and how you can use 
  10085.  them to control the way a session is started: 
  10086.  
  10087.         /MAX, /MIN, and /POS allow you to start a character-mode windowed 
  10088.         session in a maximized window, a minimized window, or a window with a 
  10089.         specified position and size.  The default is to let the operating 
  10090.         environment choose the position and size of the window. 
  10091.  
  10092.         /C allows you to close the session when the command is finished (the 
  10093.         default for DOS and OS/2 Presentation Manager sessions); /K allows you 
  10094.         to keep the session open and go to a prompt (the default for OS/2 
  10095.         character mode sessions). 
  10096.  
  10097.         /BG and /FG allow you to start the session in the background(does not 
  10098.         respond to keystrokes until selected) or foreground (responds to 
  10099.         keystrokes until deselected).  /FG is the default if /DOS, /FS, /WIN, 
  10100.         or /PM is used; otherwise, /BG is the default. 
  10101.  
  10102.         /FS and /WIN control whether a character-mode session is started in 
  10103.         full-screen or windowed mode.  The default is to start a session of the 
  10104.         same type as the current session, if the application can be run in such 
  10105.         a session. 
  10106.  
  10107.  START determines the application type automatically and starts the session in 
  10108.  the appropriate mode:  OS/2, Windows, DOS, full-screen, windowed, or 
  10109.  Presentation Manager. 
  10110.  
  10111.  START gives you some flexibility in determining the session mode. For example, 
  10112.  if the command is the name of a batch file (either a .BTM or .CMD file), you 
  10113.  can use the /FS or /WIN options to run the batch file as part of a new 4OS2 
  10114.  session in either full-screen or windowed mode. 
  10115.  
  10116.  However, you cannot start a session in a mode that is inappropriate for the 
  10117.  application type.  A DOS application cannot be run as part of a Presentation 
  10118.  Manager session, for example, even if you use the /PM switch.  Invalid or 
  10119.  conflicting options will be ignored. 4OS2 will always attempt to run the 
  10120.  command in the appropriate type of session. 
  10121.  
  10122.  If the program is a DOS application or .BAT file, 4OS2 will return an error 
  10123.  message in OS/2 version 1.x.  In OS/2 version 2.x, 4OS2 will start a new DOS 
  10124.  session to run the program or batch file. The DOS session will close itself 
  10125.  automatically as soon as the program or batch file ends, unless /K is used. 
  10126.  If you want the session to wait for a keystroke before it closes itself, you 
  10127.  can use the syntax: 
  10128.  
  10129.           [c:\] start /DOS command ^^ pause
  10130.  
  10131.  (Because the caret [^] is the default 4OS2 escape character, two carets must 
  10132.  be used in order to pass one on to 4DOS as a command separator.) 
  10133.  
  10134.  If you want to start a DOS command-line session in OS/2 version 2.x, you can 
  10135.  use the command: 
  10136.  
  10137.           [c:\] start /DOS
  10138.  
  10139.  You can specify settings for DOS and Windows sessions by using a settings 
  10140.  options file, and loading it with the /DOS=, /WIN3=, or /WIN3S= option.  This 
  10141.  allows you to start DOS and Windows sessions with specific settings without 
  10142.  creating a desktop object and modifying the settings manually.  Before using 
  10143.  this capability you should read the description of it under /DOS= (below) very 
  10144.  carefully, since errors in the settings file can occasionally hang your 
  10145.  system. 
  10146.  
  10147.  Options 
  10148.  
  10149.     /BG:        (BackGround session) The session is started as a background 
  10150.                 session.  /BG may be abbreviated to /B. 
  10151.  
  10152.     /C:         (Close) The session or window is closed when the application 
  10153.                 ends. 
  10154.  
  10155.     /DOS[=filename]:(DOS session) Start a DOS session under OS/2 version 2.x. 
  10156.                 This option is not available in OS/2 version 1.x, which doesn't 
  10157.                 allow multiple DOS sessions. 
  10158.  
  10159.                 If you include the =filename, OS/2 will load DOS settings from 
  10160.                 the specified file.  This option is available only in the 
  10161.                 32-bit version of 4OS2. 
  10162.  
  10163.                 Starting a session with specific DOS settings is an 
  10164.                 undocumented feature which was implemented within OS/2 with 
  10165.                 little error checking.  It is included in START because it 
  10166.                 substantially eases a complex task, but you must experiment 
  10167.                 carefully to ensure that the settings you select will work 
  10168.                 properly on the systems on which you plan to use them. 
  10169.                 Incorrect settings may be ignored, but they may also hang your 
  10170.                 session or stop the entire system.  Be sure your experiments 
  10171.                 are not conducted while critical tasks are in process. 
  10172.  
  10173.                 Each line in the file must have a name, an equal sign [=], and 
  10174.                 a value.  The names are those shown in OS/2's DOS Settings 
  10175.                 dialog box.  Do not use spaces on either side of the equal 
  10176.                 sign. 
  10177.  
  10178.                 The names in the DOS Settings dialog box will vary depending on 
  10179.                 the device drivers and other settings in your CONFIG.SYS file, 
  10180.                 though many are available on all systems.  You must ensure that 
  10181.                 the names you use are valid for the systems on which you use 
  10182.                 them.  For example, if you replace IBM's COM.SYS and VCOM.SYS 
  10183.                 with different communications drivers, the COM_ settings will 
  10184.                 probably not be valid for the new drivers.  If you have a 
  10185.                 settings file which contains settings defined by a particular 
  10186.                 driver, and use it on a system where the corresponding driver 
  10187.                 is not loaded, the results are undefined. 
  10188.  
  10189.                 The values in your settings file must be numeric for settings 
  10190.                 which show a numeric value under DOS Settings (e.g., 
  10191.                 DOS_FILES=30), and must be text strings for settings shown with 
  10192.                 a string (e.g., DOS_SHELL=C:\4DOS.COM C:\4DOS /P).  Strings 
  10193.                 should be entered without trailing blanks.  For values shown as 
  10194.                 multiple choice on the DOS Settings page you must specify a 
  10195.                 numeric value, typically "0" for Off and 1 for On (e.g., 
  10196.                 DOS_HIGH=1).  Items with choices other than Off and On may use 
  10197.                 different values, or may not work at all; experimentation is 
  10198.                 usually required to find out what works.  Attempting to use 
  10199.                 strings for choice items (e.g., DOS_HIGH=ON) will not work, and 
  10200.                 can hang your system.  This is due to the internal operation of 
  10201.                 OS/2, and is not a problem in 4OS2. 
  10202.  
  10203.                 A typical DOS settings file might look like this: 
  10204.  
  10205.                                         DOS_FILES=30
  10206.                                         DOS_HIGH=1
  10207.                                         DOS_SHELL=C:\4DOS\4DOS.COM C:\4DOS /P
  10208.                                         MOUSE_EXCLUSIVE_ACCESS=0
  10209.                                         VIDEO_FASTPASTE=1
  10210.  
  10211.                 You can include comments in a settings file by beginning any 
  10212.                 line with a colon [:]. 
  10213.  
  10214.     /FG:        (ForeGround session) Start the session as the foreground 
  10215.                 session.  /FG may be abbreviated to /F. 
  10216.  
  10217.     /FS:        (Full Screen) Start the session as a full-screen session. 
  10218.  
  10219.     /I:         (Inherit environment) Inherit the default environment specified 
  10220.                 in CONFIG.SYS, if any, rather than the current environment. 
  10221.  
  10222.     /ICON=filename:Use the specified icon file.  If you don't use /ICON, 4OS2 
  10223.                 will look for an .ICO file with the same file name and in the 
  10224.                 same directory as the program file.  Some versions of OS/2 may 
  10225.                 ignore this option and use the default icon for the session. 
  10226.                 If you encounter this problem, check whether an update to OS/2 
  10227.                 has been released which addresses it. 
  10228.  
  10229.     /INV:       (Invisible) Start the session or window as invisible.  No icon 
  10230.                 will appear and the session will only be accessible through the 
  10231.                 Task Manager or Window List. 
  10232.  
  10233.     /K:         (Keep session or window at end) The session or window continues 
  10234.                 after the application program ends.  Use the EXIT command to 
  10235.                 end the session. 
  10236.  
  10237.     /L:         (Local lists) Start 4OS2 with local alias, history, and 
  10238.                 directory history lists.  This option combines the effects of 
  10239.                 /LA, /LD, and /LH (below). 
  10240.  
  10241.     /LA:        (Local Alias list) Start 4OS2 with a local alias list.See ALIAS 
  10242.                 for information on local and global aliases. 
  10243.  
  10244.     /LD:        (Local Directory history) Start 4OS2 with a local directory 
  10245.                 history list.  See Local and Global Directory History for more 
  10246.                 information. 
  10247.  
  10248.     /LH:        (Local History list) Start 4OS2 with a local history list. See 
  10249.                 Command History and Recall for information on local and global 
  10250.                 history lists. 
  10251.  
  10252.     /MAX:       (Maximized) Start the session or window maximized. 
  10253.  
  10254.     /MIN:       (Minimized) Start the session or window minimized. 
  10255.  
  10256.     /N:         Under 4OS2, start an OS/2 program directly, without a command 
  10257.                 processor.  The command cannot be an internal command or batch 
  10258.                 file. This is the default for PM applications. 
  10259.  
  10260.     /PGM:       (Program name) The string following this option is the program 
  10261.                 name.  The first quoted string on the line will be used as the 
  10262.                 session and task list title, and not as the program name. 
  10263.  
  10264.     /PM:        (Presentation Manager) Start a program in the PM session. 
  10265.  
  10266.     /POS:       (Position) Start the window at the specified screen position. 
  10267.                 The syntax is /POS=row, col, width, height where the values are 
  10268.                 specified in pixels or pels.  Row and col refer to the position 
  10269.                 of the bottom left corner of the window relative to the bottom 
  10270.                 left corner of the screen. 
  10271.  
  10272.     /WAIT:      Wait for the new session or window to finish before continuing. 
  10273.                 Cannot be used with /WIN3 or /WIN3S. 
  10274.  
  10275.     /WIN:       (Windowed) Start the session in a window. 
  10276.  
  10277.     /WIN3[=filename]:(Windows enhanced mode) Run the program in an 
  10278.                 enhanced-mode Windows 3.x session.  The session will run 
  10279.                 seamless (on the OS/2 desktop).  To start a Windows application 
  10280.                 in full-screen mode, use /FS rather than /WIN3.  You can 
  10281.                 include an equal sign and the name of an options file to set 
  10282.                 options for the specific session and application (see /DOS= 
  10283.                 above for details).  The setting names in the file should be 
  10284.                 taken from those shown in OS/2's WIN-OS/2 Settings dialog box. 
  10285.                 Available only in the 32-bit version of 4OS2. 
  10286.  
  10287.     /WIN3S[=filename]:(Windows standard mode) Equivalent to /WIN3, but runs the 
  10288.                 program in standard mode rather than enhanced mode. Available 
  10289.                 only in 4OS2/32. 
  10290.  
  10291.  
  10292. ΓòÉΓòÉΓòÉ 14.71. TEE - "Tee" pipe fitting ΓòÉΓòÉΓòÉ
  10293.  
  10294.  Purpose:    Copy standard input to both standard output and a file. 
  10295.  
  10296.  Format:     TEE [/A] file... 
  10297.  
  10298.              file :  One or more files that will receive the "tee-d" output. 
  10299.  
  10300.              /A(ppend) 
  10301.  
  10302.  See also:  Y and the redirection options. 
  10303.  
  10304.  Usage 
  10305.  
  10306.  TEE is normally used to "split" the output of a program so that you can see it 
  10307.  on the display and also save it in a file.  It can also be used to capture 
  10308.  intermediate output before the data is altered by another program or command. 
  10309.  
  10310.  TEE gets its input from standard input (usually the piped output of another 
  10311.  command or program), and sends out two copies:  one goes to standard output, 
  10312.  the other to the file or files that you specify.  TEE is not likely to be 
  10313.  useful with programs which do not use standard output, because these programs 
  10314.  cannot send output through a pipe. 
  10315.  
  10316.  For example, to search the file DOC for any lines containing the string 
  10317.  "4OS2", make a copy of the matching lines in 4.DAT, sort the lines, and write 
  10318.  them to the output file 4O.DAT : 
  10319.  
  10320.           [c:\] find "4OS2" doc | tee 4.dat | sort > 4o.dat
  10321.  
  10322.  If you are typing at the keyboard to produce the input for TEE, you must enter 
  10323.  a Ctrl-Z to terminate the input. 
  10324.  
  10325.  When using TEE with a pipe under 4OS2, the programs on the two ends of the 
  10326.  pipe run simultaneously, not sequentially as in 4DOS. 
  10327.  
  10328.  See Piping for more information on pipes. 
  10329.  
  10330.  Option 
  10331.  
  10332.     /A:     (Append) Append the output to the file(s) rather than overwriting 
  10333.             them. 
  10334.  
  10335.  
  10336. ΓòÉΓòÉΓòÉ 14.72. TEXT - Display text in a batch file ΓòÉΓòÉΓòÉ
  10337.  
  10338.  Purpose:    Display a block of text in a batch file. 
  10339.  
  10340.  Format:     TEXT 
  10341.                 . 
  10342.                 . 
  10343.                 . 
  10344.              ENDTEXT 
  10345.  
  10346.  See also:  ECHO, SCREEN, SCRPUT, and VSCRPUT. 
  10347.  
  10348.  Usage 
  10349.  
  10350.  TEXT can only be used in batch files. 
  10351.  
  10352.  The TEXT command is useful for displaying menus or multi-line messages.  TEXT 
  10353.  will display all subsequent lines in the batch file until terminated by 
  10354.  ENDTEXT.  Both TEXT and ENDTEXT must be entered as the only command on the 
  10355.  line. 
  10356.  
  10357.  To redirect the entire block of text, use redirection on the TEXT command 
  10358.  itself, but not on the actual text lines or the ENDTEXT line.  No environment 
  10359.  variable expansion or other processing is performed on the lines between TEXT 
  10360.  and ENDTEXT; they are displayed exactly as they are stored in the batch file. 
  10361.  
  10362.  You can change screen colors by inserting ANSI escape sequences anywhere in 
  10363.  the text block.  You can also use a CLS or COLOR command to set the screen 
  10364.  color before executing the TEXT command. 
  10365.  
  10366.  The following batch file fragment displays a simple menu: 
  10367.  
  10368.           @echo off & cls
  10369.           screen 2 0
  10370.           text
  10371.           Enter one of the following:
  10372.              1 - Spreadsheet
  10373.              2 - Word Processing
  10374.              3 - Utilities
  10375.           endtext
  10376.  
  10377.  
  10378. ΓòÉΓòÉΓòÉ 14.73. TIME - Set the system time ΓòÉΓòÉΓòÉ
  10379.  
  10380.  Purpose:    Display or set the current system time. 
  10381.  
  10382.  Format:     TIME [hh [:mm [:ss ]]] [AM | PM] 
  10383.  
  10384.              hh :  The hour (0 - 23). 
  10385.              mm :  The minute (0 - 59). 
  10386.              ss :  The second (0 - 59). 
  10387.  
  10388.  See also:  CHCP and DATE. 
  10389.  
  10390.  Usage 
  10391.  
  10392.  If you don't enter any parameters, TIME will display the current system time 
  10393.  and prompt you for a new time.  Press Enter if you don't wish to change the 
  10394.  time; otherwise, enter the new time: 
  10395.  
  10396.           [c:\] time
  10397.           Thu  Dec 22, 1994  9:30:10
  10398.           New time (hh:mm:ss):
  10399.  
  10400.  TIME defaults to 24-hour format, but you can optionally enter the time in 
  10401.  12-hour format by appending "a", "am", "p", or "pm" to the time you enter. 
  10402.  
  10403.  For example, to enter the time as 9:30 am: 
  10404.  
  10405.           [c:\] time 9:30 am
  10406.  
  10407.  OS/2 adds the system time and date to the directory entry for every file you 
  10408.  create or modify.  If you keep both the time and date accurate, you will have 
  10409.  a record of when you last updated each file. 
  10410.  
  10411.  
  10412. ΓòÉΓòÉΓòÉ 14.74. TIMER - Start or stop a stopwatch ΓòÉΓòÉΓòÉ
  10413.  
  10414.  Purpose:    TIMER is a system stopwatch. 
  10415.  
  10416.  Format:     TIMER [ON] [/1 /2 /3 /S] 
  10417.  
  10418.              ON:  Force the stopwatch to restart 
  10419.  
  10420.              /1 (stopwatch #1)               /3 (stopwatch #3) 
  10421.              /2 (stopwatch #2)               /S(plit) 
  10422.  
  10423.  Usage 
  10424.  
  10425.  The TIMER command turns a system stopwatch on and off.  When you first run 
  10426.  TIMER, the stopwatch starts: 
  10427.  
  10428.           [c:\] timer
  10429.           Timer 1 on:  12:21:46
  10430.  
  10431.  When you run TIMER again, the stopwatch stops and the elapsed time is 
  10432.  displayed: 
  10433.  
  10434.           [c:\] timer
  10435.           Timer 1 off:  12:21:58   Elapsed time: 0:00:12.06
  10436.  
  10437.  There are three stopwatches available (1, 2, and 3) so you can time multiple 
  10438.  overlapping events.  By default, TIMER uses stopwatch #1. 
  10439.  
  10440.  The smallest interval TIMER can measure depends on the operating system you 
  10441.  are using, your hardware, and the interaction between the two.  However, it 
  10442.  should never be greater than .06 second.  The largest interval is 23 hours, 59 
  10443.  minutes, 59.99 seconds. 
  10444.  
  10445.  Options 
  10446.  
  10447.     /1:     Use timer #1 (the default). 
  10448.  
  10449.     /2:     Use timer #2. 
  10450.  
  10451.     /3:     Use timer #3. 
  10452.  
  10453.     /S:     (Split) Display a split time without stopping the timer.  To 
  10454.             display the current elapsed time but leave the timer running: 
  10455.  
  10456.                                 [c:\] timer /s
  10457.                                 Timer 1 elapsed: 0:06:40.63
  10458.  
  10459.     ON:     Start the timer regardless of its previous state (on or off). 
  10460.             Otherwise the TIMER command toggles the timer state (unless /S is 
  10461.             used). 
  10462.  
  10463.  
  10464. ΓòÉΓòÉΓòÉ 14.75. TYPE - Display file(s) ΓòÉΓòÉΓòÉ
  10465.  
  10466.  Purpose:    Display the contents of the specified file(s). 
  10467.  
  10468.  Format:     TYPE [/A:[[-]rhsda] /L /P] file... 
  10469.  
  10470.              file :  The file or list of files that you want to display. 
  10471.  
  10472.              /A:(ttribute select)            /P(ause) 
  10473.              /L(ine numbers) 
  10474.  
  10475.  See also:  LIST. 
  10476.  
  10477.  File Selection 
  10478.  
  10479.  Supports extended wildcards, ranges, multiple file names, and include lists. 
  10480.  
  10481.  Usage 
  10482.  
  10483.  The TYPE command displays a file.  It is normally only useful for displaying 
  10484.  ASCII text files.  Executable files (.COM and .EXE ) and many data files may 
  10485.  be unreadable when displayed with TYPE because they include non-alphanumeric 
  10486.  characters. 
  10487.  
  10488.  To display the files MEMO1 and MEMO2 : 
  10489.  
  10490.           [c:\] type /p memo1 memo2
  10491.  
  10492.  You can press Ctrl-S to pause TYPE's display and then any key to continue. 
  10493.  
  10494.  You will probably find LIST to be more useful for displaying files. However, 
  10495.  the TYPE /L command used with redirection is useful if you want to add line 
  10496.  numbers to a file. 
  10497.  
  10498.  Options 
  10499.  
  10500.     /A:     (Attribute select) Select only those files that have the specified 
  10501.             attribute(s) set.  Preceding the attribute character with a hyphen 
  10502.             [-] will select files that do not have that attribute set.  The 
  10503.             colon [:] after /A is required.  The attributes are: 
  10504.  
  10505.                            R  Read-only 
  10506.                            H  Hidden 
  10507.                            S  System 
  10508.                            D  Subdirectory 
  10509.                            A  Archive 
  10510.  
  10511.             If no attributes are listed at all (e.g., TYPE /A: ...), TYPE will 
  10512.             select all files and subdirectories including hidden and system 
  10513.             files.  If attributes are combined, all the specified attributes 
  10514.             must match for a file to be selected. For example, /A:RHS will 
  10515.             select only those files with all three attributes set. 
  10516.  
  10517.     /L:     (Line numbers) Display a line number preceding each line of text. 
  10518.  
  10519.     /P:     (Pause) Prompt after displaying each page.  Your options at the 
  10520.             prompt are explained in detail under Page and File Prompts. 
  10521.  
  10522.  
  10523. ΓòÉΓòÉΓòÉ 14.76. UNALIAS - Remove aliases ΓòÉΓòÉΓòÉ
  10524.  
  10525.  Purpose:    Remove aliases from the alias list. 
  10526.  
  10527.  Format:     UNALIAS [/Q] alias... 
  10528.                 or 
  10529.              UNALIAS * 
  10530.  
  10531.              alias :  One or more aliases to remove from memory. 
  10532.  
  10533.              /Q(uiet) 
  10534.  
  10535.  See also:  ALIAS and ESET. 
  10536.  
  10537.  Usage 
  10538.  
  10539.  4OS2 maintains a list of the aliases that you have defined.  The UNALIAS 
  10540.  command will remove aliases from that list.  You can remove one or more 
  10541.  aliases by name, or you can delete the entire alias list by using the command 
  10542.  UNALIAS *. 
  10543.  
  10544.  For example, to remove the alias DDIR: 
  10545.  
  10546.           [c:\] unalias ddir
  10547.  
  10548.  To remove all the aliases: 
  10549.  
  10550.           [c:\] unalias *
  10551.  
  10552.  Options 
  10553.  
  10554.     /Q:     (Quiet) Prevents UNALIAS from displaying an error message if one or 
  10555.             more of the aliases does not exist.  This option is most useful in 
  10556.             batch files, for removing a group of aliases when some of the 
  10557.             aliases may not have been defined. 
  10558.  
  10559.  
  10560. ΓòÉΓòÉΓòÉ 14.77. UNSET - Remove environment variables ΓòÉΓòÉΓòÉ
  10561.  
  10562.  Purpose:    Remove variables from the environment. 
  10563.  
  10564.  Format:     UNSET  [/Q] name... 
  10565.                 or 
  10566.              UNSET * 
  10567.  
  10568.              name :  One or more variables to remove from the environment. 
  10569.  
  10570.              /Q(uiet) 
  10571.  
  10572.  See also:  ESET and SET. 
  10573.  
  10574.  Usage 
  10575.  
  10576.  UNSET removes one or more variables from the environment.  For example, to 
  10577.  remove the variable CMDLINE: 
  10578.  
  10579.           [c:\] unset cmdline
  10580.  
  10581.  If you use the command UNSET *, all of the environment variables will be 
  10582.  deleted: 
  10583.  
  10584.           [c:\] unset *
  10585.  
  10586.  UNSET is often used in conjunction with the SETLOCAL and ENDLOCAL commands in 
  10587.  order to clear the environment of variables that may cause problems for some 
  10588.  applications. 
  10589.  
  10590.  For more information on environment variables, see the SET command and the 
  10591.  general discussion of the environment. 
  10592.  
  10593.  Use caution when removing environment variables, and especially when using 
  10594.  UNSET *.  Many programs will not work properly without certain environment 
  10595.  variables; for example, 4OS2 uses PATH and DPATH. 
  10596.  
  10597.  Options 
  10598.  
  10599.     /Q:     (Quiet) Prevents UNSET from displaying an error message if one or 
  10600.             more of the variables does not exist.  This option is most useful 
  10601.             in batch files, for removing a group of variables when some of the 
  10602.             variables may not have been defined. 
  10603.  
  10604.  
  10605. ΓòÉΓòÉΓòÉ 14.78. VER - Display the 4OS2 and OS/2 version ΓòÉΓòÉΓòÉ
  10606.  
  10607.  Purpose:    Display the current command processor and operating system 
  10608.              versions. 
  10609.  
  10610.  Format:     VER [/R] 
  10611.  
  10612.              /R(evision level) 
  10613.  
  10614.  Usage 
  10615.  
  10616.  Version numbers consist of a one-digit major version number, a period, and a 
  10617.  one- or two-digit minor version number.  The VER command displays both version 
  10618.  numbers: 
  10619.  
  10620.           [c:\] ver
  10621.  
  10622.           4OS2/32 2.5   OS/2 Version is 2.1
  10623.  
  10624.  Option 
  10625.  
  10626.     /R:     (Revision level) Display the 4OS2 and OS/2 internal revision levels 
  10627.             (if any), plus your 4OS2 serial number and registered name. 
  10628.  
  10629.  
  10630. ΓòÉΓòÉΓòÉ 14.79. VERIFY - Enable or disable disk write verification ΓòÉΓòÉΓòÉ
  10631.  
  10632.  Purpose:    Enable or disable disk write verification or display the 
  10633.              verification state. 
  10634.  
  10635.  Format:     VERIFY [ON | OFF] 
  10636.  
  10637.  Usage 
  10638.  
  10639.  OS/2 maintains an internal verify flag.  When the flag is on, OS/2 attempts to 
  10640.  verify each disk write by making sure that the data written to the disk can be 
  10641.  read back successfully into the computer.  It does not compare the data 
  10642.  written with the data actually placed on disk. 
  10643.  
  10644.  If used without any parameters, VERIFY will display the state of the verify 
  10645.  flag: 
  10646.  
  10647.           [c:\] verify
  10648.           VERIFY is OFF
  10649.  
  10650.  VERIFY is off when the system boots up.  Once it is turned on with the VERIFY 
  10651.  ON command, it stays on until you use the VERIFY OFF command or until you 
  10652.  reboot. 
  10653.  
  10654.  Verification will slow your disk write operations slightly (the effect is not 
  10655.  usually noticeable). 
  10656.  
  10657.  
  10658. ΓòÉΓòÉΓòÉ 14.80. VOL - Display disk volume labels ΓòÉΓòÉΓòÉ
  10659.  
  10660.  Purpose:    Display disk volume label(s). 
  10661.  
  10662.  Format:     VOL [d :] ... 
  10663.  
  10664.              d:  The drive or drives to search for labels. 
  10665.  
  10666.  Usage 
  10667.  
  10668.  Each disk may have a volume label, created when the disk is formatted or with 
  10669.  the external LABEL command.  Also, every floppy disk formatted with DOS 
  10670.  version 4.0 or above, OS/2, or Windows NT has a volume serial number. 
  10671.  
  10672.  The VOL command will display the volume label and, if available, the volume 
  10673.  serial number of a disk volume.  If the disk doesn't have a volume label, VOL 
  10674.  will report that it is "unlabeled."  If you don't specify a drive, VOL 
  10675.  displays information about the current drive: 
  10676.  
  10677.           [c:\] vol
  10678.           Volume in drive C: is MYHARDDISK
  10679.  
  10680.  If available, the volume serial number will appear after the drive label or 
  10681.  name. 
  10682.  
  10683.  To display the disk labels for drives A and B: 
  10684.  
  10685.           [c:\] vol a: b:
  10686.           Volume in drive A: is unlabeled
  10687.           Volume in drive B: is BACKUP_2
  10688.  
  10689.  
  10690. ΓòÉΓòÉΓòÉ 14.81. VSCRPUT - Display text vertically and in color ΓòÉΓòÉΓòÉ
  10691.  
  10692.  Purpose:    Display text vertically in the specified color. 
  10693.  
  10694.  Format:     VSCRPUT  row col [BRIght] [BLInk] fg ON [BRIght] bg text 
  10695.  
  10696.              row :  Starting row number. 
  10697.              col :  Starting column number. 
  10698.              fg :  Foreground text color. 
  10699.              bg :  Background text color. 
  10700.              text :  The text to display. 
  10701.  
  10702.  See also:  SCRPUT. 
  10703.  
  10704.  Usage 
  10705.  
  10706.  VSCRPUT writes text vertically on the screen rather than horizontally.  Like 
  10707.  the SCRPUT command, it uses the colors you specify to write the text.  VSCRPUT 
  10708.  can be used for simple graphs and charts generated by batch files.  It always 
  10709.  leaves the cursor in its current position.  See Colors and Color Names for 
  10710.  details about colors and notes on the use of bright background colors. 
  10711.  
  10712.  The row and column are zero-based, so on a standard 25 line by 80 column 
  10713.  display, valid rows are 0 - 24 and valid columns are 0 - 79.  You can also 
  10714.  specify the row and column as offsets from the current cursor position.  Begin 
  10715.  the value with a plus sign [+] to move down the specified number of rows or to 
  10716.  the right the specified number of columns before displaying text, or with a 
  10717.  minus sign [-] to move up or to the left. 
  10718.  
  10719.  VSCRPUT checks for a valid row and column, and displays a "Usage" error 
  10720.  message if either value is out of range. 
  10721.  
  10722.  
  10723. ΓòÉΓòÉΓòÉ 14.82. WINDOW - Change the window state or title ΓòÉΓòÉΓòÉ
  10724.  
  10725.  Purpose:    Minimize or maximize the current window, restore the default 
  10726.              window size, or change the window title. 
  10727.  
  10728.  Format:     WINDOW [MIN | MAX | RESTORE | /POS=row,col,width,height | "title 
  10729.              "] 
  10730.  
  10731.              title :  A new title for the window. 
  10732.  
  10733.              /POS(ition) 
  10734.  
  10735.  Usage 
  10736.  
  10737.  WINDOW is used to control the appearance and title of the current window. 
  10738.  WINDOW MIN reduces the window to an icon, WINDOW MAX enlarges it to its 
  10739.  maximum size, and WINDOW RESTORE returns the window to its default size and 
  10740.  location on the desktop. 
  10741.  
  10742.  Only one WINDOW option can be used at a time.  To make multiple changes in the 
  10743.  window state (for example, to maximize the window and change its title) you 
  10744.  must issue the WINDOW command once for each change. 
  10745.  
  10746.  You can use the /POS option to set the location and size of the window on the 
  10747.  desktop.  The row and column values of the /POS option select the window's 
  10748.  origin while the width and height values determine its size. 
  10749.  
  10750.  If you specify a new title, the title text must be enclosed in double quotes. 
  10751.  The quotes will not appear as part of the actual title. 
  10752.  
  10753.  Only one WINDOW option can be used at a time.  To make multiple changes in the 
  10754.  window state (for example, to maximize the window and change its title) you 
  10755.  must issue the WINDOW command once for each change. 
  10756.  
  10757.  Option 
  10758.  
  10759.     /POS:   (Position) Set the window position and size on the screen.  The 
  10760.             syntax is /POS=row, col, width, height where the values are 
  10761.             specified in pixels or pels.  Row and col refer to the position of 
  10762.             the bottom left corner of the window relative to the bottom left 
  10763.             corner of the screen. 
  10764.  
  10765.  
  10766. ΓòÉΓòÉΓòÉ 14.83. Y - "Y" pipe fitting ΓòÉΓòÉΓòÉ
  10767.  
  10768.  Purpose:    Copy standard input to standard output, and then copy the 
  10769.              specified file(s) to standard output. 
  10770.  
  10771.  Format:     Y file ... 
  10772.  
  10773.              file :  The file or list of files to send to standard output. 
  10774.  
  10775.  See also:  TEE. 
  10776.  
  10777.  Usage 
  10778.  
  10779.  The Y command copies input from standard input (usually the keyboard) to 
  10780.  standard output (usually the screen).  Once the input ends, the named files 
  10781.  are appended to standard output. 
  10782.  
  10783.  For example, to get text from standard input, append the files MEMO1 and MEMO2 
  10784.  to it, and send the output to MEMOS : 
  10785.  
  10786.           [c:\] y memo1 memo2 > memos
  10787.  
  10788.  The Y command is most useful if you want to add redirected data to the 
  10789.  beginning of a file instead of appending it to the end.  For example, this 
  10790.  command copies the output of DIR, followed by the contents of  the file 
  10791.  DIREND, to the file DIRALL: 
  10792.  
  10793.           [c:\] dir | y dirend > dirall
  10794.  
  10795.  If you are typing at the keyboard to produce input text for Y, you must enter 
  10796.  a Ctrl-Z to terminate the input. 
  10797.  
  10798.  When using Y with a pipe you must take into account that the programs on the 
  10799.  two ends of the pipe run simultaneously, not sequentially. 
  10800.  
  10801.  See Piping for more information on pipes. 
  10802.  
  10803.  
  10804. ΓòÉΓòÉΓòÉ 15. Error Messages ΓòÉΓòÉΓòÉ
  10805.  
  10806. This section lists error messages generated by 4OS2, and includes a recommended 
  10807. course of action for most errors.  If you are unable to resolve the problem, 
  10808. look through your Introduction and Installation Guide for any additional 
  10809. troubleshooting recommendations, then contact JP Software for technical 
  10810. support. 
  10811.  
  10812. Error messages relating to files are generally reports of errors returned by 
  10813. OS/2.  You may find some of these messages (for example, "Access denied") vague 
  10814. enough that they are not always helpful.  4OS2 includes the file name in file 
  10815. error messages, but is often unable to determine a more accurate explanation of 
  10816. these errors.  The message shown is the best information available based on the 
  10817. error codes returned by OS/2. 
  10818.  
  10819. The following list includes all error messages, in alphabetical order: 
  10820.  
  10821. Access denied:  You tried to write to or erase a read-only file, rename a file 
  10822. or directory to an existing name, create a directory that already exists, 
  10823. remove a read-only directory or a directory with files or subdirectories still 
  10824. in it, or access a file in use by another program in a multitasking system. 
  10825.  
  10826. Alias loop:  An alias refers back to itself either directly or indirectly 
  10827. (i.e., a = b = a), or aliases are nested more than 16 deep.  Correct your alias 
  10828. list. 
  10829.  
  10830. Bad disk unit:  Generally caused by a disk drive hardware failure. 
  10831.  
  10832. Batch file missing:  4OS2 can't find the batch (.BTM or .CMD ) file it was 
  10833. running.  It was either deleted, renamed, moved, or the disk was changed. 
  10834. Correct the problem and rerun the file. 
  10835.  
  10836. Can't copy file to itself:  You cannot COPY or MOVE a file to itself.  4OS2 
  10837. performs full path and filename expansion before copying to ensure that files 
  10838. aren't inadvertently destroyed. 
  10839.  
  10840. Can't create:  4OS2 can't create the specified file.  The disk may be full or 
  10841. write protected, or the file already exists and is read-only, or the root 
  10842. directory is full. 
  10843.  
  10844. Can't delete:  4OS2 can't delete the specified file or directory.  The disk is 
  10845. probably write protected. 
  10846.  
  10847. Can't get directory:  4OS2 can't read the directory.  The disk drive is 
  10848. probably not ready. 
  10849.  
  10850. Can't make directory entry:  4OS2 can't create the filename in the directory. 
  10851. This is usually caused by a full root directory. Create a subdirectory and move 
  10852. some of the files to it. 
  10853.  
  10854. Can't open:  4OS2 can't open the specified file.  Either the file doesn't exist 
  10855. or the disk directory or File Allocation Table is damaged. 
  10856.  
  10857. Can't remove current directory:  You attempted to remove the current directory, 
  10858. which OS/2 does not allow.  Change to the parent directory and try again. 
  10859.  
  10860. Command line too long:  A single command exceeded 1023 characters, or the 
  10861. entire command line exceeded 2047 characters, during alias and variable 
  10862. expansion.  Reduce the complexity of the command or use a batch file.  Also 
  10863. check for an alias which refers back to itself either directly or indirectly. 
  10864.  
  10865. Command only valid in batch file:  You have tried to use a batch file command, 
  10866. like DO or GOSUB, from the command line or in an alias.  A few commands can 
  10867. only be used in batch files (see the individual commands for details). 
  10868.  
  10869. Contents lost before copy:  COPY was appending files, and found one of the 
  10870. source files is the same as the target.  That source file is skipped, and 
  10871. appending continues with the next file. 
  10872.  
  10873. Data error:  OS/2 can't read or write properly to the device. On a floppy 
  10874. drive, this error is usually caused by a defective floppy disk, dirty disk 
  10875. drive heads, or a misalignment between the heads on your drive and the drive on 
  10876. which the disk was created. On a hard drive, this error may indicate a drive 
  10877. that is too hot or too cold, or a hardware problem.  Retry the operation; if it 
  10878. fails again, correct the hardware or diskette problem. 
  10879.  
  10880. Directory stack empty:  POPD or DIRS can't find any entries in the directory 
  10881. stack. 
  10882.  
  10883. Disk is write protected:  The disk cannot be written to.  Check the disk and 
  10884. remove the write-protect tab or close the write- protect window if necessary. 
  10885.  
  10886. Drive not ready -- close door:  The floppy disk drive door is open.  Close the 
  10887. door and try again. 
  10888.  
  10889. Environment already saved:  You have already saved the environment with a 
  10890. previous SETLOCAL command.  You cannot nest SETLOCAL / ENDLOCAL pairs. 
  10891.  
  10892. Error in command-line directive:  You used the //iniline option to place an 
  10893. 4OS2.INI directive on the startup command line, but the directive is in error. 
  10894. A more specific error message follows. 
  10895.  
  10896. Error on line [nnnn] of [filename]:  There is an error in your 4OS2.INI file. 
  10897. The following message explains the error in more detail.  Correct the line in 
  10898. error and restart 4OS2 for your change to take effect. 
  10899.  
  10900. Error reading:  OS/2 experienced an I/O error when reading from a device.  This 
  10901. is usually caused by a bad disk, a device not ready, or a hardware error. 
  10902.  
  10903. Error writing:  OS/2 experienced an I/O error when writing to a device.  This 
  10904. is usually caused by a full disk, a bad disk, a device not ready, or a hardware 
  10905. error. 
  10906.  
  10907. Exceeded batch nesting limit:  You have attempted to nest batch files more than 
  10908. 10 levels deep. 
  10909.  
  10910. File Allocation Table bad:  OS/2  can't access the FAT on the specified disk. 
  10911. This can be caused by a bad disk, a hardware error, or an unusual software 
  10912. interaction. 
  10913.  
  10914. File exists:  The requested output file already exists, and 4OS2 won't 
  10915. overwrite it. 
  10916.  
  10917. File is empty:  You attempted to use an empty file in @SELECT.  Correct the 
  10918. file name or contents and try again. 
  10919.  
  10920. File not found:  4OS2 couldn't find the specified file.  Check the spelling and 
  10921. path name. 
  10922.  
  10923. General failure:  This is usually a hardware problem, particularly a disk drive 
  10924. failure or a device not properly connected to a serial or parallel port.  Try 
  10925. to correct the problem, or reboot and try again.  Also see Data error above; 
  10926. the problems described there can sometimes cause a general failure rather than 
  10927. a data error. 
  10928.  
  10929. Infinite COPY or MOVE loop:  You tried to COPY or MOVE a directory to one of 
  10930. its own subdirectories and used the /S switch, so the command would run 
  10931. forever.  Correct the command and try again. 
  10932.  
  10933. Insufficient disk space:  COPY or MOVE ran out of room on the destination 
  10934. drive.  Remove some files and retry the operation. 
  10935.  
  10936. Invalid character value:  You gave an invalid value for a character directive 
  10937. in the 4OS2.INI file. 
  10938.  
  10939. Invalid choice value:  You gave an invalid value for a "choice" directive (one 
  10940. that accepts a choice from a list, like "Yes" or "No") in the 4OS2.INI file. 
  10941.  
  10942. Invalid color:  You gave an invalid value for a color directive in the 4OS2.INI 
  10943. file. 
  10944.  
  10945. Invalid date:  An invalid date was entered.  Check the syntax and reenter. 
  10946.  
  10947. Invalid directive name:  4OS2 can't recognize the name of a directive in your 
  10948. 4OS2.INI file. 
  10949.  
  10950. Invalid drive:  A bad or non-existent disk drive was specified. 
  10951.  
  10952. Invalid key name:  You tried to make an invalid key substitution in the 
  10953. 4OS2.INI file, or you used an invalid key name in a keystroke alias or command. 
  10954. Correct the error and retry the operation. 
  10955.  
  10956. Invalid numeric value:  You gave an invalid value for a numeric directive in 
  10957. the 4OS2.INI file. 
  10958.  
  10959. Invalid parameter:  4OS2 didn't recognize a parameter.  Check the syntax and 
  10960. spelling of the command you entered. 
  10961.  
  10962. Invalid path:  The specified path does not exist.  Check the disk specification 
  10963. and/or spelling. 
  10964.  
  10965. Invalid path or file name:  You used an invalid path or filename in a directive 
  10966. in the 4OS2.INI file. 
  10967.  
  10968. Invalid time:  An invalid time was entered.  Check the syntax and reenter. 
  10969.  
  10970. Keystroke substitution table full:  4OS2 ran out of room to store keystroke 
  10971. substitutions entered in the 4OS2.INI file.  Reduce the number of key 
  10972. substitutions or contact JP Software for assistance. 
  10973.  
  10974. Label not found:  A GOTO or GOSUB referred to a non-existent label. Check your 
  10975. batch file. 
  10976.  
  10977. Missing ENDTEXT:  A TEXT command is missing a matching ENDTEXT.  Check the 
  10978. batch file. 
  10979.  
  10980. Missing GOSUB:  4OS2 cannot perform the RETURN command in a batch file.  You 
  10981. tried to do a RETURN without a GOSUB, or your batch file has been corrupted. 
  10982.  
  10983. Missing SETLOCAL:  An ENDLOCAL was used without a matching SETLOCAL. 
  10984.  
  10985. No aliases defined:  You tried to display aliases but no aliases have been 
  10986. defined. 
  10987.  
  10988. No closing quote:  4OS2 couldn't find a second matching back quote [`] or 
  10989. double-quote ["] on the command line. 
  10990.  
  10991. No expression:  The expression passed to the %@EVAL variable function is empty. 
  10992. Correct the expression and retry the operation. 
  10993.  
  10994. No room for INI file name:  4OS2 does not have enough space to pass the name of 
  10995. your 4OS2.INI file to secondary shells; see String area overflow for more 
  10996. details.  Any [Secondary] section in 4OS2.INI will be ignored in secondary 
  10997. shells until the problem is corrected and the system or session is restarted. 
  10998.  
  10999. Not a windowed session:  You tried to use the WINDOW command in a full-screen 
  11000. session.  WINDOW is valid only in windowed sessions. 
  11001.  
  11002. Not an alias:  The specified alias is not in the alias list. 
  11003.  
  11004. Not in environment:  The specified variable is not in the environment. 
  11005.  
  11006. Not ready:  The specified device can't be accessed. 
  11007.  
  11008. Not same device:  This error usually appears in RENAME.  You cannot rename a 
  11009. file to a different disk drive. 
  11010.  
  11011. Out of memory:  4OS2 or OS/2 had insufficient memory to execute the last 
  11012. command.  Try to free some memory by closing other sessions.  If the error 
  11013. persists, contact JP Software for assistance. 
  11014.  
  11015. Out of paper:  OS/2 detected an out-of-paper condition on one of the printers 
  11016. (LPT1, LPT2, or LPT3).  Check your printer and add paper if necessary. 
  11017.  
  11018. Overflow:  An arithmetic overflow occurred in the %@EVAL variable function. 
  11019. Check the values being passed to %@EVAL. %@EVAL can handle 16 digits to the 
  11020. left of the decimal point and 8 to the right. 
  11021.  
  11022. Read error:  OS/2 encountered a disk read error; usually caused by a bad or 
  11023. unformatted disk. 
  11024.  
  11025. Sector not found:  Disk error, usually caused by a bad or unformatted disk. 
  11026.  
  11027. Seek error:  OS/2 can't seek to the proper location on the disk.  This is 
  11028. generally caused by a bad disk or drive. 
  11029.  
  11030. Sharing violation:  You tried to access a file in use by another program in a 
  11031. multitasking system or on a network.  Wait for the file to become available, or 
  11032. change your method of operation so that another program does not have the file 
  11033. open while you are trying to use it. 
  11034.  
  11035. String area overflow:  4OS2 ran out of room to store the text from string 
  11036. directives in the 4OS2.INI file.  Reduce the complexity of the 4OS2.INI file or 
  11037. contact JP Software for assistance. 
  11038.  
  11039. Syntax error:  A command or variable function was entered in an improper 
  11040. format.  Check the syntax and correct the error. 
  11041.  
  11042. Too many open files:  OS/2 has run out of file handles. Try increasing the 
  11043. FILES setting in CONFIG.SYS. 
  11044.  
  11045. Unbalanced parentheses:  The number of left and right parentheses did not match 
  11046. in an expression passed to the %@EVAL variable function.  Correct the 
  11047. expression and retry the operation. 
  11048.  
  11049. Unknown command:  A command was entered that 4OS2 didn't recognize and couldn't 
  11050. find in the current search path.  Check the spelling or PATH specification. 
  11051. You can handle unknown commands with the UNKNOWN_CMD alias (see ALIAS). 
  11052.  
  11053. Variable loop:  A nested environment variable refers to itself, or variables 
  11054. are nested more than 16 deep.  Correct the error and retry the command. 
  11055.  
  11056. Write error:  OS/2 encountered a disk write error; usually caused by a bad or 
  11057. unformatted disk. 
  11058.  
  11059.  
  11060. ΓòÉΓòÉΓòÉ 16. Reference Tables ΓòÉΓòÉΓòÉ
  11061.  
  11062. The reference tables in this section are based on U.S. English conventions. 
  11063. Your system may differ if it is configured for a different country or language. 
  11064. See your operating system documentation for more information about country and 
  11065. language support. 
  11066.  
  11067. To represent the text you type, computers must translate each letter to and 
  11068. from a number.  The code used by all PC-compatible computers for this 
  11069. translation is called ASCII.  Function keys, cursor keys, and Alt keys generate 
  11070. scan codes indicating which key was pressed, but not ASCII codes. The tables in 
  11071. this section cover both kinds of codes. 
  11072.  
  11073. For more information, see: 
  11074.  
  11075.             ASCII Table 
  11076.             Key Codes and Scan Codes Table 
  11077.             Key Codes and Scan Codes Explanation 
  11078.             ANSI Commands 
  11079.  
  11080.  
  11081. ΓòÉΓòÉΓòÉ 16.1. ASCII Table ΓòÉΓòÉΓòÉ
  11082.  
  11083.                       Control Characters
  11084.  
  11085.     Dec  Hex  Chr  Nam  Ctl   Γöé   Dec  Hex  Chr  Nam  Ctl
  11086.     ---  ---  ---  ---  ---   Γöé   ---  ---  ---  ---  ---
  11087.     000   00       NUL   ^@   Γöé   016   10      DLE   ^P
  11088.     001   01      SOH   ^A   Γöé   017   11      DC1   ^Q
  11089.     002   02      STX   ^B   Γöé   018   12      DC2   ^R
  11090.     003   03      ETX   ^C   Γöé   019   13      DC3   ^S
  11091.     004   04      EOT   ^D   Γöé   020   14      DC4   ^T
  11092.     005   05      ENQ   ^E   Γöé   021   15      NAK   ^U
  11093.     006   06      ACK   ^F   Γöé   022   16      SYN   ^V
  11094.     007   07       BEL   ^G   Γöé   023   17      ETB   ^W
  11095.     008   08      BS    ^H   Γöé   024   18      CAN   ^X
  11096.     009   09       HT    ^I   Γöé   025   19      EM    ^Y
  11097.     010   0A       LF    ^J   Γöé   026   1A      SUB   ^Z
  11098.     011   0B       VT    ^K   Γöé   027   1B      ESC   ^[
  11099.     012   0C       FF    ^L   Γöé   028   1C      FS    ^\
  11100.     013   0D       CR    ^M   Γöé   029   1D      GS    ^]
  11101.     014   0E      SO    ^N   Γöé   030   1E      RS    ^^
  11102.     015   0F      SI    ^O   Γöé   031   1F      US    ^_
  11103.  
  11104.                   Punctuation, Digits, Upper Case
  11105.  
  11106.   Dec  Hex  Chr Γöé  Dec  Hex  Chr Γöé  Dec  Hex  Chr Γöé  Dec  Hex  Chr
  11107.   ---  ---  --- Γöé  ---  ---  --- Γöé  ---  ---  --- Γöé  ---  ---  ---
  11108.   032   20      Γöé  048   30   0  Γöé  064   40   @  Γöé  080   50   P
  11109.   033   21   !  Γöé  049   31   1  Γöé  065   41   A  Γöé  081   51   Q
  11110.   034   22   "  Γöé  050   32   2  Γöé  066   42   B  Γöé  082   52   R
  11111.   035   23   #  Γöé  051   33   3  Γöé  067   43   C  Γöé  083   53   S
  11112.   036   24   $  Γöé  052   34   4  Γöé  068   44   D  Γöé  084   54   T
  11113.   037   25   %  Γöé  053   35   5  Γöé  069   45   E  Γöé  085   55   U
  11114.   038   26   &  Γöé  054   36   6  Γöé  070   46   F  Γöé  086   56   V
  11115.   039   27   '  Γöé  055   37   7  Γöé  071   47   G  Γöé  087   57   W
  11116.   040   28   (  Γöé  056   38   8  Γöé  072   48   H  Γöé  088   58   X
  11117.   041   29   )  Γöé  057   39   9  Γöé  073   49   I  Γöé  089   59   Y
  11118.   042   2A   *  Γöé  058   3A   :  Γöé  074   4A   J  Γöé  090   5A   Z
  11119.   043   2B   +  Γöé  059   3B   ;  Γöé  075   4B   K  Γöé  091   5B   [
  11120.   044   2C   ,  Γöé  060   3C   <  Γöé  076   4C   L  Γöé  092   5C   \
  11121.   045   2D   -  Γöé  061   3D   =  Γöé  077   4D   M  Γöé  093   5D   ]
  11122.   046   2E   .  Γöé  062   3E   >  Γöé  078   4E   N  Γöé  094   5E   ^
  11123.   047   2F   /  Γöé  063   3F   ?  Γöé  079   4F   O  Γöé  095   5F   _
  11124.  
  11125.                    Lower Case, Miscellaneous
  11126.  
  11127.                  Dec  Hex  Chr Γöé  Dec  Hex  Chr
  11128.                  ---  ---  --- Γöé  ---  ---  ---
  11129.                  096   60   `  Γöé  112   70   p
  11130.                  097   61   a  Γöé  113   71   q
  11131.                  098   62   b  Γöé  114   72   r
  11132.                  099   63   c  Γöé  115   73   s
  11133.                  100   64   d  Γöé  116   74   t
  11134.                  101   65   e  Γöé  117   75   u
  11135.                  102   66   f  Γöé  118   76   v
  11136.                  103   67   g  Γöé  119   77   w
  11137.                  104   68   h  Γöé  120   78   x
  11138.                  105   69   i  Γöé  121   79   y
  11139.                  106   6A   j  Γöé  122   7A   z
  11140.                  107   6B   k  Γöé  123   7B   {
  11141.                  108   6C   l  Γöé  124   7C   |
  11142.                  109   6D   m  Γöé  125   7D   }
  11143.                  110   6E   n  Γöé  126   7E   ~
  11144.                  111   6F   o  Γöé  127   7F   
  11145.  
  11146.                 International; Graphics Characters 1
  11147.  
  11148.   Dec  Hex  Chr Γöé  Dec  Hex  Chr Γöé  Dec  Hex  Chr Γöé  Dec  Hex  Chr
  11149.   ---  ---  --- Γöé  ---  ---  --- Γöé  ---  ---  --- Γöé  ---  ---  ---
  11150.   128   80   ╨É  Γöé  144   90   ╨á  Γöé  160   A0   ╨░  Γöé  176   B0   Γûæ
  11151.   129   81   ╨æ  Γöé  145   91   ╨í  Γöé  161   A1   ╨▒  Γöé  177   B1   ΓûÆ
  11152.   130   82   ╨Æ  Γöé  146   92   ╨ó  Γöé  162   A2   ╨▓  Γöé  178   B2   Γûô
  11153.   131   83   ╨ô  Γöé  147   93   ╨ú  Γöé  163   A3   ╨│  Γöé  179   B3   Γöé
  11154.   132   84   ╨ö  Γöé  148   94   ╨ñ  Γöé  164   A4   ╨┤  Γöé  180   B4   Γöñ
  11155.   133   85   ╨ò  Γöé  149   95   ╨Ñ  Γöé  165   A5   ╨╡  Γöé  181   B5   Γòí
  11156.   134   86   ╨û  Γöé  150   96   ╨ª  Γöé  166   A6   ╨╢  Γöé  182   B6   Γòó
  11157.   135   87   ╨ù  Γöé  151   97   ╨º  Γöé  167   A7   ╨╖  Γöé  183   B7   Γòû
  11158.   136   88   ╨ÿ  Γöé  152   98   ╨¿  Γöé  168   A8   ╨╕  Γöé  184   B8   Γòò
  11159.   137   89   ╨Ö  Γöé  153   99   ╨⌐  Γöé  169   A9   ╨╣  Γöé  185   B9   Γòú
  11160.   138   8A   ╨Ü  Γöé  154   9A   ╨¬  Γöé  170   AA   ╨║  Γöé  186   BA   Γòæ
  11161.   139   8B   ╨¢  Γöé  155   9B   ╨½  Γöé  171   AB   ╨╗  Γöé  187   BB   Γòù
  11162.   140   8C   ╨£  Γöé  156   9C   ╨¼  Γöé  172   AC   ╨╝  Γöé  188   BC   Γò¥
  11163.   141   8D   ╨¥  Γöé  157   9D   ╨¡  Γöé  173   AD   ╨╜  Γöé  189   BD   Γò£
  11164.   142   8E   ╨₧  Γöé  158   9E   ╨«  Γöé  174   AE   ╨╛  Γöé  190   BE   Γò¢
  11165.   143   8F   ╨ƒ  Γöé  159   9F   ╨»  Γöé  175   AF   ╨┐  Γöé  191   BF   ΓöÉ
  11166.  
  11167.                   Graphics Characters 2; Symbols
  11168.  
  11169.   Dec  Hex  Chr Γöé  Dec  Hex  Chr Γöé  Dec  Hex  Chr Γöé  Dec  Hex  Chr
  11170.   ---  ---  --- Γöé  ---  ---  --- Γöé  ---  ---  --- Γöé  ---  ---  ---
  11171.   192   C0   Γöö  Γöé  208   D0   Γò¿  Γöé  224   E0   ╤Ç  Γöé  240   F0   ╨ü
  11172.   193   C1   Γö┤  Γöé  209   D1   Γòñ  Γöé  225   E1   ╤ü  Γöé  241   F1   ╤æ
  11173.   194   C2   Γö¼  Γöé  210   D2   ΓòÑ  Γöé  226   E2   ╤é  Γöé  242   F2   ╨ä
  11174.   195   C3   Γö£  Γöé  211   D3   ΓòÖ  Γöé  227   E3   ╤â  Γöé  243   F3   ╤ö
  11175.   196   C4   ΓöÇ  Γöé  212   D4   Γòÿ  Γöé  228   E4   ╤ä  Γöé  244   F4   ╨ç
  11176.   197   C5   Γö╝  Γöé  213   D5   ΓòÆ  Γöé  229   E5   ╤à  Γöé  245   F5   ╤ù
  11177.   198   C6   Γò₧  Γöé  214   D6   Γòô  Γöé  230   E6   ╤å  Γöé  246   F6   ╨Ä
  11178.   199   C7   Γòƒ  Γöé  215   D7   Γò½  Γöé  231   E7   ╤ç  Γöé  247   F7   ╤₧
  11179.   200   C8   ΓòÜ  Γöé  216   D8   Γò¬  Γöé  232   E8   ╤ê  Γöé  248   F8   ┬░
  11180.   201   C9   Γòö  Γöé  217   D9   Γöÿ  Γöé  233   E9   ╤ë  Γöé  249   F9   ΓêÖ
  11181.   202   CA   Γò⌐  Γöé  218   DA   Γöî  Γöé  234   EA   ╤è  Γöé  250   FA   ┬╖
  11182.   203   CB   Γòª  Γöé  219   DB   Γûê  Γöé  235   EB   ╤ï  Γöé  251   FB   ΓêÜ
  11183.   204   CC   Γòá  Γöé  220   DC   Γûä  Γöé  236   EC   ╤î  Γöé  252   FC   Γäû
  11184.   205   CD   ΓòÉ  Γöé  221   DD   Γûî  Γöé  237   ED   ╤ì  Γöé  253   FD   ┬ñ
  11185.   206   CE   Γò¼  Γöé  222   DE   ΓûÉ  Γöé  238   EE   ╤Ä  Γöé  254   FE   Γûá
  11186.   207   CF   Γòº  Γöé  223   DF   ΓûÇ  Γöé  239   EF   ╤Å  Γöé  255   FF
  11187.  
  11188.  
  11189. ΓòÉΓòÉΓòÉ 16.2. Key Codes and Scan Codes Table ΓòÉΓòÉΓòÉ
  11190.  
  11191. (For more details on key codes and scan codes, see the Key Codes and Scan Codes 
  11192. Explanation.) 
  11193.  
  11194. Key names prefaced by np are on the numeric keypad.  Those prefaced by cp are 
  11195. on the cursor keypad between the main typing keys and the number keypad.  The 
  11196. numeric keypad values are valid if Num Lock is turned off.  If you need to 
  11197. specify a number key from the numeric keypad, use the scan code shown for the 
  11198. keypad and the ASCII code shown for the corresponding typewriter key.  For 
  11199. example, the keypad "7" has a scan code of 71 (the np Home scan code) and an 
  11200. ASCII code of 54 (the ASCII code for "7"). 
  11201.  
  11202. The chart is blank for key combinations that do not have scan codes or ASCII 
  11203. codes, like Ctrl-1 or Alt-PgUp. 
  11204.  
  11205.  
  11206.                         Top Two Keyboard Rows
  11207.  
  11208.                              Shift  Shift  Ctrl   Ctrl   Alt
  11209.                Scan   ASCII  Scan   ASCII  Scan   ASCII  Scan
  11210.      Key       Code   Code   Code   Code   Code   Code   Code
  11211.  
  11212.      Esc       1      27     1      27     1      27     1
  11213.      1  !      2      49     2      33                   120
  11214.      2  @      3      50     3      64     3      0      121
  11215.      3  #      4      51     4      35                   122
  11216.      4  $      5      52     5      36                   123
  11217.      5  %      6      53     6      37                   124
  11218.      6  ^      7      54     7      94     7      30     125
  11219.      7  &      8      55     8      38                   126
  11220.      8  *      9      56     9      42                   127
  11221.      9  (      10     57     10     40                   128
  11222.      0  )      11     48     11     41                   129
  11223.      -  _      12     45     12     95     12     31     130
  11224.      =  +      13     61     13     43                   131
  11225.      Backspace 14     8      14     8      14     127    14
  11226.      Tab       15     9      15     0      148    0      165
  11227.      Q         16     113    16     81     16     17     16
  11228.      W         17     119    17     87     17     23     17
  11229.      E         18     101    18     69     18     5      18
  11230.      R         19     114    19     82     19     18     19
  11231.      T         20     116    20     84     20     20     20
  11232.      Y         21     121    21     89     21     25     21
  11233.      U         22     117    22     85     22     21     22
  11234.      I         23     105    23     73     23     9      23
  11235.      O         24     111    24     79     24     15     24
  11236.      P         25     112    25     80     25     16     25
  11237.      [  {      26     91     26     123    26     27     26
  11238.      ]  }      27     93     27     125    27     29     27
  11239.      Enter     28     13     28     13     28     10     28
  11240.  
  11241.  
  11242.                        Bottom Two Keyboard Rows
  11243.  
  11244.                              Shift  Shift  Ctrl   Ctrl   Alt
  11245.                Scan   ASCII  Scan   ASCII  Scan   ASCII  Scan
  11246.      Key       Code   Code   Code   Code   Code   Code   Code
  11247.  
  11248.     A          30     97     30     65     30     1      30
  11249.     S          31     115    31     83     31     19     31
  11250.     D          32     100    32     68     32     4      32
  11251.     F          33     102    33     70     33     6      33
  11252.     G          34     103    34     71     34     7      34
  11253.     H          35     104    35     72     35     8      35
  11254.     J          36     106    36     74     36     10     36
  11255.     K          37     107    37     75     37     11     37
  11256.     L          38     108    38     76     38     12     38
  11257.     ; :        39     59     39     58                   39
  11258.     '  "       40     39     40     34                   40
  11259.     `  ~       41     96     41     126                  41
  11260.     \  |       43     92     43     124    43     28     43
  11261.     Z          44     122    44     90     44     26     44
  11262.     X          45     120    45     88     45     24     45
  11263.     C          46     99     46     67     46     3      46
  11264.     V          47     118    47     86     47     22     47
  11265.     B          48     98     48     66     48     2      48
  11266.     N          49     110    49     78     49     14     49
  11267.     M          50     109    50     77     50     13     50
  11268.     ,  <       51     44     51     60                   51
  11269.     .  >       52     46     52     62                   52
  11270.     /  ?       53     47     53     63                   53
  11271.     Space      57     32     57     32     57     32     57
  11272.  
  11273.  
  11274.                       Key Pads and Function Keys
  11275.  
  11276.                              Shift  Shift  Ctrl   Ctrl   Alt
  11277.                Scan   ASCII  Scan   ASCII  Scan   ASCII  Scan
  11278.      Key       Code   Code   Code   Code   Code   Code   Code
  11279.  
  11280.  
  11281.      F1        59     0      84     0      94     0      104
  11282.      F2        60     0      85     0      95     0      105
  11283.      F3        61     0      86     0      96     0      106
  11284.      F4        62     0      87     0      97     0      107
  11285.      F5        63     0      88     0      98     0      108
  11286.      F6        64     0      89     0      99     0      109
  11287.      F7        65     0      90     0      100    0      110
  11288.      F8        66     0      91     0      101    0      111
  11289.      F9        67     0      92     0      102    0      112
  11290.      F10       68     0      93     0      103    0      113
  11291.      F11       133    0      135    0      137    0      139
  11292.      F12       134    0      136    0      138    0      140
  11293.      np *      55     42     55     42     150    0      55
  11294.      np Home   71     0      71     55     119    0
  11295.      cp Home   71     224    71     224    119    224    151
  11296.      np Up     72     0      72     56     141    0
  11297.      cp Up     72     224    72     224    141    224    152
  11298.      np PgUp   73     0      73     57     132    0
  11299.      cp PgUp   73     224    73     224    132    224    153
  11300.      np Minus  74     45     74     45     142    0      74
  11301.      np Left   75     0      75     52     115    0
  11302.      cp Left   75     224    75     224    115    224    155
  11303.      np 5      76     0      76     53     143    0
  11304.      np Right  77     0      77     54     116    0
  11305.      cp Right  77     224    77     224    116    224    157
  11306.      np Plus   78     43     78     43     144    0      78
  11307.      np End    79     0      79     49     117    0
  11308.      cp End    79     224    79     224    117    224    159
  11309.      np Down   80     0      80     50     145    0
  11310.      cp Down   80     224    80     224    145    224    160
  11311.      np PgDn   81     0      81     51     118    0
  11312.      cp PgDn   81     224    81     224    118    224    161
  11313.      np Ins    82     0      82     48     146    0
  11314.      cp Ins    82     224    82     224    146    224    162
  11315.      np Del    83     0      83     46     147    0
  11316.      cp Del    83     224    83     224    147    224    163
  11317.      np /      224    47     224    47     149    0      164
  11318.      np Enter  224    13     224    13     224    10     166
  11319.  
  11320.  
  11321. ΓòÉΓòÉΓòÉ 16.3. Key Codes and Scan Codes Explanation ΓòÉΓòÉΓòÉ
  11322.  
  11323. (This section explains how key codes and scan codes work.  For a reference 
  11324. chart, see the Key Codes and Scan Codes Table.) 
  11325.  
  11326. When you press a single key or a key combination, OS/2 translates your 
  11327. keystroke into two numbers: a scan code, representing the actual key that was 
  11328. pressed, and an ASCII code, representing the ASCII value for that key.  OS/2 
  11329. returns these numbers the next time a program requests keyboard input.  This 
  11330. section explains how key codes work; for information on using them with 4OS2 
  11331. see the 4OS2.INI file key mapping directives, keystroke aliases, and INKEY. 
  11332.  
  11333. Most 4OS2 commands that use the numeric key codes listed here also use key 
  11334. names, which are usually more convenient to use than the numeric codes.  See 
  11335. Keys and Key Names for more information on key names. 
  11336.  
  11337. As PCs have evolved, the structure of keyboard codes has evolved somewhat 
  11338. haphazardly with them, resulting in a bewildering array of possible key codes. 
  11339. We'll give you a basic explanation of how key codes work.  For a more in-depth 
  11340. discussion, refer to a BIOS or PC hardware reference manual. 
  11341.  
  11342. The nuances of how your keyboard behaves depends on the keyboard manufacturer, 
  11343. the computer manufacturer who provides the built-in BIOS, and your operating 
  11344. system.  As a result, we can't guarantee the accuracy of the information in the 
  11345. tables for every system, but the discussion and reference table should be 
  11346. accurate for most systems.  Our discussion is based on the 101-key "enhanced" 
  11347. keyboard commonly used on 286, 386, 486, and Pentium computers, but virtually 
  11348. all of it is applicable to the 84-key keyboards on older systems.  The primary 
  11349. difference is that older keyboards lack a separate cursor pad and only have 10 
  11350. function keys. 
  11351.  
  11352. All keys have a scan code, but not all have an ASCII code.  For example, 
  11353. function keys and cursor keys are not part of the ASCII character set and have 
  11354. no ASCII value, but they do have a scan code.  Some keys have more than one 
  11355. ASCII code.  The A, for example, has ASCII code 97 (lower case "a") if you 
  11356. press it by itself.  If you press it along with Shift, the ASCII code changes 
  11357. to 65 (upper case "A").  If you press Ctrl and A the ASCII code changes to 1. 
  11358. In all these cases, the scan code (30) is unchanged because you are pressing 
  11359. the same physical key. 
  11360.  
  11361. Things are different if you press Alt-A.  Alt keystrokes have no ASCII code, so 
  11362. OS/2 returns an ASCII code of 0, along with the A key's scan code of 30.  This 
  11363. allows a program to detect all the possible variations of A, based on the 
  11364. combination of ASCII code and scan code. 
  11365.  
  11366. Some keys generate more than one scan code depending on whether Shift, Ctrl, or 
  11367. Alt is pressed.  This allows a program to differentiate between two different 
  11368. keystrokes on the same key, neither of which has a corresponding ASCII value. 
  11369. For example, F1 has no ASCII value so it returns an ASCII code of 0, and the F1 
  11370. scan code of 59.  Shift-F1 also returns an ASCII code 0; if it also returned a 
  11371. scan code of 59, a program couldn't distinguish it from F1.  The operating 
  11372. system translates scan codes for keys like Shift-F1 (and Ctrl-F1 and Alt-F1) so 
  11373. that each variation returns a different scan code along with an ASCII code of 
  11374. 0. 
  11375.  
  11376. On the 101-key keyboard there's one more variation:  non-ASCII keys on the 
  11377. cursor keypad (such as up-arrow) return the same scan code as the corresponding 
  11378. key on the numeric keypad, for compatibility reasons.  If they also returned an 
  11379. ASCII code of 0, a program couldn't tell which key was pressed.  Therefore, 
  11380. these keys return an ASCII code of 224 rather than 0.  This means that older 
  11381. programs, which only look for an ASCII 0 to indicate a non-ASCII keystroke like 
  11382. up-arrow, may not detect these cursor pad keys properly. 
  11383.  
  11384. The number of different codes returned by any given key varies from one (for 
  11385. the spacebar) to four, depending on the key, the design of your keyboard, and 
  11386. the operating system.  Some keys, like Alt, Ctrl, and Shift by themselves or in 
  11387. combination with each other, plus Print Screen, SysReq, Scroll Lock, Pause, 
  11388. Break, Num Lock, and Caps Lock keys, do not have any code representations at 
  11389. all.  The same is true of keystrokes with more than one modifying key, like 
  11390. Ctrl-Shift-A. The operating system may perform special actions automatically 
  11391. when you press these keys (for example, it switches into Caps Lock mode when 
  11392. you press Caps Lock), but it does not report the keystrokes to whatever program 
  11393. is running.  Programs which detect such keystrokes access the keyboard hardware 
  11394. directly, a subject which is beyond the scope of this manual. 
  11395.  
  11396.  
  11397. ΓòÉΓòÉΓòÉ 16.4. ANSI ΓòÉΓòÉΓòÉ
  11398.  
  11399. This section is a quick-reference to commonly-used ANSI commands. 
  11400.  
  11401. An ANSI command string consists of three parts: 
  11402.  
  11403.         ESC[                The ASCII character ESC, followed by a left 
  11404.                             bracket.  These two characters must be present in 
  11405.                             all ANSI strings. 
  11406.         parameters          Optional parameters for the command.  If there are 
  11407.                             multiple parameters they are separated by 
  11408.                             semicolons. 
  11409.         cmd                 A single-letter command.  The case of the letter IS 
  11410.                             meaningful. 
  11411.  
  11412.  For example, to position the cursor to row 7, column 12 the ANSI command is: 
  11413.  
  11414.           ESC[7;12H
  11415.  
  11416.  To transmit ANSI commands to the screen with 4OS2, you should use the ECHO 
  11417.  command.  The ESC character can be generated by inserting it into the string 
  11418.  directly (if you are putting the string in a batch file and your editor will 
  11419.  insert such a character), or by using 4OS2's internal "escape" character 
  11420.  (caret, [^]) followed by a lower-case "e".  For example, the sequence shown 
  11421.  above could be transmitted from a batch file with either of these commands 
  11422.  (the first uses an ESC character directly; the second uses ^e): 
  11423.  
  11424.           echo 2H
  11425.           echo ^e[7;12H
  11426.  
  11427.  You can also include ANSI commands in your prompt, using $e to transmit the 
  11428.  ESC character.  You can NOT use PROMPT to transmit ANSI commands to the screen 
  11429.  from a batch file (see PROMPT). 
  11430.  
  11431.  Commands 
  11432.  
  11433.         ESC[rowsA               Cursor up 
  11434.         ESC[rowsB               Cursor down 
  11435.         ESC[colsC               Cursor right 
  11436.         ESC[colsD               Cursor left 
  11437.         ESC[row;colH            Set cursor position (top left is row 1, column 
  11438.                                 1) 
  11439.         ESC[2J                  Clear screen 
  11440.         ESC[K                   Clear from cursor to end of line 
  11441.         ESC[row;colf            Set cursor position, same as "H" command 
  11442.         ESC[attr;attr;...m      Set display attributes; see table of attribute 
  11443.                                 values below 
  11444.         ESC[s                   Save cursor position (may not be nested) 
  11445.         ESC[u                   Restore cursor position after a save 
  11446.  
  11447.  Display Attributes 
  11448.  
  11449.         0           All attributes off (normal white on black) 
  11450.         1           High intensity (bold) 
  11451.         2           Normal intensity 
  11452.         4           Underline (usually effective only on monochrome displays) 
  11453.         5           Blinking 
  11454.         7           Reverse Video 
  11455.         8           Invisible 
  11456.         30-37       Set the foreground color: 
  11457.                       30=Black  31=Red    32=Green  33=Yellow 
  11458.                       34=Blue   35=Magenta  36=Cyan   37=White 
  11459.         40-47       Set the background color, same values as above but 
  11460.                     substitute 40 for 30 etc. 
  11461.  
  11462.  Settings are cumulative, so (for example) to set bright red foreground set all 
  11463.  attributes off, then set red, then bold, use: 
  11464.  
  11465.           echo ^e[0;31;1m
  11466.  
  11467.  Examples 
  11468.  
  11469.  Clear the display attributes, then set the display to bright cyan on blue, and 
  11470.  clear the screen: 
  11471.  
  11472.           echo ^e[0;44;36;1m^e[2J
  11473.  
  11474.  Set up a prompt which saves the cursor position, displays the 4DOS shell 
  11475.  level, date, and time on the top line in bright white on magenta, and then 
  11476.  restores the cursor position and sets the color to bright cyan on blue, and 
  11477.  displays the standard prompt: 
  11478.  
  11479.           prompt $e[s$e[1;1f$e[0;45;37;1m$e[K($z) $d $t$e[u$e[0;44;36;1m$p$g
  11480.  
  11481.  
  11482. ΓòÉΓòÉΓòÉ 17. Support ΓòÉΓòÉΓòÉ
  11483.  
  11484. You can contact JP Software at any of the following addresses.  Our normal 
  11485. business hours are 9:00 AM to 5:00 PM weekdays, eastern US time. 
  11486.  
  11487. By mail: 
  11488.  
  11489.         JP Software Inc. 
  11490.         P.O. Box 1470 
  11491.         East Arlington, MA 02174 
  11492.         USA 
  11493.  
  11494.  By telephone / fax: 
  11495.  
  11496.         Voice           (617) 646-3975 
  11497.         Fax             (617) 646-0904 
  11498.         Order Line      (800) 368-8777 (orders only, USA only) 
  11499.  
  11500.  Electronically: 
  11501.  
  11502.         CompuServe      Customer Service 75020,244 
  11503.                         Technical Support, GO JPSOFT or GO PCVENB (section 10), 
  11504.                         User ID 75300,1215 
  11505.         Internet        Customer Service 75020.244@compuserve.com 
  11506.                         Technical Support 75300.1215@compuserve.com 
  11507.         BBS Support     Via Channel 1 BBS, Boston, 617-354-5776 at 2,400 - 
  11508.                         14,400 baud, no parity, 8 data bits, 1 stop bit. 
  11509.  
  11510.  Technical support is available via public electronic support conferences, 
  11511.  private electronic mail, telephone, fax, and mail. 
  11512.  
  11513.  Often the best way to contact us for support is in one of the following public 
  11514.  electronic support conferences.  The numbers in parentheses indicate the usual 
  11515.  delay, in business days, to receive a reply to a message. 
  11516.  
  11517.  CompuServe / ZiffNet:  Primary support is via the JP Software section of the 
  11518.  CompuServe PCVENB forum (GO JPSOFT or GO PCVENB, section 10, "JP Software") (1 
  11519.  day). 
  11520.  
  11521.  Bulletin Boards:  Primary support is via the Channel 1 BBS, Boston, MA (1 - 3 
  11522.  days; see above for access details).  Messages may be left in any of the 
  11523.  "4DOS" conferences; check the online list for exact conference numbers. 
  11524.  Support is also available from many local BBSes via the "4DOS" conferences on 
  11525.  the RIME, ILink, SmartNet, and FidoNet BBS Networks (3-5 days). 
  11526.  
  11527.  Before contacting us for support, please check the manuals and other 
  11528.  documentation for answers to your question.  If you can't find what you need, 
  11529.  try the Index.  If you're having trouble getting 4OS2 to run properly, either 
  11530.  alone or with your particular hardware or software, see the Introduction and 
  11531.  Installation Guide, and the APPNOTES.DOC file.  Also look through the 
  11532.  README.DOC and UPDATxxx.DOC files, as they may contain updates to the manual 
  11533.  or other important information ("xxx" is the version number). 
  11534.  
  11535.  If you do need to contact us for support, it helps if you can give us some 
  11536.  basic information: 
  11537.  
  11538.     *   What exactly did you do?  A concise description of what steps you must 
  11539.         take to make the problem appear is much more useful than a long 
  11540.         analysis of what might be happening. 
  11541.  
  11542.     *   What went wrong?  At what point did the failure occur?  If you saw an 
  11543.         error message or other important or unusual information on the screen, 
  11544.         what exactly did it say? 
  11545.  
  11546.     *   Briefly, what techniques did you use to try to resolve the problem? 
  11547.         What results did you get? 
  11548.  
  11549.     *   What computer and operating system version are you using? 
  11550.  
  11551.     *   Are you running a network?  If so, which one, and which version? 
  11552.  
  11553.     *   What are the contents of any startup files you use (such as CONFIG.SYS, 
  11554.         4START, 4EXIT, and 4OS2.INI ), any batch files they call, and any alias 
  11555.         or environment variable files they load? 
  11556.  
  11557.     *   Can you repeat the problem or does it occur randomly?  If it's random, 
  11558.         does it seem related to the programs you're using when the problem 
  11559.         occurs? 
  11560.