home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: OtherApp / OtherApp.zip / 4os225b.zip / 4OS2.INF (.txt) < prev    next >
OS/2 Help File  |  1994-10-12  |  360KB  |  11,436 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 - 1994, JP Software Inc., All Rights Reserved. 
  9.  
  10. Copyright 1994, JP Software Inc., All Rights Reserved. 4OS2 is a trademark and 
  11. 4DOS is a registered trademark of JP Software Inc.  OS/2 is a registered 
  12. trademark of IBM Corporation.  Other product and company names are trademarks 
  13. of their respective owners. 
  14.  
  15. [9/94-2.5A] 
  16.  
  17.  
  18. ΓòÉΓòÉΓòÉ 2. Using the 4OS2 Help System ΓòÉΓòÉΓòÉ
  19.  
  20. This online help system for 4OS2 covers all 4OS2 features and internal 
  21. commands.  It includes reference information to assist you in using 4OS2 and 
  22. developing batch files; however it does not include all of the details which 
  23. are included in the printed 4OS2 manuals. 
  24.  
  25. If you type part or all of a command on the line and then press F1, the help 
  26. system will provide "context-sensitive" help by using the first word on the 
  27. line as a help topic.  If it's a valid topic, you will see help for that topic 
  28. automatically; if not, you will see the list of all help topics and you can 
  29. pick the one you want. 
  30.  
  31. You can use this feature to obtain help on any topic -- not just on commands. 
  32. For example, if you enter the command HELP _DISK you will see help for the 
  33. _DISK internal variable. 
  34.  
  35. If you type the name of any internal command at the prompt, followed by a slash 
  36. and a question mark [/?] like this: 
  37.  
  38.         copy /?
  39.  
  40. then you will see help for the command in a "quick-reference" style.  Output 
  41. from a /? display may be redirected with > or >>. 
  42.  
  43. The /? option may not work correctly if you have used an alias to redefine how 
  44. an internal command operates.  To view the /? help for such a command you must 
  45. add an asterisk to the beginning of the command to disable alias processing. 
  46. For example, if you have defined this alias: 
  47.  
  48.         alias copy *copy /r
  49.  
  50. then the command COPY /? will be translated to COPY /R /?, which will not work 
  51. properly.  However, if you use *COPY /?, the alias will be ignored and the /? 
  52. will work as you intended. 
  53.  
  54. The 4OS2 help system uses OS/2's VIEW.EXE to display this help text. Once 
  55. you've started the help system with HELP or F1, you can use VIEW's standard 
  56. keystrokes to navigate.  For more information, click on the Help menu at the 
  57. top of the VIEW window. 
  58.  
  59. Configuring the Help System 
  60.  
  61. You can select which help "books" are displayed when you press the F1 key or 
  62. enter the HELP command.  A help book is a single .INF file.  This help text is 
  63. in the file 4OS2.INF. 
  64.  
  65. By default, 4OS2 opens this book and the OS/2 command reference file, 
  66. CMDREF.INF.  You can change the default books opened for the 4OS2 help system 
  67. with the HelpBook directive in 4OS2.INI.  The default setting is 4OS2+CMDREF. 
  68. For example, to load only the 4OS2 help when you press F1 or enter the HELP 
  69. command: 
  70.  
  71.         HelpBook = 4OS2
  72.  
  73.  
  74. ΓòÉΓòÉΓòÉ 3. Conventions ΓòÉΓòÉΓòÉ
  75.  
  76. This section contains information about conventions that are used throughout 
  77. 4OS2: 
  78.  
  79.             Colors and color names 
  80.             Color-coded directories 
  81.             Keys and key names 
  82.  
  83.  These topics are combined here in a central reference spot so that they will 
  84.  be easy to find when you need to refer to them.  You will find cross 
  85.  references to this section throughout the help system. 
  86.  
  87.  
  88. ΓòÉΓòÉΓòÉ 3.1. Colors and Color Names ΓòÉΓòÉΓòÉ
  89.  
  90. You can use color names in several of the directives in the .INI file and in 
  91. many commands.  The general form of a color name is: 
  92.  
  93.     [BRIght] [BLInk] fg ON [BRIght] bg [BORder bc ] 
  94.  
  95. where fg is the foreground or text color, bg is the background color, and bc is 
  96. the border color. 
  97.  
  98. The available colors are: 
  99.  
  100.         Black           Blue            Green           Red
  101.         Magenta         Cyan            Yellow          White
  102.  
  103. Color names and the words BRIght, BLInk, and BORder may be shortened to the 
  104. first 3 letters. 
  105.  
  106. You can also specify colors by number instead of by name.  The numbers are most 
  107. useful in potentially long INI file directives like ColorDir. The following 
  108. numbers are recognized: 
  109.  
  110.   0 - Black     8 - Gray (bright black)
  111.   1 - Blue      9 - Bright blue
  112.   2 - Green    10 - Bright green
  113.   3 - Cyan     11 - Bright cyan
  114.   4 - Red      12 - Bright red
  115.   5 - Magenta  13 - Bright magenta
  116.   6 - Yellow   14 - Bright yellow
  117.   7 - White    15 - Bright white
  118.  
  119. Use one number to substitute for the [BRIght] fg portion of the color name, and 
  120. a second to substitute for the [BRIght] bg portion.  For example, instead of 
  121. bright cyan on blue you could use 11 on 1 to save space in a ColorDir 
  122. specification. 
  123.  
  124. There are several subtleties that complicate the use of colors and color names. 
  125. In order to understand them, you will need to read through the restrictions 
  126. described below.  These restrictions are due to the design of your PC video 
  127. hardware and video drivers, and are not inherent in 4OS2.  Some of the 
  128. restrictions are complex, so feel free to skip over those that do not apply to 
  129. color combinations you use. 
  130.  
  131. Some restrictions depend on the display "mode."  4OS2 can run in either normal 
  132. display mode, where it uses the full screen and has more direct control over 
  133. the video hardware; or in windowed display mode, where it appears in a window 
  134. on the OS/2 desktop. 
  135.  
  136. Monochrome Video Adapters 
  137.  
  138. If you have a monochrome video adapter, you cannot display any colors except 
  139. white and black in either normal or bright intensity. If you have a color video 
  140. adapter, you can use any of the standard colors listed above (provided you meet 
  141. the other restrictions below). 
  142.  
  143. Color Errors 
  144.  
  145. A standard color specification allows sixteen foreground and eight background 
  146. colors (sixteen if bright backgrounds are enabled, see below).  However, most 
  147. video adapters and monitors do not provide true renditions of certain colors. 
  148. For example, most users see normal "yellow" as brown, and bright yellow as 
  149. yellow; many also see normal red as red, and "bright red" as pink.  Color 
  150. errors are often much worse when running in windowed mode (see above), because 
  151. the graphical environment that created the window may not map the text-mode 
  152. colors the way you expect.  These problems are inherent in the monitor, video 
  153. adapter, and driver software.  They cannot be corrected using 4OS2 color 
  154. specifications. 
  155.  
  156. Border Colors 
  157.  
  158. In order to use border colors, you must have a color video adapter (monochrome 
  159. adapters do not support border colors). 
  160.  
  161. 4OS2 can only accept border colors in the CLS and COLOR commands, and in the 
  162. StdColors directive in the .INI file.  Border colors will be ignored, or will 
  163. cause an error, if they are used elsewhere. 
  164.  
  165. Border colors do not work in windowed mode, and will be ignored if used in a 
  166. windowed session under OS/2. 
  167.  
  168. Blinking Text and Bright Background Colors 
  169.  
  170. The interactions between blinking characters, bright backgrounds, and your 
  171. display mode can be complex.  You will need to understand them if you use 
  172. either attribute in your color specifications. 
  173.  
  174. Bright background colors are only available if you have an EGA- or 
  175. VGA-compatible display adapter.  If you have a monochrome or CGA adapter, you 
  176. can use blinking displays and ignore the interactions described below. 
  177.  
  178. The effects of blinking and bright background color specifications depend 
  179. partly on whether you are in normal or windowed display mode. 
  180.  
  181. Full-Screen Display Mode 
  182.  
  183. In full-screen display mode your video hardware can be configured via software 
  184. commands to display either blinking text, or text with a bright background, but 
  185. not both.  This is due to the design of PC video hardware, and is not a 
  186. software restriction. 
  187.  
  188. The memory on your video adapter includes a "flag" for each character on the 
  189. screen.  The flag controls blinking text and bright background colors.  If the 
  190. flag is off, the character is displayed with a normal background and does not 
  191. blink.  If the flag is "on," the character either blinks or is displayed with a 
  192. bright background, depending on which way your video adapter is currently 
  193. configured. 
  194.  
  195. In full-screen display mode, the configuration of your video adapter can be 
  196. controlled by 4OS2 with the BrightBG directive in the 4OS2.INI file or the 
  197. SETDOS /B command.  If you set BrightBG = No or use the SETDOS /B0 command, 
  198. 4OS2 will configure the video adapter for blinking text, and characters with 
  199. the blink / bright background flag set will blink.  If you set BrightBG = Yes 
  200. or use SETDOS /B1, 4OS2 will configure the video adapter for bright background 
  201. colors, and the characters will be displayed with a bright background instead. 
  202.  
  203. Because there is only one flag for each character to specify both blinking text 
  204. and bright background color, it doesn't matter which attribute you use when you 
  205. specify the color.  Whether you specify blinking text or a bright background, 
  206. you will see the same thing on your screen.  For example, these two COLOR 
  207. commands will always produce the same results: 
  208.  
  209.         color blink white on blue
  210.         color white on bright blue
  211.  
  212. If bright backgrounds are enabled, both commands will produce white text on a 
  213. bright blue background.  If blinking text is enabled, both commands will 
  214. produce blinking white text on a blue background. 
  215.  
  216. If you don't use BrightBG or SETDOS /B, or if you use SETDOS /B2, 4OS2 will not 
  217. attempt to configure your video hardware.  Most video adapters default to 
  218. blinking text in normal mode, but this can be changed by application programs. 
  219. If you use BrightBG or SETDOS /B, 4OS2 will configure the hardware each time it 
  220. displays the prompt. 
  221.  
  222. The method used to adjust the video hardware may not be compatible with all 
  223. video cards.  If you see screen "flashes" at each prompt when you use BrightBG 
  224. or SETDOS /B, discontinue using both commands.  This problem is very rare and 
  225. is not likely to occur on standard EGA and VGA systems. 
  226.  
  227. Windowed Mode 
  228.  
  229. In windowed mode, 4OS2 cannot control your hardware to select blinking or 
  230. bright backgrounds.  Instead, OS/2 displays bright background colors, 
  231. regardless of the BrightBG or SETDOS /B setting.  It does not provide a way to 
  232. display blinking characters in windowed mode.  As an example, the two commands 
  233. given above would both display white text on a bright blue background when run 
  234. in windowed mode. 
  235.  
  236. Switching Modes 
  237.  
  238. OS/2 allows you to switch any DOS session between full- screen and windowed 
  239. mode.  You cannot switch modes for OS/2 sessions, so 4OS2 is not directly 
  240. affected by mode switching. However, if you write batch files or aliases which 
  241. run in both modes, you may need to take into account that OS/2 defaults to 
  242. displaying blinking text in full-screen mode and bright backgrounds in windowed 
  243. mode. 
  244.  
  245.  
  246. ΓòÉΓòÉΓòÉ 3.2. Color-Coded Directories ΓòÉΓòÉΓòÉ
  247.  
  248. The DIR and SELECT commands can display each file name in a different color, 
  249. depending on the file's extension. 
  250.  
  251. To choose the DIR and SELECT display colors, you must either use the SET 
  252. command to create an environment variable called COLORDIR, or use the ColorDir 
  253. directive in your .INI file. 
  254.  
  255. If you do not use the COLORDIR variable or the ColorDir directive, DIR will use 
  256. the default screen colors and SELECT will use the default screen colors or 
  257. those set with the SelectColors directive. 
  258.  
  259. If you use both the COLORDIR variable and the ColorDir directive, the 
  260. environment variable will override the settings in your .INI file.  You may 
  261. find it useful to use the COLORDIR variable for experimenting, then to set 
  262. permanent directory colors with the ColorDir directive. 
  263.  
  264. The format for both the COLORDIR environment variable and the ColorDir 
  265. directive in the .INI file is: 
  266.  
  267.         ext ... :ColorName; ...
  268.  
  269. where "ext" is a file extension (which may include wildcards) or one of the 
  270. following file types: 
  271.  
  272.         DIRS      Directories
  273.         RDONLY    Read-only files
  274.         HIDDEN    Hidden files
  275.         SYSTEM    System files
  276.         ARCHIVE   Files modified since the last backup
  277.  
  278. and "ColorName" is any valid color name (see Colors). 
  279.  
  280. Unlike most color specifications, the background portion of the color name may 
  281. be left out for directory colors.  If you don't specify a background color, DIR 
  282. and SELECT will use the current screen background color. 
  283.  
  284. For example, to display the .COM and .EXE files in red on the current 
  285. background, the .C and .ASM files in bright cyan on the current background, and 
  286. the read-only files in blinking green on white (this should be entered on one 
  287. line): 
  288.  
  289.         [c:\] set colordir=com exe:red; c asm:bright cyan; rdonly:blink green on white
  290.  
  291. Extended wildcards (for example "BA[KXC]" for .BAK, .BAX, and .BAC files) can 
  292. be used in directory color specifications. 
  293.  
  294. If the extension or type of a file matches an extension or type listed in your 
  295. color specification, the remainder of the colors are ignored for that file. 
  296. You may need to take this into account in determining the order of extensions 
  297. and file types in your COLORDIR setting.  For example, you might try this 
  298. setting to display all .COM and .EXE files in red, and all other files whose 
  299. extension starts with a "C" in green: 
  300.  
  301.      c:\> set colordir=c*:green;com exe:red
  302.  
  303. However in this case the .COM files will be displayed in green, because they 
  304. match the "c*", and the ".com" later on the line is ignored.  To correct this 
  305. problem, change the line to read: 
  306.  
  307.      c:\> set colordir=com exe:red;c*:green
  308.  
  309.  
  310. ΓòÉΓòÉΓòÉ 3.3. Keys and Key Names ΓòÉΓòÉΓòÉ
  311.  
  312. Key names are used to define keystroke aliases, and in several 4OS2.INI 
  313. directives.  The format of a key name is the same in both uses: 
  314.  
  315.         [Prefix-]Keyname
  316.  
  317. The key prefix can be left out, or it can be any one of the following: 
  318.  
  319.         Alt         followed by A - Z, 0 - 9, F1 - F12, or Bksp
  320.         Ctrl        followed by A - Z, F1 - F12, Tab, Bksp, Enter,
  321.                       Left, Right, Home, End, PgUp, PgDn, Ins, or Del
  322.         Shift       followed by F1 - F12 or Tab.
  323.  
  324. The possible key names are: 
  325.  
  326.         A - Z           Enter           PgDn
  327.         0 - 9           Up              Home
  328.         F1 - F          Down            End
  329.         Esc             Left            Ins
  330.         Bksp            Right           Del
  331.         Tab             PgUp
  332.  
  333. All key names must be spelled as shown.  Alphabetic keys can be specified in 
  334. upper-case or lower-case.  You cannot specify a punctuation key. 
  335.  
  336. The prefix and key name must be separated by a dash [-].  For example: 
  337.  
  338.         Alt-F10        This is okay
  339.         Alt F10        The space will cause an error
  340.  
  341. If you prefer, you can use a numeric value instead of a key name. Use the ASCII 
  342. code for an ASCII, extended ASCII, or control character.  Use the scan code 
  343. preceded by an at sign [@] for extended key codes like F1 or the cursor keys. 
  344. For example, use 13 for Enter, or @59 for F1.  In general, you will find it 
  345. easier to use the names described above rather than key numbers. See see the 
  346. Reference Tables for an explanation and list of ASCII and key codes. 
  347.  
  348. Some keys are intercepted by OS/2 and are not passed on to 4OS2.  For example, 
  349. Ctrl-S pauses screen output temporarily, and Ctrl-Esc pops up the OS/2 window 
  350. list.  Keys which are intercepted by OS/2 generally cannot be assigned to 
  351. aliases or with key mapping directives, because 4OS2 never receives these 
  352. keystrokes and therefore cannot act on them. 
  353.  
  354. You also may not be able to use certain keys if your keyboard is not 100% 
  355. IBM-compatible or your keyboard driver does not support them.  For example, on 
  356. some systems the F11 and F12 keys are not recognized; others may not support 
  357. unusual combinations like Ctrl-Tab.  These problems are rare; when they do 
  358. occur, they are usually due to OS/2 and not to any problem with 4OS2. 
  359.  
  360.  
  361. ΓòÉΓòÉΓòÉ 4. 16-Bit and 32-Bit Versions of 4OS2 ΓòÉΓòÉΓòÉ
  362.  
  363. 4OS2 comes in two versions:  32-bit (4OS2/32) and 16-bit (4OS2/16).  If you use 
  364. OS/2 version 2.1 or above, you will find that 4OS2/32 offers a few improvements 
  365. and runs a bit faster than 4OS2/16.  Normally, the correct version is selected 
  366. for you automatically by the 4OS2 INSTALL program.  If you are using a 
  367. downloaded copy of 4OS2, see the README.DOC file which came with your copy for 
  368. details on selecting the appropriate files for your system. 
  369.  
  370. Once the proper version is selected during installation, you generally don't 
  371. need to be concerned with which version you are using, as the two versions are 
  372. almost identical.  A few features are available only in the 32-bit version; 
  373. these are marked as such in this help text and in the manuals. 
  374.  
  375. If necessary, you can install the 16-bit or 32-bit version explicitly rather 
  376. than letting the installation program choose for you.  To do so, start the 
  377. installation program (see page 4) and select the Install 16-bit Version or 
  378. Install 32-bit Version option.  These options install only the files which 
  379. differ between the two versions:  4OS2.EXE, SHRALIAS.EXE, 4OS2A.ICO, and 
  380. 4OS2B.ICO. 
  381.  
  382. 4OS2/16 runs under OS/2 1.21, 1.3, 2.0, 2.1, 2.11, and 3.0 (including "OS/2 for 
  383. Windows").  4OS2/32 normally runs only under OS/2 2.1, 2.11, and 3.0 (also 
  384. including "OS/2 for Windows").  You can install it manually for OS/2 2.0 if you 
  385. wish, but some features may not work properly due to problems with 32-bit 
  386. support in some versions of OS/2 2.0. 
  387.  
  388.  
  389. ΓòÉΓòÉΓòÉ 5. ┬áStartup ΓòÉΓòÉΓòÉ
  390.  
  391. Each 4OS2 object on your OS/2 desktop represents a different 4OS2 session.  You 
  392. can configure any of these sessions to run in windowed or full-screen mode, and 
  393. you can set any necessary command line parameters for 4OS2, by adjusting the 
  394. properties of the desktop objects. 
  395.  
  396. To adjust the properties of an object you need to be familiar with how object 
  397. properties are set in your version of OS/2.  For details see your OS/2 
  398. documentation, or the 4OS2 Introduction and Installation Guide. 
  399.  
  400. When you configure a 4OS2 object, place an asterisk [*] in the Program Name 
  401. field, and put any startup options that you want passed to 4OS2 (e.g., 
  402. @inifile) in the Parameters field.  For example: 
  403.  
  404.      Path and file name:  *
  405.      Parameters:          @D:\START\4OS2.INI
  406.      Working directory:   C:\
  407.  
  408. (If 4OS2 is not set up as your default OS/2 shell in CONFIG.SYS, use the full 
  409. path and name for 4OS2.EXE as the program name, rather than the asterisk.) 
  410.  
  411. The 4OS2 command line does not need to contain any information.  When invoked 
  412. with an empty command line, 4OS2 will configure itself from the 4OS2.INI file, 
  413. run 4START, and then display a prompt and wait for you to type a command. 
  414. However, you may add options on the 4OS2 command line to change the way 4OS2 
  415. operates. 
  416.  
  417. 4OS2 recognizes several optional fields on the command line. All of the options 
  418. go on one line.  If you use more than one of these fields, their order is 
  419. important.  The syntax for the command line is: 
  420.  
  421.         [d:\path] [@d:\path\inifile] [//iniline]... [/L] [/LA] [/LD] [/LH] [/S] 
  422.         [/C | /K] [command] 
  423.  
  424.  The options are: 
  425.  
  426.         d:\path:  4OS2 will use this directory and path to set the COMSPEC 
  427.         environment variable for this session.  If this option is not used, 
  428.         COMSPEC is set from the location of 4OS2.EXE.  4OS2 always knows what 
  429.         drive and directory it was started from and can set COMSPEC 
  430.         accordingly.  This option is included only for compatibility with 
  431.         CMD.EXE. 
  432.  
  433.         @d:\path\inifile:  This option sets the path and name of the 4OS2.INI 
  434.         file.  You do not need this option if you aren't using a 4OS2.INI file, 
  435.         or if the file is named 4OS2.INI and is stored in the same subdirectory 
  436.         as 4OS2.EXE or in the root directory of the boot drive. 
  437.  
  438.         //iniline:  This option tells 4OS2 to treat the text appearing between 
  439.         the // and the next space or tab as a 4OS2.INI directive.  The 
  440.         directive should be in the same format as a line in 4OS2.INI, but it 
  441.         may not contain spaces, tabs, or comments.  This option overrides any 
  442.         corresponding directive in your 4OS2.INI file. 
  443.  
  444.         /L, /LA, /LD, and /LH:  These options force 4OS2 to to use a local 
  445.         alias, directory history, and / or command history list.  They can be 
  446.         used to override any LocalAlias=No, LocalDirHistory=No, or 
  447.         LocalHistory=No settings in 4OS2.INI.  This allows you to use global 
  448.         lists as the default, but start a specific 4OS2 session with local 
  449.         lists. See Command History for details on local and global history, 
  450.         Directory History Window for details on local and global directory 
  451.         history, and ALIAS for details on local and global aliases.  /LA forces 
  452.         local aliases, /LD forces local directory history, /LH forces local 
  453.         history, and /L forces all three. 
  454.  
  455.         /S:  This option tells 4OS2 that you do not want it to set up a Ctrl-C 
  456.         / Ctrl-Break handler.  It is included for compatibility with CMD.EXE, 
  457.         but it may cause the system to operate incorrectly if you use this 
  458.         option without other software to handle Ctrl-C and Ctrl-Break. 
  459.  
  460.         [/C | /K] command:  This option tells 4OS2 to run a command when it 
  461.         starts.  The command will be run after 4START has been executed and 
  462.         before any command prompt is displayed.  It can be any valid internal 
  463.         or external command, batch file, or alias; you may include multiple 
  464.         commands by using the command separator.  All other startup options 
  465.         must be placed before the command, because 4OS2 will treat characters 
  466.         after the command as part of the command and not as additional startup 
  467.         options. 
  468.  
  469.         When the command is preceded by a /C, 4OS2 will execute the command and 
  470.         then exit and return to the parent program or the OS/2 desktop without 
  471.         displaying a prompt. 
  472.  
  473.         The /K switch has no effect; using it is the same as placing the 
  474.         command (without a /C or /K) at the end of the startup command line. 
  475.         It is included only for compatibility with CMD.EXE. 
  476.  
  477.  To run a startup batch file for a particular 4OS2 session, include its name 
  478.  (with a path, if the batch file is not in the session's startup directory) as 
  479.  the last item in the Parameters field when you configure the desktop object. 
  480.  That batch file will be executed after any 4START file, but before the first 
  481.  prompt is displayed.  You can use the batch file to set environment variables 
  482.  and execute any other 4OS2 commands. 
  483.  
  484.  You can also execute any internal 4OS2 command, external command, or alias by 
  485.  placing its name in the Parameters field.  For example: 
  486.  
  487.        Path and file name:  *
  488.        Parameters:          D:\STARTOS2.CMD
  489.        Working directory:   C:\
  490.  
  491.  To execute an internal or external command, an alias, or a batch file and then 
  492.  exit (return to the desktop) when it is done, place /C command (rather than 
  493.  just command) as the last item in the Parameters field.  For example: 
  494.  
  495.        Path and file name:  *
  496.        Parameters:          /C COMFILES.BTM
  497.        Working directory:   C:\
  498.  
  499.  
  500. ΓòÉΓòÉΓòÉ 6. The Command Line ΓòÉΓòÉΓòÉ
  501.  
  502. 4OS2 displays a [c:\] prompt when it is waiting for you to enter a command. 
  503. (The actual text depends on the current drive and directory as well as your 
  504. PROMPT settings.)  This is called the command line and the prompt is asking you 
  505. to enter a command, an alias or batch file name, or the instructions necessary 
  506. to begin an application program. 
  507.  
  508. This section explains the features that will help you while you are typing in 
  509. commands, and how keystrokes are interpreted when you enter them at the command 
  510. line.  The keystrokes discussed here are the ones normally used by 4OS2.  If 
  511. you prefer using different keystrokes to perform these functions, you can 
  512. assign new ones with key mapping directives in 4OS2.INI. 
  513.  
  514. The command line features documented in this section are: 
  515.  
  516.             Command-Line Editing 
  517.             Command History and Recall 
  518.             Command History Window 
  519.             Filename Completion 
  520.             Directory History Window 
  521.             Automatic Directory Changes 
  522.             Multiple Commands 
  523.             Command-Line Length Limits 
  524.             Page and File Prompts 
  525.             Conditional Commands 
  526.             Command Grouping 
  527.             Escape Character 
  528.             Critical Errors 
  529.  
  530.  Additional command-line features are documented under Redirection and Piping 
  531.  and File Selection. 
  532.  
  533.  
  534. ΓòÉΓòÉΓòÉ 6.1. Command-Line Editing ΓòÉΓòÉΓòÉ
  535.  
  536. The command line works like a single-line word processor, allowing you to edit 
  537. any part of the command at any time before you press Enter to execute it, or 
  538. Esc to erase it.  The command line extends to a maximum of 1023 characters. 
  539.  
  540. You can use the following editing keys when you are typing a command (the words 
  541. Ctrl and Shift mean to press the Ctrl or Shift key together with the other key 
  542. named): 
  543.  
  544. Cursor Movement Keys: 
  545.  
  546.                        Move the cursor left one character. 
  547.                        Move the cursor right one character. 
  548.         Ctrl           Move the cursor left one word. 
  549.         Ctrl           Move the cursor right one word. 
  550.         Home            Move the cursor to the beginning of the line. 
  551.         End             Move the cursor to the end of the line. 
  552.  
  553.  Insert and Delete: 
  554.  
  555.         Ins             Toggle between insert and overtype mode. 
  556.         Del             Delete the character at the cursor. 
  557.         Backspace       Delete the character to the left of the cursor. 
  558.         Ctrl-L          Delete the word or partial word to the left of the 
  559.                         cursor. 
  560.         Ctrl-R          or Ctrl-Bksp  Delete the word or partial word to the 
  561.                         right of the cursor. 
  562.         Ctrl-Home       Delete from the beginning of the line to the cursor. 
  563.         Ctrl-End        Delete from the cursor to the end of the line. 
  564.         Esc             Delete the entire line. 
  565.         Ctrl-C          or Ctrl-Break  Cancel the command. 
  566.         Enter           Execute the command line. 
  567.  
  568.  4OS2 will prompt for additional command-line text when you include the escape 
  569.  character as the very last character of a typed command line.  The default 
  570.  escape character is the caret [^].  For example: 
  571.  
  572.           [c:\] echo The quick brown fox jumped over the lazy^
  573.           More? sleeping dog. > alphabet
  574.  
  575.  Sometimes you may want to enter one of the above keystrokes on the command 
  576.  line instead of performing the key's usual action.  For example, suppose you 
  577.  have a program that requires a Ctrl-R character on its command line.  Normally 
  578.  you couldn't type this keystroke at the prompt, because it would be 
  579.  interpreted as a "Delete word right" command. 
  580.  
  581.  To get around this problem, use the special keystroke Alt-255. You enter 
  582.  Alt-255 by holding down the Alt key while you type 255 on the numeric keypad, 
  583.  then releasing the Alt key (you must use the number keys on the numeric pad; 
  584.  the row of keys at the top of your keyboard won't work).  This forces 4OS2 to 
  585.  interpret the next keystroke literally and places it on the command line, 
  586.  ignoring any special meaning it would normally have as a command- line editing 
  587.  or history keystroke.  You can use Alt-255 to suppress the normal meaning of 
  588.  command-line editing keystrokes even if they have been reassigned with key 
  589.  mapping directives in the .INI file, and Alt-255 itself can be reassigned with 
  590.  the CommandEscape directive. 
  591.  
  592.  If you want your input at the command line to be in a different color from 
  593.  4OS2's prompts or output, you can use the InputColors directive in your .INI 
  594.  file. 
  595.  
  596.  Most of the command-line editing capabilities are also available when a 4OS2 
  597.  command prompts you for a line of input.  For example, you can use the 
  598.  command-line editing keys when DESCRIBE prompts for a file description, when 
  599.  INPUT prompts for input from an alias or batch file, or when LIST prompts you 
  600.  for a search string. 
  601.  
  602.  
  603. ΓòÉΓòÉΓòÉ 6.2. Command History and Recall ΓòÉΓòÉΓòÉ
  604.  
  605. Command History Keys: 
  606.  
  607.                        Recall the previous (or most recent) command, or the 
  608.                         most recent command that matches a partial command 
  609.                         line. 
  610.                        Recall the next (or oldest) command, or the oldest 
  611.                         command that matches a partial command line. 
  612.         F3              Fill in the rest of the command line from the previous 
  613.                         command, beginning at the current cursor position. 
  614.         Ctrl-D          Delete the currently displayed history list entry, 
  615.                         erase the command line, and display the previous 
  616.                         matching history list entry. 
  617.         Ctrl-E          Display the last entry in the history list. 
  618.         Ctrl-K          Save the current command line in the history list 
  619.                         without executing it, and then clear the command line. 
  620.         Ctrl-Enter      Copy the current command line to the end of the history 
  621.                         list even it has not been altered. 
  622.         @               As the first character in a line:  Do not save the 
  623.                         current line in the history list when it is executed, 
  624.                         and do not store it in the CMDLINE environment 
  625.                         variable. 
  626.  
  627.  Use the  key repeatedly to scan back through the history list.  When the 
  628.  desired command appears, press Enter to execute it again.  After you have 
  629.  found a command, you can edit it before pressing Enter. 
  630.  
  631.  The history list is "circular".  If you move to the last command in the list 
  632.  and then press the down arrow one more time, you'll see the first command in 
  633.  the list.  Similarly, if you move to the first command in the list and then 
  634.  press the up arrow one more time, you'll see the last command in the list. 
  635.  
  636.  You can search the command history list to find a previous command quickly 
  637.  using command completion.  Just enter the first few characters of the command 
  638.  you want to find and press . You only need to enter enough characters to 
  639.  identify the command that you want to find.  If you press the  key a second 
  640.  time, you will see the previous command that matches.  The system will beep if 
  641.  there are no matching commands.  The search process stops as soon as you type 
  642.  one of the editing keys, whether or not the line is changed.  At that point, 
  643.  the line you're viewing becomes the new line to match if you press  again. 
  644.  
  645.  You can specify the size of the command history list with the History 
  646.  directive in the .INI file.  When the list is full, the oldest commands are 
  647.  discarded to make room for new ones.  You can also use the HistMin directive 
  648.  in the .INI file to enable or disable history saves and to specify the 
  649.  shortest command line that will be saved. 
  650.  
  651.  You can prevent any command line from being saved in the history by beginning 
  652.  it with an at sign [@]. 
  653.  
  654.  Use Ctrl-Enter to organize the history list for repetitive tasks.  Instead of 
  655.  searching through the command history for the next command in a sequence, you 
  656.  can place all of the necessary commands next to each other and make them 
  657.  easier to repeat. 
  658.  
  659.  When you execute a command from the history, that command remains in the 
  660.  history list in its original position.  The command is not copied to the end 
  661.  of the list (unless you modify it).  If you want each command to be copied to 
  662.  the end of the list when it is re- executed, set HistCopy to Yes in your .INI 
  663.  file. 
  664.  
  665.  Local and Global Command History 
  666.  
  667.  The command history can be stored in either a "local" or "global" list. 
  668.  
  669.  With a local history list, any changes made to the history will only affect 
  670.  the current copy of 4OS2.  They will not be visible in other shells, or other 
  671.  sessions. 
  672.  
  673.  With a global history list, all copies of 4OS2 will share the same command 
  674.  history, and any changes made to the history in one copy will affect all other 
  675.  copies.  Global lists are the default for 4OS2. 
  676.  
  677.  You can control the type of history list with the LocalHistory directive in 
  678.  the .INI file, and with the /L and /LH options of the START command. 
  679.  
  680.  If you select a global history list for 4OS2 you can share the history among 
  681.  all copies of 4OS2 running in any session.  When you close all 4OS2 sessions, 
  682.  the memory for the global history list is released, and a new, empty history 
  683.  list is created the next time you start 4OS2.  If you want the history list to 
  684.  be retained in memory even when no command processor session is running, you 
  685.  need to load the SHRALIAS program, which performs this service for the global 
  686.  history and alias lists.  SHRALIAS is described in more detail under the ALIAS 
  687.  command. 
  688.  
  689.  
  690. ΓòÉΓòÉΓòÉ 6.3. Command History Window ΓòÉΓòÉΓòÉ
  691.  
  692. Command History Window Keys: 
  693.  
  694.         PgUp            (from the command line) Open the command history 
  695.                         window. 
  696.          or PgDn 
  697.                        Scroll the display up one line. 
  698.                        Scroll the display down one line. 
  699.                        Scroll the display left 4 columns. 
  700.                        Scroll the display right 4 columns. 
  701.         PgUp            (inside the window) Scroll the display up one page. 
  702.         PgDn            (inside the window) Scroll the display down one page. 
  703.         Ctrl-PgUp       Go to the beginning of the history list. 
  704.          or Home 
  705.         Ctrl-PgDn       Go to the end of the history list. 
  706.          or End 
  707.         Ctrl-D          Delete the selected line from the history list. 
  708.         Enter           Execute the selected line. 
  709.         Ctrl-Enter      Move the selected line to the command line for editing. 
  710.  
  711.  You can view the command history in a scrollable command history window, and 
  712.  select the command to modify or re-execute from those displayed in the window. 
  713.  To activate the command history window press PgUp or PgDn at the command line. 
  714.  A window will appear in the upper right corner of the screen, with the command 
  715.  you most recently executed marked with a highlight. (If you just finished 
  716.  re-executing a command from the history, then the next command in sequence 
  717.  will be highlighted.) 
  718.  
  719.  Once you have selected a command in the history window, press Enter to execute 
  720.  it immediately, or Ctrl-Enter to move the line to the prompt for editing (you 
  721.  cannot edit the line directly in the history window). 
  722.  
  723.  You can bring up a "filtered" history window by typing some characters on the 
  724.  command line, then pressing PgUp or PgDn. Only those commands matching the 
  725.  typed characters will be displayed in the window. 
  726.  
  727.  You can control the position and size of the history window with configuration 
  728.  directives in 4OS2.INI.  You can also change the keys used in the window with 
  729.  key mapping directives in the .INI file. 
  730.  
  731.  
  732. ΓòÉΓòÉΓòÉ 6.4. Filename Completion ΓòÉΓòÉΓòÉ
  733.  
  734. Filename Completion Keys: 
  735.  
  736.         F8                  Get the previous matching filename. 
  737.          or Shift-Tab 
  738.         F9                  Get the next matching filename. 
  739.          or Tab 
  740.         F10                 Keep the current matching filename and display the 
  741.                             next matching name immediately after the current 
  742.                             one. 
  743.  
  744.  Filename completion can help you by filling in a complete file name on the 
  745.  command line when you only remember part of the name.  For example, if you 
  746.  know the name of a file begins AU but you can't remember the rest of the name, 
  747.  type: 
  748.  
  749.           [c:\] copy au
  750.  
  751.  and then press the Tab key or F9 key.  4OS2 will search the current directory 
  752.  for filenames that begin AU and insert the first one onto the command line in 
  753.  place of the AU that you typed. 
  754.  
  755.  If this is the file that you want, simply complete the command.  If 4OS2 
  756.  didn't find the file that you were looking for, press Tab or F9 again to 
  757.  substitute the next filename that begins with AU.  When there are no more 
  758.  filenames that match your pattern, the system will beep each time you press 
  759.  Tab or F9. 
  760.  
  761.  If you go past the filename that you want, press Shift-Tab or F8 to back up 
  762.  and return to the previous matching filename. After you back up to the first 
  763.  filename, the system will beep each time you press Shift-Tab or F8. 
  764.  
  765.  If you want to enter more than one matching filename on the same command line, 
  766.  press F10 when each desired name appears.  This will keep that name and place 
  767.  the next matching filename after it on the command line.  You can then use Tab 
  768.  (or F9) and Shift-Tab (or F8) to move through the remaining matching files. 
  769.  
  770.  The pattern you use for matching may contain any valid filename characters, as 
  771.  well as wildcard characters and extended wildcards.  For example, you can copy 
  772.  the first matching .TXT file by typing 
  773.  
  774.           [c:\] copy *.txt
  775.  
  776.  and then pressing Tab. 
  777.  
  778.  If you don't specify part of a filename before pressing Tab, the matching 
  779.  pattern will be *.*.  If you type a filename without an extension, 4OS2 will 
  780.  add *.* to the name.  It will also place a "*" after a partial extension.  If 
  781.  you are typing a group of file names in an include list, the part of the 
  782.  include list at the cursor will be used as the pattern to match. 
  783.  
  784.  When filename completion is used at the start of the command line, it will 
  785.  only match directories, executable files, and files with executable 
  786.  extensions, since these are the only file names that it makes sense to use at 
  787.  the start of a command.  If a directory is found, a "\" will be appended to it 
  788.  to enable an automatic directory change. 
  789.  
  790.  Filename Completion Window 
  791.  
  792.  You can also view filenames in a scrollable filename completion window and 
  793.  select the file you want to work with.  To activate the window, press F7 or 
  794.  Ctrl-Tab at the command line.  You will see a window in the upper-right corner 
  795.  of the screen, with the names of files that match any partial filename you 
  796.  have entered on the command line.  If you haven't yet entered a file name, the 
  797.  window will contain the name of all files in the current directory. (Ctrl-Tab 
  798.  will work only if your keyboard and keyboard driver support it.  If it does 
  799.  not work on your system, use F7 instead.) 
  800.  
  801.  Filename Completion Window Keys: 
  802.  
  803.         F7                  (from the command line)  Open the filename 
  804.                             completion window. 
  805.          or Ctrl-Tab 
  806.                            Scroll the display up one line. 
  807.                            Scroll the display down one line. 
  808.                            Scroll the display left 4 columns. 
  809.                            Scroll the display right 4 columns. 
  810.         PgUp                Scroll the display up one page. 
  811.         PgDn                Scroll the display down one page. 
  812.         Ctrl-PgUp           Go to the beginning of the filename list. 
  813.          or Home 
  814.         Ctrl-PgDn           Go to the end of the filename list. 
  815.          or End 
  816.         Enter               Insert the selected filename into the command line. 
  817.  
  818.  
  819. ΓòÉΓòÉΓòÉ 6.5. Directory History Window ΓòÉΓòÉΓòÉ
  820.  
  821. Directory History Window Keys: 
  822.  
  823.         Ctrl-PgUp       (from the command line) Open the directory history 
  824.                         window. 
  825.          or Ctrl-PgDn 
  826.                        Scroll the display up one line. 
  827.                        Scroll the display down one line. 
  828.                        Scroll the display left 4 columns. 
  829.                        Scroll the display right 4 columns. 
  830.         PgUp            Scroll the display up one page. 
  831.         PgDn            Scroll the display down one page. 
  832.         Ctrl-PgUp       Go to the beginning of the directory list. 
  833.          or Home 
  834.         Ctrl-PgDn       Go to the end of the directory list. 
  835.          or End 
  836.         Ctrl-D          Delete the selected line from the directory list. 
  837.         Enter           Change to the selected drive and directory. 
  838.         Ctrl-Enter      Move the selected line to the command line for editing. 
  839.  
  840.  Every time you change to a new directory or drive, the current directory 
  841.  directory is recorded in an internal directory history list. You can set the 
  842.  size of the list with the DirHistory directive in 4OS2.INI.  As new entries 
  843.  are added, old entries are deleted from the list.  Directory changes are 
  844.  recorded whether you make them from the command line with the CD, CDD, PUSHD, 
  845.  or POPD commands, with an automatic directory change, or by typing a new drive 
  846.  letter followed by a colon. Directories are recorded whether you change from 
  847.  one to another at the command line, from within a batch file, or from within 
  848.  an alias.  In order to conserve space, each directory name is recorded just 
  849.  once in the directory history, even if you move into and out of that directory 
  850.  several times. 
  851.  
  852.  You can view the directory history from the scrollable directory history 
  853.  window and change to any drive and directory on the list. To activate the 
  854.  directory history window, press Ctrl-PgUp or Ctrl-PgDn at the command line. 
  855.  You can then select a new directory with the Enter key. 
  856.  
  857.  See also Local and Global Directory History. 
  858.  
  859.  
  860. ΓòÉΓòÉΓòÉ 6.5.1. Local and Global Directory History ΓòÉΓòÉΓòÉ
  861.  
  862. The directory history can be stored in either a "local" or "global" list. 
  863.  
  864. With a local directory history list, any changes made to the list will only 
  865. affect the current copy of the command processor.  They will not be visible in 
  866. other shells, or other sessions. 
  867.  
  868. With a global list, all copies of the command processor will share the same 
  869. directory history, and any changes made to the list in one copy will affect all 
  870. other copies. 
  871.  
  872. You can control the type of directory history list with the LocalDirHistory 
  873. directive in 4OS2.INI, and with the /L and /LD options of the START command. 
  874.  
  875. There is no fixed rule for deciding whether to use a local or global directory 
  876. history list.  Depending on your work style, you may find it most convenient to 
  877. use one type, or a mixture of types in different sessions or shells.  We 
  878. recommend that you start with the default, then modify it if you find a 
  879. situation where the default is not convenient. 
  880.  
  881. If you select a global directory list, you can share the list among all copies 
  882. of the command processor running in any session.  When you close all 4OS2 
  883. sessions, the memory for the global directory history list is released, and a 
  884. new, empty list is created the next time you start 4OS2.  If you want the list 
  885. to be retained in memory even when no command processor session is running, you 
  886. need to load the SHRALIAS program, which performs this service for the global 
  887. command history, directory history, and alias lists.  SHRALIAS is described in 
  888. more detail under the ALIAS command. 
  889.  
  890. Whenever you start a secondary shell which uses a local history list, it 
  891. inherits a copy of the directory history from the previous shell.  However, any 
  892. changes to the list made in the secondary shell will affect only that shell. 
  893. If you want changes made in a secondary shell to affect the previous shell, use 
  894. a global directory history list in both shells. 
  895.  
  896.  
  897. ΓòÉΓòÉΓòÉ 6.6. Automatic Directory Changes ΓòÉΓòÉΓòÉ
  898.  
  899. The automatic directory change feature gives you a quick method for changing 
  900. directories.  You can use an automatic directory change in place of the CD or 
  901. CDD command.  To do so, simply type the name of the directory you want to 
  902. change to at the prompt, with a backslash [\] at the end.  For example: 
  903.  
  904.         [c:\] 4os2\
  905.         [c:\4os2]
  906.  
  907. This feature can make directory changes very simple when it's combined with 
  908. CDPATH, a list of directories for the CD and CDD commands to search if the 
  909. directory you name does not exist below the current directory.  For example, 
  910. suppose CDPATH is set to C:\;D:\;E:\, and the directory WIN exists on drive E:. 
  911. You can change to this directory with a single word on the command line: 
  912.  
  913.         [c:\4os2] win\
  914.         [e:\win]
  915.  
  916. In executing the command shown above, 4OS2 first looks for a WIN subdirectory 
  917. of the current directory, i.e., C:\4OS2\WIN.  If no such directory exists it 
  918. looks for a WIN subdirectory in every directory in the CDPATH list, and changes 
  919. to the first one it finds. 
  920.  
  921. Internally, automatic directory changes use the CDD command, so the text before 
  922. the backslash can include a drive letter, a full path, or a partial path. 
  923. Commands like "....\" can be used to move up the directory tree quickly (see 
  924. Extended Parent Directory Names). Automatic directory changes save the current 
  925. directory, so it can be recalled with a "CDD -" or "CD -" command. 
  926.  
  927.  
  928. ΓòÉΓòÉΓòÉ 6.7. Multiple Commands ΓòÉΓòÉΓòÉ
  929.  
  930. You can type several commands on the same command line, separated by an 
  931. ampersand [&].  For example, if you know you want to copy all of your .TXT 
  932. files to drive A: and then run CHKDSK to be sure that drive A's file structure 
  933. is in good shape, you could enter the following command: 
  934.  
  935.         [c:\] copy *.txt a: & chkdsk a:
  936.  
  937. You may put as many commands on the command line as you wish, as long as the 
  938. total length of the command line does not exceed 1023 characters. 
  939.  
  940. You can use multiple commands in batch files and alias definitions as well as 
  941. from the command line. 
  942.  
  943. If you don't like using the default command separator, you can pick another 
  944. character using the SETDOS /C command or the CommandSep directive in the .INI 
  945. file.  If you plan to share aliases or batch files between 4DOS, 4OS2, and 
  946. 4DOS/NT, see 4DOS, 4OS2, and 4DOS/NT Compatibility for details about choosing 
  947. compatible command separators for two or more products. 
  948.  
  949.  
  950. ΓòÉΓòÉΓòÉ 6.8. Command-Line Length Limits ΓòÉΓòÉΓòÉ
  951.  
  952. When you first enter a command at the prompt or in an alias or batch file, it 
  953. can be up to 1,023 characters long. 
  954.  
  955. As 4OS2 scans the command line and substitutes the contents of aliases and 
  956. environment variables for their names, the line usually gets longer.  This 
  957. expanded line is stored in an internal buffer which allows each individual 
  958. command to grow to 1,023 characters during the expansion process.  In addition, 
  959. if you have multiple commands on a single line, during expansion the entire 
  960. line can grow to as much as 2,047 characters.  If your use of aliases or 
  961. environment variables causes the command line to exceed either of these limits 
  962. as it is expanded, you will see an error message and the remainder of the line 
  963. will not be executed. 
  964.  
  965.  
  966. ΓòÉΓòÉΓòÉ 6.9. Page and File Prompts ΓòÉΓòÉΓòÉ
  967.  
  968. Several 4OS2 commands can generate prompts, which wait for you to press a key 
  969. to view a new page or to perform a file activity. 
  970.  
  971. When 4OS2 is displaying information in page mode, for example with a DIR /P or 
  972. SET /P command, it displays the message 
  973.  
  974.         Press Esc to Quit or any other key to continue...
  975.  
  976. At this prompt, you can press Esc, Ctrl-C, or Ctrl- Break if you want to quit 
  977. the command.  You can press almost any other key to continue with the command 
  978. and see the next page of information. 
  979.  
  980. During file processing, if you have activated prompting with a command like DEL 
  981. /P, you will see this prompt before processing every file: 
  982.  
  983.         Y/N/R ?
  984.  
  985. You can answer this prompt by pressing "Y" for "Yes, process this file;"  "N" 
  986. for "No, do not process this file;"  or "R" for "process the Remainder of the 
  987. files without further prompting."  You can also press Ctrl-C or Ctrl-Break at 
  988. this prompt to cancel 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.  Date, time, and size ranges can be used with the ATTRIB, COPY, DEL, DESCRIBE, 
  1494.  DIR, EXCEPT, FOR, LIST, MOVE, RD, REN, SELECT, and TYPE commands. They cannot 
  1495.  be used with filename completion or in filename arguments for variable 
  1496.  functions. 
  1497.  
  1498.  
  1499. ΓòÉΓòÉΓòÉ 8.3.1. Size Ranges ΓòÉΓòÉΓòÉ
  1500.  
  1501. Size ranges simply select files whose size is between the limits given.  For 
  1502. example, /[s10000,20000] selects files between 10,000 and 20,000 bytes long. 
  1503.  
  1504. Either or both values in a size range can end with "k" to indicate thousands of 
  1505. bytes, "K" to indicate kilobytes (1,024 bytes), "m" to indicate millions of 
  1506. bytes, or "M" to indicate megabytes (1,048,576 bytes).  For example, the range 
  1507. above could be rewritten as /[s10k,20k]. 
  1508.  
  1509. All ranges are inclusive.  Both examples above will match files that are 
  1510. exactly 10,000 bytes and 20,000 bytes long, as well as all sizes in between. 
  1511.  
  1512. The second argument of a size range is optional.  If you use a single argument, 
  1513. like /[s10k], you will select files of that size or larger.  You can also 
  1514. precede the second argument with a plus sign [+]; when you do, it is added to 
  1515. the first value to determine the largest file size to include in the search. 
  1516. For example,  /[s10k,+1k] select files from 10,000 through 11,000 bytes in 
  1517. size. 
  1518.  
  1519. Some further examples of size ranges: 
  1520.  
  1521.         Specification       Selects Files
  1522.  
  1523.         /[s0,0]             of length zero (empty)
  1524.         /[s1M]              1 megabyte or more in length
  1525.         /[s10k,+200]        between 10,000 and 10,200 bytes
  1526.  
  1527.  
  1528. ΓòÉΓòÉΓòÉ 8.3.2. Date Ranges ΓòÉΓòÉΓòÉ
  1529.  
  1530. Date ranges select files that were created or last modified at any time between 
  1531. the two dates.  For example, /[d12-1-94,12-5-94] selects files that were last 
  1532. modified between December 1, 1994, and December 5, 1994. 
  1533.  
  1534. The time for the starting date defaults to 00:00:00 and the time for the ending 
  1535. date defaults to 23:59:59.  You can alter these defaults, if you wish, by 
  1536. including a start and stop time inside the date range.  The time is separated 
  1537. from the date with an at sign [@].  For example, the range 
  1538. /[d7-1-95@8:00a,7-3-95@6:00p] selects files that were modified at any time 
  1539. between 8:00 am on July 1, 1995 and 6:00 pm on July 3, 1995.  If you prefer, 
  1540. you can specify the times in 24-hour format (e.g., @18:00 for the end time in 
  1541. the previous example). 
  1542.  
  1543. If you omit the second argument in a date range, 4OS2 substitutes the current 
  1544. date and time.  For example, /[d10-1-94] selects files dated between October 1, 
  1545. 1994 and today. 
  1546.  
  1547. You can use an offset value for either the beginning or ending date, or both. 
  1548. An offset begins with a plus sign [+] or a minus sign [-] followed by an 
  1549. integer.  If you use an offset for the second value, it is calculated relative 
  1550. to the first.  If you use an offset for the first (or only) value, the current 
  1551. date is used as the basis for calculation.  For example: 
  1552.  
  1553.         Specification       Selects Files
  1554.  
  1555.         /[d10-27-94,+3]     modified between 10-27-94 and 10-30-94
  1556.         /[d10-27-94,-3]     modified between 10-24-94 and 10-27-94
  1557.         /[d-0]              modified today (from today minus zero days, to today)
  1558.         /[d-1]              modified yesterday or today (from today minus one day,
  1559.                             to today)
  1560.         /[d-1,+0]           modified yesterday (from today minus one day, to zero
  1561.                             days after that)
  1562.  
  1563. You cannot use offsets in the time portion of a date range (the part after an 
  1564. at sign), but you can combine a time with a date offset.  For example, 
  1565. /[d12-8-94@12:00,+2@12:00] selects files that were last modified between noon 
  1566. on December 8 and noon on December 10, 1994.  Similarly, /[d-2@15:00,+1] 
  1567. selects files last modified between 3:00 pm the day before yesterday and the 
  1568. end of the day one day after that, i.e., yesterday.  The second time defaults 
  1569. to the end of the day because no time is given. 
  1570.  
  1571. The HPFS file system maintains 3 sets of dates and times for each file: 
  1572. creation, last access, and last modification.  By default, date ranges work 
  1573. with the last modification date/time stamp.  You can use the "last access" (a) 
  1574. or "created" (c) date/time stamp in a date range with the syntax: 
  1575.  
  1576.         /[da...]  or  /[dc...]
  1577.  
  1578. For example, to select files that were last accessed yesterday or today: 
  1579.  
  1580.         /[da-1]
  1581.  
  1582.  
  1583. ΓòÉΓòÉΓòÉ 8.3.3. Time Ranges ΓòÉΓòÉΓòÉ
  1584.  
  1585. A time range specifies a file modification time without reference to the date. 
  1586. For example, to select files modified between noon and 2:00 pm on any date, use 
  1587. /[t12:00p,2:00p].  The times in a time range can either be in 12-hour format, 
  1588. with a trailing "a" for AM or "p" for PM, or in 24-hour format. 
  1589.  
  1590. If you omit the second argument in a time range, you will select files that 
  1591. were modified between the first time and the current time, on any date.  You 
  1592. can also use offsets, beginning with a plus sign [+] or a minus sign [-] for 
  1593. either or both of the arguments in a time range.  The offset values are 
  1594. interpreted as minutes.  Some examples: 
  1595.  
  1596.         Specification       Selects Files
  1597.  
  1598.         /[t12:00p,+120]     modified between noon and 2:00 PM on any date
  1599.         /[t-120,+120]       modified between two hours ago and the
  1600.                             current time on any date
  1601.         /[t0:00,11:59]      modified in the morning on any date
  1602. The HPFS file system maintains 3 sets of date and time for each file: creation, 
  1603. last access, and last modification.  By default, time ranges work with the last 
  1604. modification time stamp.  You can use the "last access" (a) or "created" (c) 
  1605. time stamp in a time range with the syntax: 
  1606.  
  1607.         /[ta...]  or  /[tc...]
  1608.  
  1609.  
  1610. ΓòÉΓòÉΓòÉ 8.4. Multiple Filenames ΓòÉΓòÉΓòÉ
  1611.  
  1612. Most file processing commands can work with multiple files at one time.  To use 
  1613. multiple file names, you simply list the files one after another on the command 
  1614. line, separated by spaces.  You can use wildcards in any or all of the 
  1615. filenames.  For example, to copy all .TXT and .DOC files from the current 
  1616. directory to drive A, you could use this command: 
  1617.  
  1618.         [c:\] copy *.txt *.doc a:
  1619.  
  1620. If the files you want to work with are not in the default directory, you must 
  1621. include the full path with each filename: 
  1622.  
  1623.         [c:\] copy a:\details\file1.txt a:\details\file1.doc c:
  1624.  
  1625. Multiple filenames are handy when you want to match a group of files which 
  1626. cannot be defined with a single filename and wildcards.  They let you be very 
  1627. specific about which files you want to work with in a command. 
  1628.  
  1629. When you use multiple filenames with a command that expects both a source and a 
  1630. destination, like COPY or MOVE, be sure that you always include a specific 
  1631. destination on the command line.  If you don't, the command will assume that 
  1632. the last filename is the destination and may overwrite important files. 
  1633.  
  1634. Like extended wildcards and include lists, the multiple filename feature will 
  1635. work with internal commands but not with external programs, unless those 
  1636. programs have been written to handle multiple file names on the command line. 
  1637.  
  1638. If you have a list of files to process that's too long to put on the command 
  1639. line or too time-consuming to type, see the SELECT command for another way of 
  1640. passing multiple file names to a command. 
  1641.  
  1642.  
  1643. ΓòÉΓòÉΓòÉ 8.5. Include Lists ΓòÉΓòÉΓòÉ
  1644.  
  1645. Any internal command that accepts multiple filenames will also accept one or 
  1646. more include lists.  An include list is simply a group of filenames, with or 
  1647. without wildcards, separated by semicolons [;].  All files in the include list 
  1648. must be in the same directory.  You may not add a space on either side of the 
  1649. semicolon. 
  1650.  
  1651. For example, you can shorten this command which uses multiple file names: 
  1652.  
  1653.         c:\> copy a:\details\file1.txt a:\details\file1.doc c:
  1654.  
  1655. to this using an include list: 
  1656.  
  1657.         c:\> copy a:\details\file1.txt;file1.doc c:
  1658.  
  1659. Multiple filenames and include lists are processed differently by the DIR and 
  1660. SELECT commands. If you use multiple filenames, all of the files matching the 
  1661. first filename are processed, then all of the files matching the second name, 
  1662. and so on.  When you use an include list, all files that match any entry in the 
  1663. include list are processed together, and will appear together in the directory 
  1664. display or SELECT list.  You can see this difference clearly if you experiment 
  1665. with both techniques and the DIR command.  For example, 
  1666.  
  1667.         [c:\] dir *.txt *.doc
  1668.  
  1669. will list all the .TXT files with a directory header, the file list, and a 
  1670. summary of the total number of files and bytes used.  Then it will do the same 
  1671. for the .DOC files.  However, 
  1672.  
  1673.         [c:\] dir *.txt;*.doc
  1674.  
  1675. will display all the files in one list. 
  1676.  
  1677. Like extended wildcards and multiple filenames, the include list feature will 
  1678. work with internal commands, but not with external programs (unless they have 
  1679. been programmed especially to support it). 
  1680.  
  1681.  
  1682. ΓòÉΓòÉΓòÉ 8.6. Executable Extensions ΓòÉΓòÉΓòÉ
  1683.  
  1684.  The syntax for creating an executable extension is: 
  1685.  
  1686.         set .ext=command [options]
  1687.  
  1688. This tells 4OS2 to run the specified command whenever you name a file with the 
  1689. extension .ext at the prompt. 
  1690.  
  1691. .EXT is the executable file extension; command is the name of the internal 
  1692. command, external program, alias, or batch file to run; and [options] are any 
  1693. command-line startup options you want to specify for the program, batch file, 
  1694. or alias. 
  1695.  
  1696. Normally, when you type a filename (as opposed to an alias or internal command 
  1697. name) as the first word on the command line, 4OS2 looks for a file with that 
  1698. name to execute.  The file's extension may be .EXE or .COM to indicate that it 
  1699. contains a program, it may have a batch file extension like .BTM, or the file's 
  1700. contents may indicate that it is executable. 
  1701.  
  1702. You can add to this default list of extensions, and have 4OS2 take the action 
  1703. you want with files that are not executable programs or batch files.  The 
  1704. action taken is always based on the file's extension.  For example, you could 
  1705. start your text editor whenever you type the name of a .DOC file, or start your 
  1706. database manager whenever you type the name of a .DAT file. 
  1707.  
  1708. Environment variables define the internal command, external program, batch 
  1709. file, or alias to run for each defined file extension.  To create an executable 
  1710. extension, use the SET command to create a new environment variable.  An 
  1711. environment variable is recognized as an executable extension if its name 
  1712. begins with a period. 
  1713.  
  1714. For example, if you want to run a word processor called EDITOR whenever you 
  1715. type the name of a file that has an extension of .EDT, you could use this 
  1716. command: 
  1717.  
  1718.         [c:\] set .edt=c:\edit\editor.exe
  1719.  
  1720. If the command specified in an executable extension is a batch file or external 
  1721. program, 4OS2 will search the PATH for it if necessary.  However, you can make 
  1722. sure that the correct program or batch file is used, and speed up the 
  1723. executable extension, by specifying the full name including drive, path, 
  1724. filename, and extension. 
  1725.  
  1726. Once an executable extension is defined, any time you name a file with that 
  1727. extension the corresponding program, batch file, or alias is started, with the 
  1728. name of your file passed to it as a parameter. 
  1729.  
  1730. The following example defines QBASIC.EXE as the processor for .BAS files: 
  1731.  
  1732.         [c:\] set .bas=c:\dos\qbasic.exe /run
  1733.  
  1734. With this definition, if you have a file named PUSHCART.BAS in the current 
  1735. directory and enter the command: 
  1736.  
  1737.         [c:\] pushcart
  1738.  
  1739. 4OS2 will execute the command: 
  1740.  
  1741.         c:\dos\qbasic.exe /run pushcart.bas
  1742.  
  1743. The next example defines B.EXE (the Brief text editor) as the processor for .C 
  1744. files: 
  1745.  
  1746.         [c:\] set .c=c:\brief\b.exe -Mxyz
  1747.  
  1748. Now, if you have a file called HELLO.C and enter the command 
  1749.  
  1750.         [c:\] hello -i30
  1751.  
  1752. This will be expanded to: 
  1753.  
  1754.         c:\brief\b.exe -Mxyz hello.c -i30
  1755.  
  1756. Notice that the text from the .C environment variable is inserted at the 
  1757. beginning of the line, including any options, followed by the original file 
  1758. name plus its extension, and then the remainder of the original command line. 
  1759.  
  1760. In order for executable extensions to work, the command, program, batch file, 
  1761. or alias must be able to interpret the command line properly.  For example, if 
  1762. a program you want to run doesn't accept a file name on its command line as 
  1763. shown in these examples, then executable extensions won't work with that 
  1764. program. 
  1765.  
  1766. Executable extensions may include wildcards, so you could, for example, run 
  1767. your text editor for any file with an extension beginning with T by defining an 
  1768. executable extension called .T*.  Extended wildcards (e.g., DO[CT] for .DOC and 
  1769. .DOT files) may also be used. 
  1770.  
  1771.  
  1772. ΓòÉΓòÉΓòÉ 9. Batch Files ΓòÉΓòÉΓòÉ
  1773.  
  1774. A batch file is a file that contains a list of commands to execute.  4OS2 reads 
  1775. and interprets each line as if it had been typed at the keyboard.  Like 
  1776. aliases, batch files are handy for automating computing tasks.  Unlike aliases, 
  1777. batch files can be as long as you wish.  Batch files take up separate disk 
  1778. space for each file, and can't usually execute quite as quickly as aliases, 
  1779. since they must be read from the disk. 
  1780.  
  1781. The topics included in this section are: 
  1782.  
  1783.             .BAT, .CMD, and .BTM Files 
  1784.             Echoing in Batch Files 
  1785.             Batch File Parameters 
  1786.             Automatic Batch Files 
  1787.             Detecting 4OS2 
  1788.             Batch File Compression 
  1789.             Argument Quoting 
  1790.             4DOS, 4OS2, and 4DOS/NT Compatibility 
  1791.             REXX Support 
  1792.             EXTPROC Support 
  1793.  
  1794.  
  1795. ΓòÉΓòÉΓòÉ 9.1. .BAT, .CMD, and .BTM Files ΓòÉΓòÉΓòÉ
  1796.  
  1797. A batch file can run in two different modes.  In the first, traditional mode, 
  1798. each line of the batch file is read and executed individually.  In the second 
  1799. mode, the entire batch file is read into memory at once.  The second mode can 
  1800. be 5 to 10 times faster, especially if most of the commands in the batch file 
  1801. are internal commands.  However, only the first mode can be used for 
  1802. self-modifying batch files (which are rare), and for batch files larger than 
  1803. 64K bytes. 
  1804.  
  1805. The batch file's extension determines its mode.  Files with a .CMD extension 
  1806. are run in the slower, traditional mode.  Files with a .BTM extension are run 
  1807. in the faster, more efficient mode.  You can change the execution mode inside a 
  1808. batch file with the LOADBTM command. 
  1809.  
  1810.  
  1811. ΓòÉΓòÉΓòÉ 9.2. Echoing in Batch Files ΓòÉΓòÉΓòÉ
  1812.  
  1813. By default, each line in a batch file is displayed or "echoed" as it is 
  1814. executed.  You can change this behavior, if you want, in several different 
  1815. ways: 
  1816.  
  1817.         Any batch file line that begins with an [@] symbol will not be 
  1818.         displayed. 
  1819.  
  1820.         The display can be turned off and on within a batch file with the ECHO 
  1821.         OFF and ECHO ON commands. 
  1822.  
  1823.         The default setting can be changed with the SETDOS /V command or the 
  1824.         BatchEcho directive in the .INI file. 
  1825.  
  1826.  For example, the following line turns off echoing inside a batch file.  The 
  1827.  [@] symbol keeps the batch file from displaying the ECHO OFF command: 
  1828.  
  1829.           @echo off
  1830.  
  1831.  4OS2 also has a command line echo that is unrelated to the batch file echo 
  1832.  setting.  See ECHO for details about both settings. 
  1833.  
  1834.  
  1835. ΓòÉΓòÉΓòÉ 9.3. Batch File Parameters ΓòÉΓòÉΓòÉ
  1836.  
  1837. Like aliases and application programs, batch files can examine the command line 
  1838. that is used to invoke them.  The command tail (everything on the command line 
  1839. after the batch file name) is separated into individual parameters (also called 
  1840. arguments or batch variables) by scanning for the spaces, tabs, and commas that 
  1841. separate the parameters.  A batch file can work with the individual parameters 
  1842. or with the command tail as a whole. 
  1843.  
  1844. These parameters are numbered from %1 to %127.  %1 refers to the first 
  1845. parameter on the command line, %2 to the second, and so on.  It is up to the 
  1846. batch file to determine the meaning of each parameter.  You can use quotation 
  1847. marks to pass spaces, tabs, commas, and other special characters in a batch 
  1848. file parameter; see Argument Quoting for details. 
  1849.  
  1850. Parameters that are referred to in a batch file, but which are missing on the 
  1851. command line, appear as empty strings inside the batch file.  For example, if 
  1852. you start a batch file and put two parameters on the command line, any 
  1853. reference in the batch file to %3, or any higher-numbered parameter, will be 
  1854. interpreted as an empty string. 
  1855.  
  1856. A batch file can also work with three special parameters:  %0 contains the name 
  1857. of the batch file as it was entered on the command line, %# contains the number 
  1858. of command line arguments, and %n$ contains the complete command-line tail 
  1859. starting with argument number "n" (for example, %3$ means the third parameter 
  1860. and all those after it).  The default value of "n" is 1, so %$ contains the 
  1861. entire command tail.  The values of these special parameters will change if you 
  1862. use the SHIFT command. 
  1863.  
  1864. By default, 4DOS uses an ampersand [&] instead of a dollar sign [$] to indicate 
  1865. the remainder of the command tail.  For example, %& means all the parameters, 
  1866. and %2& means the second parameter and all those after it.  If you want to 
  1867. share batch files or aliases between 4DOS and 4OS2, you can select a new 
  1868. character for any product with the SETDOS /P command or the ParameterChar 
  1869. directive in your .INI file. 
  1870.  
  1871. For example, if your batch file interprets the first argument as a subdirectory 
  1872. name then the following line would move to the specified directory: 
  1873.  
  1874.         cd %1
  1875.  
  1876. Batch files can also use environment variables, internal variables, and 
  1877. variable functions. 
  1878.  
  1879.  
  1880. ΓòÉΓòÉΓòÉ 9.4. Automatic Batch Files ΓòÉΓòÉΓòÉ
  1881.  
  1882. Each time 4OS2 starts as either a primary or a secondary shell, it looks for an 
  1883. automatic batch file called 4START.BTM or 4START.CMD.  If the 4START batch file 
  1884. is not in the same directory as 4OS2 itself, you should use the 4StartPath 
  1885. directive in your .INI file to specify its location.  4START is optional, so 
  1886. 4OS2 will not display an error message if it cannot find the file. 
  1887.  
  1888. Whenever a 4OS2 shell ends, it runs a third automatic batch file called 
  1889. 4EXIT.BTM, 4EXIT.CMD.  This file, if you use it, should be in the same 
  1890. directory as your 4START batch file.  Like 4START, 4EXIT is optional.  It is 
  1891. not necessary in most circumstances, but it is a convenient place to put 
  1892. commands to save information such as a history list before a shell ends, or LOG 
  1893. the end of the shell. 
  1894.  
  1895.  
  1896. ΓòÉΓòÉΓòÉ 9.5. Detecting 4OS2 ΓòÉΓòÉΓòÉ
  1897.  
  1898. From a batch file, you can determine if 4OS2 is loaded by testing for the 
  1899. variable function @EVAL, with a test like this: 
  1900.  
  1901.         if "%@eval[2+2]" == "4" echo 4OS2 is loaded!
  1902.  
  1903. This test can never succeed in CMD.EXE. Other variable functions could be used 
  1904. for the same purpose. 
  1905.  
  1906.  
  1907. ΓòÉΓòÉΓòÉ 9.6. Batch File Compression ΓòÉΓòÉΓòÉ
  1908.  
  1909. You can compress your .BTM files with a program called BATCOMP.EXE, which is 
  1910. distributed with 4OS2.  This program condenses batch files by about a third and 
  1911. makes them unreadable with the LIST command and similar utilities.  Compressed 
  1912. batch files run at approximately the same speed as regular .BTM files. 
  1913.  
  1914. You may want to consider compressing batch files if you need to distribute them 
  1915. to others and keep your original code secret or prevent your users from 
  1916. altering them.  You may also want to consider compressing batch files to save 
  1917. some disk space on the systems where the compressed files are used. 
  1918.  
  1919. The full syntax for the batch compression program is 
  1920.  
  1921.         BATCOMP [/O] input file [output file ]
  1922.  
  1923. You must specify the full name of the input file, including its extension, on 
  1924. the BATCOMP command line.  If you do not specify the output file, BATCOMP will 
  1925. use the same base name as the input file and add a .BTM extension.  BATCOMP 
  1926. will also add a .BTM extension if you specify a base name for the output file 
  1927. without an extension.  For example, to compress MYBATCH.CMD and save the result 
  1928. as MYBATCH.BTM, you can use any of these three commands: 
  1929.  
  1930.         [c:\] batcomp mybatch.cmd
  1931.         [c:\] batcomp mybatch.cmd mybatch
  1932.         [c:\] batcomp mybatch.cmd mybatch.btm
  1933.  
  1934. If the output file (MYBATCH.BTM in the examples above) already exists, BATCOMP 
  1935. will prompt you before overwriting the file.  You can disable the prompt by 
  1936. including /O on the BATCOMP command line immediately before the input file 
  1937. name.  Even if you use the /O option, BATCOMP will not compress a file into 
  1938. itself. 
  1939.  
  1940. JP Software does not provide a decompression utility to uncompress batch files. 
  1941. If you use BATCOMP.EXE, make sure that you also keep a copy of the original 
  1942. batch file for future inspection or modification. 
  1943.  
  1944. Each of our command processors includes its own version of BATCOMP.EXE, set up 
  1945. to run under the corresponding operating system. However, the output produced 
  1946. by each program is the same, so a batch file compressed with any version of 
  1947. BATCOMP can be used with any JP Software command processor. 
  1948.  
  1949. If you plan to distribute batch files to users of different platforms, see 
  1950. 4DOS, 4OS2, and 4DOS/NT Compatibility. 
  1951.  
  1952.  
  1953. ΓòÉΓòÉΓòÉ 9.7. Argument Quoting ΓòÉΓòÉΓòÉ
  1954.  
  1955. As it parses the command line, 4OS2 looks for the ampersand [&] command 
  1956. separator, conditional commands (|| or &&), white space (spaces, tabs, and 
  1957. commas), percent signs [%] which indicate variables to be expanded, and 
  1958. redirection and piping characters (>, <, or |). 
  1959.  
  1960. Normally, these special characters cannot be passed to a command as part of an 
  1961. argument.  However, you can include any of the special characters in an 
  1962. argument by enclosing the entire argument in single back quotes [`] or double 
  1963. quotes ["].  Although both back quotes and double quotes will let you build 
  1964. arguments that include special characters, they do not work the same way. 
  1965.  
  1966. No alias or variable expansion is performed on an argument enclosed in back 
  1967. quotes.  Redirection symbols inside the back quotes are ignored.  The back 
  1968. quotes are removed from the command line before the command is executed. 
  1969.  
  1970. No alias expansion is performed on expressions enclosed in double quotes. 
  1971. Redirection symbols inside double quotes are ignored. However, variable 
  1972. expansion is performed on expressions inside double quotes.  The double quotes 
  1973. themselves will be passed to the command as part of the argument. 
  1974.  
  1975. For example, suppose you have a batch file CHKNAME.BTM which expects a name as 
  1976. its first parameter (%1).  Normally the name is a single word.  If you need to 
  1977. pass a two-word name with a space in it to this batch file you could use the 
  1978. command: 
  1979.  
  1980.         [c:\] chkname `MY NAME`
  1981.  
  1982. Inside the batch file, %1 will have the value MY NAME, including the space. 
  1983. The back quotes caused 4OS2 to pass the string to the batch file as a single 
  1984. argument.  The quotes keep characters together and reduce the number of 
  1985. arguments in the line. 
  1986.  
  1987. When an alias is defined in a batch file or from the command line, its argument 
  1988. can be enclosed in back quotes to prevent the expansion of replaceable 
  1989. parameters, variables, and multiple commands until the alias is invoked.  See 
  1990. ALIAS for details. 
  1991.  
  1992. You can disable and re-enable back quotes and double quotes with the SETDOS /X 
  1993. command. 
  1994.  
  1995.  
  1996. ΓòÉΓòÉΓòÉ 9.8. 4DOS, 4OS2, and 4DOS/NT Compatibility ΓòÉΓòÉΓòÉ
  1997.  
  1998. If you use two or more of our products, or if you want to share aliases and 
  1999. batch files with users of different products, you need to be aware of the 
  2000. differences in three important characters:  the Command Separator (see Multiple 
  2001. Commands), the Escape Character (see Escape Character), and the Parameter 
  2002. Character (see Batch File Parameters). 
  2003.  
  2004. The default values of each of these characters in each product is shown in the 
  2005. following chart (in this section, <Ctrl-X> stands for the ASCII Ctrl-X 
  2006. character, numeric value 24.  This character appears on your screen as an 
  2007. up-arrow [].): 
  2008.  
  2009.         Character           4DOS Default   4OS2 and 4NT Default
  2010.  
  2011.         Command Separator        ^              &
  2012.         Escape Character         <Ctrl-X>       ^
  2013.         Parameter Character      &              $
  2014.  
  2015. In your batch files and aliases, and even at the command line, you can smooth 
  2016. over these differences in two ways: 
  2017.  
  2018.         *   Select a consistent set of characters with .INI file configuration 
  2019.             directives or the SETDOS command.  For example, to set the 4OS2 
  2020.             characters to match 4DOS, use: 
  2021.  
  2022.                                 CommandSep = ^
  2023.                                 EscapeChar = <Ctrl-X>
  2024.                                 ParameterChar = &
  2025.  
  2026.             in 4OS2.INI. 
  2027.  
  2028.         *   Use internal variables that contain the current special character, 
  2029.             rather than using the character itself (see + and =).  For example, 
  2030.             this command: 
  2031.  
  2032.                                 if "%1" == "" (echo Argument missing! ^ quit)
  2033.  
  2034.             will only work if the command separator is a caret. However, this 
  2035.             version works regardless of the current command separator: 
  2036.  
  2037.                                 if "%1" == "" (echo Argument missing! %+ quit)
  2038.  
  2039.  
  2040.  The following chart shows the correspondence between the appropriate SETDOS 
  2041.  command options, .INI file directives, and internal variables: 
  2042.  
  2043.           Special                 SETDOS   INI File     Internal
  2044.           Character               Switch   Directive    Variable
  2045.  
  2046.           Command Separator        /C      CommandSep     %+
  2047.           Escape Character         /E      EscapeChar     %=
  2048.           Parameter Character      /P      ParameterChar  (none)
  2049.  
  2050.  
  2051. ΓòÉΓòÉΓòÉ 9.9. REXX Support ΓòÉΓòÉΓòÉ
  2052.  
  2053. REXX is a a powerful file and text processing language developed by IBM, and 
  2054. available on many PC and other platforms.  REXX is an ideal extension to the 
  2055. 4OS2 batch language, especially if you need advanced string processing 
  2056. capabilities. 
  2057.  
  2058. The REXX language is not built into 4OS2.  Under IBM OS/2 1.3 and above you can 
  2059. use the built-in REXX language provided by IBM, or use Personal REXX for OS/2, 
  2060. developed by Quercus Systems of Saratoga, CA.  (Personal REXX is available from 
  2061. JP Software or directly from Quercus Systems.) 
  2062.  
  2063. REXX programs are stored in .CMD files.  4OS2 checks to see if the first two 
  2064. characters on the first line of a .CMD file are [/*], the beginning of a REXX 
  2065. comment.  If so, it passes the file to OS/2's built-in REXX facility for 
  2066. processing.  If Personal REXX for OS/2 is installed, it automatically replaces 
  2067. OS/2's built-in REXX, and handles all REXX commands passed by 4OS2. 
  2068.  
  2069. Both Personal REXX and OS/2's built-in REXX extend the interface between REXX 
  2070. and 4OS2 by allowing you to invoke 4OS2 commands from within a REXX program. 
  2071. For details, or for more information on any aspect of REXX, see your Personal 
  2072. REXX or OS/2 REXX documentation. 
  2073.  
  2074.  
  2075. ΓòÉΓòÉΓòÉ 9.10. EXTPROC Support ΓòÉΓòÉΓòÉ
  2076.  
  2077. 4OS2 offers an external processor (EXTPROC) option for batch files that lets 
  2078. you define an external program to process a particular .CMD file.  To identify 
  2079. a .CMD file to be used with an external processor, place the string "EXTPROC" 
  2080. as the first word on the first line of the file, followed by the name of the 
  2081. external program that should be called.  4OS2 will start the program and pass 
  2082. it the name of the .CMD file and any command-line arguments that were entered. 
  2083.  
  2084. For example, suppose GETDATA.CMD contains the following lines: 
  2085.  
  2086.         EXTPROC D:\DATAACQ\DATALOAD.EXE
  2087.         OPEN PORT1
  2088.         READ 4000
  2089.         DISKWRITE D:\DATAACQ\PORT1\RAW
  2090.  
  2091. Then if you entered the command: 
  2092.  
  2093.         [d:\dataacq] getdata /p17
  2094.  
  2095. 4OS2 would read the GETDATA.CMD file, determine that it began with an EXTPROC 
  2096. command, read the name of the processor program, and then execute the command: 
  2097.  
  2098.         D:\DATAACQ\DATALOAD.EXE D:\DATAACQ\GETDATA.CMD /p17
  2099.  
  2100. The hypothetical DATALOAD.EXE program would then be responsible for reopening 
  2101. the GETDATA.CMD file, ignoring the EXTPROC line at the start, and interpreting 
  2102. the other instructions in the file. It would also have to respond appropriately 
  2103. to the command-line parameter entered (/p17). 
  2104.  
  2105. Do not try to use 4OS2 as the external processor named on the EXTPROC line in 
  2106. the .CMD file.  It will interpret the EXTPROC line as a command to re-open 
  2107. themselves.  The result will be an infinite loop that will continue until the 
  2108. computer runs out of resources and locks up. 
  2109.  
  2110.  
  2111. ΓòÉΓòÉΓòÉ 10. The Environment ΓòÉΓòÉΓòÉ
  2112.  
  2113. The environment is a collection of information about your computer that every 
  2114. program receives.  Each entry in the environment consists of a variable name, 
  2115. followed by an equal sign and a string of text.  You can automatically 
  2116. substitute the text for the variable name in any command.  To create the 
  2117. substitution, include a percent sign [%] and a variable name on the command 
  2118. line or in an alias or batch file. 
  2119.  
  2120. The following environment variables have special meanings in 4OS2: 
  2121.  
  2122.             CDPATH 
  2123.             CMDLINE 
  2124.             COLORDIR 
  2125.             COMSPEC 
  2126.             PATH 
  2127.             PROMPT 
  2128.  
  2129.  4OS2 also supports two special types of variables.  Internal variables are 
  2130.  similar to environment variables, but are stored internally within 4OS2, and 
  2131.  are not visible in the environment.  They provide information about your 
  2132.  system for use in batch files and aliases.  Variable functions are referenced 
  2133.  like environment variables, but perform additional functions like file 
  2134.  handling, string manipulation and arithmetic calculations. 
  2135.  
  2136.  The SET command is used to create environment variables. For example, you can 
  2137.  create a variable named BACKUP like this: 
  2138.  
  2139.           [c:\] set BACKUP=*.bak;*.bk!;*.bk
  2140.  
  2141.  If you then type 
  2142.  
  2143.           [c:\] del %BACKUP
  2144.  
  2145.  it is equivalent to the following command: 
  2146.  
  2147.           del *.bak;*.bk!;*.bk
  2148.  
  2149.  The variable names you use this way may contain any alphabetic or numeric 
  2150.  characters, the underscore character [_], and the dollar sign [$].  You can 
  2151.  force acceptance of other characters by including the full variable name in 
  2152.  square brackets, like this: %[AB##2].  You can also "nest" environment 
  2153.  variables using square brackets.  For example %[%var1] means "the contents of 
  2154.  the variable whose name is stored in VAR1".  A variable referenced with this 
  2155.  technique cannot contain more than 255 characters of information.  Nested 
  2156.  variable expansion can be disabled with the SETDOS /X command. 
  2157.  
  2158.  In 4OS2 the size of the environment is set automatically, and increased as 
  2159.  needed when you add variables. 
  2160.  
  2161.  The trailing percent sign that was traditionally required for environment 
  2162.  variable names is not usually required in 4OS2, which accept any character 
  2163.  that cannot be part of a variable name as the terminator.  However, the 
  2164.  trailing percent can be used to maintain compatibility. 
  2165.  
  2166.  The trailing percent sign is needed if you want to join two variable values. 
  2167.  The following examples show the possible interactions between variables and 
  2168.  literal strings.  First, create two environment variables called ONE and TWO 
  2169.  this way: 
  2170.  
  2171.           [c:\] set ONE=abcd
  2172.           [c:\] set TWO=efgh
  2173.  
  2174.  Now the following combinations produce the output text shown: 
  2175.  
  2176.           %ONE%TWO            abcdTWO   ("%ONE%" + "TWO")
  2177.           %ONE%TWO%           abcdTWO   ("%ONE%" + "TWO%")
  2178.           %ONE%%TWO           abcdefgh  ("%ONE%" + "%TWO")
  2179.           %ONE%%TWO%          abcdefgh  ("%ONE%" + "%TWO%")
  2180.           %ONE%[TWO]          abcd[TWO] ("%ONE%" + "[TWO]")
  2181.           %ONE%[TWO]%         abcd[TWO] ("%ONE%" + "[TWO]%")
  2182.           %[ONE]%TWO          abcdefgh  ("%[ONE]" + "%TWO")
  2183.           %[ONE]%TWO%         abcdefgh  ("%[ONE]" + "%TWO%")
  2184.  
  2185.  If you want to pass a percent sign to a command, or a string which includes a 
  2186.  percent sign, you must use two percent signs in a row. Otherwise, the single 
  2187.  percent sign will be seen as the beginning of a variable name and will not be 
  2188.  passed on to the command.  For example, to display the string "We're with you 
  2189.  100%" you would use the command: 
  2190.  
  2191.           echo We're with you 100%%
  2192.  
  2193.  You can also use back quotes around the text, rather than a double percent 
  2194.  sign.  See Argument Quoting for details. 
  2195.  
  2196.  
  2197. ΓòÉΓòÉΓòÉ 10.1. CDPATH ΓòÉΓòÉΓòÉ
  2198.  
  2199. CDPATH tells 4OS2 where to search for directories specified by the CD, CDD, and 
  2200. PUSHD commands and in automatic directory changes.  (_CDPATH can be used as an 
  2201. alternative to CDPATH if you are using Microsoft Bookshelf, which uses a CDPATH 
  2202. variable for its own purposes.) 
  2203.  
  2204. CDPATH is composed of a list of directories, separated by semicolons [;].  If 
  2205. CD, CDD, PUSHD, or an automatic directory change can't locate the specified 
  2206. directory to change to, they will append the specified directory name to each 
  2207. directory in CDPATH and attempt to change to that drive and directory, until 
  2208. the first match or the end of the CDPATH argument.  This allows you to use 
  2209. CDPATH as a quick way to find commonly used subdirectories which have unique 
  2210. names.  For example, if you are currently in the directory 
  2211. C:\WP\LETTERS\JANUARY and you'd like to change to D:\SOFTWARE\UTIL, you could 
  2212. enter the command: 
  2213.  
  2214.         [c:\wp\letters\january] cdd d:\software\util
  2215.  
  2216. However, if the D:\SOFTWARE directory is listed in your CDPATH variable, and is 
  2217. the first directory in the list with a UTIL subdirectory, you can simply enter 
  2218. the command 
  2219.  
  2220.         [c:\wp\letters\january] cdd util
  2221.  
  2222. to change to D:\SOFTWARE\UTIL. 
  2223.  
  2224. You can create CDPATH with the SET command.  For example, if you want the 
  2225. directory change commands to search the C:\DATA directory, the D:\SOFTWARE 
  2226. directory, and the root directory of drive E:\ for the subdirectories that you 
  2227. name, you should create CDPATH with this command: 
  2228.  
  2229.         [c:\] set cdpath=c:\data;d:\software;e:\
  2230.  
  2231.  
  2232. ΓòÉΓòÉΓòÉ 10.2. CMDLINE ΓòÉΓòÉΓòÉ
  2233.  
  2234. CMDLINE is the fully expanded text of the currently executing command line. 
  2235. CMDLINE is set just before invoking any .COM, .EXE, .BTM, .BAT, or .CMD file. 
  2236. If a command line is prefaced with an "@" to prevent echoing, it will not be 
  2237. put in CMDLINE, and any previous CMDLINE variable will be removed from the 
  2238. environment. 
  2239.  
  2240.  
  2241. ΓòÉΓòÉΓòÉ 10.3. ┬áCOLORDIR ΓòÉΓòÉΓòÉ
  2242.  
  2243. COLORDIR controls directory display colors used by DIR and SELECT.  See 
  2244. Color-Coded Directories for a complete description of the format of this 
  2245. variable. 
  2246.  
  2247.  
  2248. ΓòÉΓòÉΓòÉ 10.4. COMSPEC ΓòÉΓòÉΓòÉ
  2249.  
  2250. COMSPEC contains the full path and name of 4OS2.  For example, if 4OS2 is 
  2251. stored in the directory C:\4OS2, the COMSPEC variable should be set to 
  2252. C:\4OS2\4OS2.EXE.  COMSPEC is used by applications which need to find 4OS2 to 
  2253. implement a "shell to the command prompt" feature. 
  2254.  
  2255. You can set the COMSPEC variable by specifying the COMSPEC path with a SET 
  2256. COMSPEC command in CONFIG.SYS, or including the COMSPEC path on the 4OS2 
  2257. startup command line. 
  2258.  
  2259.  
  2260. ΓòÉΓòÉΓòÉ 10.5. ┬áPATH ΓòÉΓòÉΓòÉ
  2261.  
  2262. PATH is a list of directories that 4OS2 will search for executable files that 
  2263. aren't in the current directory.  PATH may also be used by some application 
  2264. programs to find their own files. See the PATH command for a full description 
  2265. of this variable. 
  2266.  
  2267.  
  2268. ΓòÉΓòÉΓòÉ 10.6. ┬áPROMPT ΓòÉΓòÉΓòÉ
  2269.  
  2270. PROMPT defines the command-line prompt.  It can be set or changed with the 
  2271. PROMPT command. 
  2272.  
  2273.  
  2274. ΓòÉΓòÉΓòÉ 11. Internal Variables ΓòÉΓòÉΓòÉ
  2275.  
  2276. Internal variables are special variables built into 4OS2 to provide information 
  2277. about your system.  They are not actually stored in the environment, but can be 
  2278. used in commands, aliases, and batch files just like any environment variable. 
  2279. The values of these variables are stored internally in 4OS2, and cannot be 
  2280. changed with the SET, UNSET, or ESET command.  However, you can override any of 
  2281. these variables by defining a new variable with the same name. 
  2282.  
  2283. The list below gives a one-line description of each variable, and a 
  2284. cross-reference which selects a full screen help topic on that variable. Most 
  2285. of the variables are simple enough that the one-line description is sufficient. 
  2286. However, for those variables marked with an asterisk [*], the cross-reference 
  2287. topic contains some additional information you may wish to review.  You can 
  2288. also obtain help on any variable with a HELP variablename command at the prompt 
  2289. (this is why each variable has its own topic, in addition to its appearance in 
  2290. the list below). 
  2291.  
  2292. See the discussion after the variable list for some additional information, and 
  2293. examples of how these variables can be used. 
  2294.  
  2295. The variables are: 
  2296.  
  2297. Hardware status 
  2298.  
  2299.         _CPU            CPU type (86, 186, 200, 386, 486, 586) 
  2300.         _MONITOR        Monitor type (mono or color) 
  2301.         _NDP            Coprocessor type (0, 87, 287, 387) 
  2302.         _VIDEO          Video board type (mono, cga, ega, vga, xga, 8514, or 
  2303.                         IA/A) 
  2304.  
  2305.  Operating system and software status 
  2306.  
  2307.         _ANSI           ANSI status (always 1 in 4OS2) 
  2308.         _BOOT           Boot drive letter, without a colon 
  2309.         _CODEPAGE       Current code page number 
  2310.         _COUNTRY        Current country code 
  2311.         _DOS            * Operating system (DOS, OS2, or NT) 
  2312.         _DOSVER         * Operating system version (2.1, 3.0, etc.) 
  2313.         _KBHIT          Keystroke waiting in buffer (0 or 1) 
  2314.         _MOUSE          Mouse driver flag (always 1 in 4OS2) 
  2315.  
  2316.  Command processor status 
  2317.  
  2318.         _4VER           4OS2 version (2.5, 2.51, etc.) 
  2319.         _BATCH          Batch nesting level 
  2320.         _BATCHLINE      Current line number in current batch file 
  2321.         _BATCHNAME      Name of current batch file 
  2322.         _DNAME          Name of file used to store file descriptions 
  2323.         _HLOGFILE       Current history log file name 
  2324.         _LOGFILE        Current log file name 
  2325.         _PID            4OS2 process ID (numeric) 
  2326.         _PIPE           Whether running in a pipe 
  2327.         _PPID           Parent process ID (numeric) 
  2328.         _PTYPE          OS/2 session type (AVIO, DT, FS, PM) 
  2329.         _SHELL          Shell level (0, 1, 2, ...) 
  2330.         _SID            Current OS/2 session ID 
  2331.         _TRANSIENT      * Transient shell flag (0 or 1) 
  2332.         _WINTITLE       Current window title 
  2333.  
  2334.  Screen and color 
  2335.  
  2336.         _BG             Background color at cursor position 
  2337.         _COLUMN         Current cursor column 
  2338.         _COLUMNS        Screen width 
  2339.         _FG             Foreground color at cursor position 
  2340.         _ROW            Current cursor row 
  2341.         _ROWS           Screen height 
  2342.  
  2343.  Drives and directories 
  2344.  
  2345.         _CWD            Current drive and directory (d:\path) 
  2346.         _CWDS           Current drive and directory with trailing \ (d:\path\) 
  2347.         _CWP            Current directory (\path) 
  2348.         _CWPS           Current directory with trailing \ (\path\) 
  2349.         _DISK           Current drive (C, D, etc.) 
  2350.         _LASTDISK       Last possible drive (E, F, etc.) 
  2351.  
  2352.  Dates and times 
  2353.  
  2354.         _DATE           * Current date (mm-dd-yy) 
  2355.         _DAY            Day of the month (1 - 31) 
  2356.         _DOW            Day of the week (Mon, Tue, Wed, etc.) 
  2357.         _DOY            Day of the year (1 - 366) 
  2358.         _HOUR           Hour (0 - 23) 
  2359.         _MINUTE         Minute (0 - 59) 
  2360.         _MONTH          Month of the year (1 - 12) 
  2361.         _SECOND         Second (0 - 59) 
  2362.         _TIME           * Current time (hh:mm:ss) 
  2363.         _YEAR           Year (1980 - 2099) 
  2364.  
  2365.  Error codes 
  2366.  
  2367.         ?               * Exit code, last external program 
  2368.         _?              * Exit code, last internal command 
  2369.         _SYSERR         * Last OS/2 error code 
  2370.  
  2371.  Compatibility 
  2372.  
  2373.         =               * Substitutes escape character 
  2374.         +               * Substitutes command separator 
  2375.  
  2376.  Examples 
  2377.  
  2378.  You can use these variables in a wide variety of ways depending on your needs. 
  2379.  Here are just a few examples.  Some of these examples rely on the IF and IFF 
  2380.  commands to test the value of a variable and perform different actions based 
  2381.  on that value. 
  2382.  
  2383.  In a batch file, set the color based on the video card type: 
  2384.  
  2385.           iff "%_video"=="mono" then
  2386.             color bright white on black
  2387.           else
  2388.             color bright white on blue
  2389.           endiff
  2390.  
  2391.  Store the current date and time in a file, then save the output of a DIR 
  2392.  command in the same file: 
  2393.  
  2394.           echo Directory as of %_date %_time > dirsave
  2395.           dir >> dirsave
  2396.  
  2397.  Set up a prompt for the primary shell which displays the time and current 
  2398.  directory, and a different one for secondary shells which includes the shell 
  2399.  level rather than the time (see PROMPT for details about setting the prompt). 
  2400.  Also set different background colors for the two shells, without changing the 
  2401.  foreground color.  You might use a sequence like this in your 4START file (see 
  2402.  Automatic Batch Files): 
  2403.  
  2404.           iff %_shell==0 then
  2405.             prompt $t $p$g
  2406.             color %_fg on blue
  2407.           else
  2408.             prompt [$z] $p$g
  2409.             color %_fg on cyan
  2410.           endiff
  2411.  
  2412.  
  2413. ΓòÉΓòÉΓòÉ 11.1. ┬á? ΓòÉΓòÉΓòÉ
  2414.  
  2415. ? contains the exit code of the last external command.  Many programs return a 
  2416. "0" to indicate success and a non-zero value to signal an error.  However, not 
  2417. all programs return an exit code.  If no explicit exit code is returned, the 
  2418. value of %? is undefined. 
  2419.  
  2420.  
  2421. ΓòÉΓòÉΓòÉ 11.2. _? ΓòÉΓòÉΓòÉ
  2422.  
  2423. _? contains the exit code of the last internal command.  It is set to "0" if 
  2424. the command was successful, "1" if a usage error occurred, "2" if another 
  2425. command processor error or an operating system error occurred, or "3" if the 
  2426. command was interrupted by Ctrl-C or Ctrl-Break.  You must use or save this 
  2427. value immediately, because it is set by every internal command. 
  2428.  
  2429.  
  2430. ΓòÉΓòÉΓòÉ 11.3. = ΓòÉΓòÉΓòÉ
  2431.  
  2432. = returns the current escape character.  Use this variable, instead of the 
  2433. actual escape character, if you want your batch files and aliases to work 
  2434. regardless of how the escape character is defined.  For example, if the escape 
  2435. character is a caret [^] (the default in 4OS2) both of the commands below will 
  2436. send a form feed to the printer.  However, if the escape character has been 
  2437. changed,  the first command will send the string "^f" to the printer, while the 
  2438. second command will continue to work as intended. 
  2439.  
  2440.         echos ^f > prn
  2441.         echos %=f > prn
  2442.  
  2443.  
  2444. ΓòÉΓòÉΓòÉ 11.4. + ΓòÉΓòÉΓòÉ
  2445.  
  2446. + returns the current command separator.  Use this variable, instead of the 
  2447. actual command separator, if you want your batch files and aliases to work 
  2448. regardless of how the command separator is defined.  For example, if the 
  2449. command separator is an ampersand [&] (the default in 4OS2) both of the 
  2450. commands below will display "Hello" on one line and "world" on the next. 
  2451. However, if the command separator has been changed the first command will 
  2452. display "Hello & echo world", while the second command will continue to work as 
  2453. intended. 
  2454.  
  2455.         echo Hello & echo world
  2456.         echo Hello %+ echo world
  2457.  
  2458.  
  2459. ΓòÉΓòÉΓòÉ 11.5. _4VER ΓòÉΓòÉΓòÉ
  2460.  
  2461. _4VER is the current 4OS2 version (for example, "2.5"). 
  2462.  
  2463.  
  2464. ΓòÉΓòÉΓòÉ 11.6. _ANSI ΓòÉΓòÉΓòÉ
  2465.  
  2466. _ANSI is always "1" in 4OS2.  (4OS2 enables OS/2's ANSI support, and assumes 
  2467. that it remains enabled.) 
  2468.  
  2469.  
  2470. ΓòÉΓòÉΓòÉ 11.7. _BATCH ΓòÉΓòÉΓòÉ
  2471.  
  2472. _BATCH is the current batch nesting level.  It is "0" if no batch file is 
  2473. currently being processed. 
  2474.  
  2475.  
  2476. ΓòÉΓòÉΓòÉ 11.8. _BATCHLINE ΓòÉΓòÉΓòÉ
  2477.  
  2478. _BATCHLINE is the current line number in the current batch file.  It is "-1" if 
  2479. no batch file is currently being processed. 
  2480.  
  2481.  
  2482. ΓòÉΓòÉΓòÉ 11.9. _BATCHNAME ΓòÉΓòÉΓòÉ
  2483.  
  2484. _BATCHNAME is the full pathname of the current batch file.  It is an empty 
  2485. string if no batch file is currently being processed. 
  2486.  
  2487.  
  2488. ΓòÉΓòÉΓòÉ 11.10. _BG ΓòÉΓòÉΓòÉ
  2489.  
  2490. _BG is a string containing the first three characters of the screen background 
  2491. color at the current cursor location (for example, "Bla"). 
  2492.  
  2493.  
  2494. ΓòÉΓòÉΓòÉ 11.11. _BOOT ΓòÉΓòÉΓòÉ
  2495.  
  2496. _BOOT is the boot drive letter, without a colon. 
  2497.  
  2498.  
  2499. ΓòÉΓòÉΓòÉ 11.12. _CODEPAGE ΓòÉΓòÉΓòÉ
  2500.  
  2501. _CODEPAGE is the current code page number (see CHCP). 
  2502.  
  2503.  
  2504. ΓòÉΓòÉΓòÉ 11.13. _COLUMN ΓòÉΓòÉΓòÉ
  2505.  
  2506. _COLUMN is the current cursor column (for example, "0" for the left side of the 
  2507. screen). 
  2508.  
  2509.  
  2510. ΓòÉΓòÉΓòÉ 11.14. _COLUMNS ΓòÉΓòÉΓòÉ
  2511.  
  2512. _COLUMNS is the current number of screen columns (for example, "80"). 
  2513.  
  2514.  
  2515. ΓòÉΓòÉΓòÉ 11.15. _COUNTRY ΓòÉΓòÉΓòÉ
  2516.  
  2517. _COUNTRY is the current country code. 
  2518.  
  2519.  
  2520. ΓòÉΓòÉΓòÉ 11.16. _CPU ΓòÉΓòÉΓòÉ
  2521.  
  2522. _CPU is the CPU type: 
  2523.  
  2524.         86      8086 and 8088 
  2525.         186     80186 and 80188 
  2526.         200     NEC V20 and V30 
  2527.         286     80286 
  2528.         386     i386 
  2529.         486     i486 
  2530.         586     Pentium 
  2531.  
  2532.  
  2533. ΓòÉΓòÉΓòÉ 11.17. _CWD ΓòÉΓòÉΓòÉ
  2534.  
  2535. _CWD is the current working directory in the format d:\pathname. 
  2536.  
  2537.  
  2538. ΓòÉΓòÉΓòÉ 11.18. _CWDS ΓòÉΓòÉΓòÉ
  2539.  
  2540. _CWDS has the same value as CWD, except it ends the pathname with a backslash 
  2541. [\]. 
  2542.  
  2543.  
  2544. ΓòÉΓòÉΓòÉ 11.19. _CWP ΓòÉΓòÉΓòÉ
  2545.  
  2546. _CWP is the current working directory in the format \pathname. 
  2547.  
  2548.  
  2549. ΓòÉΓòÉΓòÉ 11.20. _CWPS ΓòÉΓòÉΓòÉ
  2550.  
  2551. _CWPS has the same value as CWP, except it ends the pathname with a backslash 
  2552. [\]. 
  2553.  
  2554.  
  2555. ΓòÉΓòÉΓòÉ 11.21. _DATE ΓòÉΓòÉΓòÉ
  2556.  
  2557. _DATE contains the current system date, in the format mm-dd-yy (U.S.), dd-mm-yy 
  2558. (Europe), or yy-mm-dd (Japan). 
  2559.  
  2560.  
  2561. ΓòÉΓòÉΓòÉ 11.22. _DAY ΓòÉΓòÉΓòÉ
  2562.  
  2563. _DAY is the day of the month (1 to 31). 
  2564.  
  2565.  
  2566. ΓòÉΓòÉΓòÉ 11.23. _DISK ΓòÉΓòÉΓòÉ
  2567.  
  2568. _DISK is the current disk drive, without a colon (for example, "C"). 
  2569.  
  2570.  
  2571. ΓòÉΓòÉΓòÉ 11.24. _DOS ΓòÉΓòÉΓòÉ
  2572.  
  2573. _DOS is the operating system type ("DOS", "OS2", or "NT").  4DOS always returns 
  2574. "DOS", 4OS2 always returns "OS2", and 4DOS/NT always returns "NT".  This may be 
  2575. useful if you have batch files running under more than one operating system. 
  2576.  
  2577.  
  2578. ΓòÉΓòÉΓòÉ 11.25. _DNAME ΓòÉΓòÉΓòÉ
  2579.  
  2580. _DNAME is the name of the file used to store file descriptions.  It can be 
  2581. changed with the DescriptionName directive in 4OS2.INI. 
  2582.  
  2583.  
  2584. ΓòÉΓòÉΓòÉ 11.26. _DOSVER ΓòÉΓòÉΓòÉ
  2585.  
  2586. _DOSVER is the current operating system version (for example, "3.0"). 
  2587.  
  2588.  
  2589. ΓòÉΓòÉΓòÉ 11.27. _DOW ΓòÉΓòÉΓòÉ
  2590.  
  2591. _DOW is the first three characters of the current day of the week ("Mon", 
  2592. "Tue", "Wed", etc.). 
  2593.  
  2594.  
  2595. ΓòÉΓòÉΓòÉ 11.28. _DOY ΓòÉΓòÉΓòÉ
  2596.  
  2597. _DOY is the day of the year (1 to 366). 
  2598.  
  2599.  
  2600. ΓòÉΓòÉΓòÉ 11.29. _FG ΓòÉΓòÉΓòÉ
  2601.  
  2602. _FG is a string containing the first three letters of the screen foreground 
  2603. color at the current cursor position (for example, "Whi"). 
  2604.  
  2605.  
  2606. ΓòÉΓòÉΓòÉ 11.30. _HLOGFILE ΓòÉΓòÉΓòÉ
  2607.  
  2608. _HLOGFILE  returns the name of the current history log file (or an empty string 
  2609. if LOG /H is OFF). 
  2610.  
  2611.  
  2612. ΓòÉΓòÉΓòÉ 11.31. _HOUR ΓòÉΓòÉΓòÉ
  2613.  
  2614. _HOUR is the current hour (0 - 23). 
  2615.  
  2616.  
  2617. ΓòÉΓòÉΓòÉ 11.32. _KBHIT ΓòÉΓòÉΓòÉ
  2618.  
  2619. _KBHIT returns 1 if one or more keystrokes are waiting in the keyboard buffer, 
  2620. or 0 if the keyboard buffer is empty. 
  2621.  
  2622.  
  2623. ΓòÉΓòÉΓòÉ 11.33. _LASTDISK ΓòÉΓòÉΓòÉ
  2624.  
  2625. _LASTDISK is the last valid drive letter, without a colon. 
  2626.  
  2627.  
  2628. ΓòÉΓòÉΓòÉ 11.34. _LOGFILE ΓòÉΓòÉΓòÉ
  2629.  
  2630. _LOGFILE  returns the name of the current log file (or an empty string if LOG 
  2631. is OFF). 
  2632.  
  2633.  
  2634. ΓòÉΓòÉΓòÉ 11.35. _MINUTE ΓòÉΓòÉΓòÉ
  2635.  
  2636. _MINUTE is the current minute (0 - 59). 
  2637.  
  2638.  
  2639. ΓòÉΓòÉΓòÉ 11.36. _MONITOR ΓòÉΓòÉΓòÉ
  2640.  
  2641. _MONITOR is the monitor type ("mono" or "color"). 
  2642.  
  2643.  
  2644. ΓòÉΓòÉΓòÉ 11.37. _MONTH ΓòÉΓòÉΓòÉ
  2645.  
  2646. _MONTH is the month of the year (1 to 12). 
  2647.  
  2648.  
  2649. ΓòÉΓòÉΓòÉ 11.38. _MOUSE ΓòÉΓòÉΓòÉ
  2650.  
  2651. _MOUSE always returns "1" in 4OS2. 
  2652.  
  2653.  
  2654. ΓòÉΓòÉΓòÉ 11.39. _NDP ΓòÉΓòÉΓòÉ
  2655.  
  2656. _NDP is the coprocessor type: 
  2657.  
  2658.         0       no coprocessor is installed 
  2659.         87      8087 
  2660.         287     80287 
  2661.         387     80387, 80486DX, or Pentium 
  2662.  
  2663.  
  2664. ΓòÉΓòÉΓòÉ 11.40. _PID ΓòÉΓòÉΓòÉ
  2665.  
  2666. _PID is the current process ID number. 
  2667.  
  2668.  
  2669. ΓòÉΓòÉΓòÉ 11.41. _PIPE ΓòÉΓòÉΓòÉ
  2670.  
  2671. _PIPE returns 1 if the current process is running inside a pipe or 0 otherwise. 
  2672.  
  2673.  
  2674. ΓòÉΓòÉΓòÉ 11.42. _PPID ΓòÉΓòÉΓòÉ
  2675.  
  2676. _PPID is the process ID number of the parent process. 
  2677.  
  2678.  
  2679. ΓòÉΓòÉΓòÉ 11.43. _PTYPE ΓòÉΓòÉΓòÉ
  2680.  
  2681. _PTYPE is the current OS/2 process type: 
  2682.  
  2683.         AVIO    Character mode, windowed 
  2684.         DT      Detached (no screen in use) 
  2685.         FS      Character mode, full-screen 
  2686.         PM      Presentation Manager 
  2687.  
  2688.  
  2689. ΓòÉΓòÉΓòÉ 11.44. _ROW ΓòÉΓòÉΓòÉ
  2690.  
  2691. _ROW is the current cursor row (for example, "0" for the top of the screen). 
  2692.  
  2693.  
  2694. ΓòÉΓòÉΓòÉ 11.45. _ROWS ΓòÉΓòÉΓòÉ
  2695.  
  2696. _ROWS is the current number of screen rows (for example, "25"). 
  2697.  
  2698.  
  2699. ΓòÉΓòÉΓòÉ 11.46. _SECOND ΓòÉΓòÉΓòÉ
  2700.  
  2701. _SECOND is the current second (0 - 59). 
  2702.  
  2703.  
  2704. ΓòÉΓòÉΓòÉ 11.47. _SHELL ΓòÉΓòÉΓòÉ
  2705.  
  2706. _SHELL is the current shell nesting level.  The primary shell is level "0", and 
  2707. each subsequent secondary shell increments the level by 1. 
  2708.  
  2709.  
  2710. ΓòÉΓòÉΓòÉ 11.48. _SID ΓòÉΓòÉΓòÉ
  2711.  
  2712. _SID is the session ID number. 
  2713.  
  2714.  
  2715. ΓòÉΓòÉΓòÉ 11.49. _SYSERR ΓòÉΓòÉΓòÉ
  2716.  
  2717. _SYSERR is the error code of the last operating system error. You will need a 
  2718. technical or programmer's manual to understand these error values. 
  2719.  
  2720.  
  2721. ΓòÉΓòÉΓòÉ 11.50. _TIME ΓòÉΓòÉΓòÉ
  2722.  
  2723. _TIME contains the current system time in the format hh:mm:ss. The separator 
  2724. character may vary depending upon your country information. 
  2725.  
  2726.  
  2727. ΓòÉΓòÉΓòÉ 11.51. _TRANSIENT ΓòÉΓòÉΓòÉ
  2728.  
  2729. _TRANSIENT is "1" if the current shell is transient (started with a /C, see 
  2730. Startup Options for details), or "0" otherwise. 
  2731.  
  2732.  
  2733. ΓòÉΓòÉΓòÉ 11.52. _VIDEO ΓòÉΓòÉΓòÉ
  2734.  
  2735. _VIDEO is the video card type ("mono", "cga", "ega", "vga", "xga", "8514", or 
  2736. "IA/A"). 
  2737.  
  2738.  
  2739. ΓòÉΓòÉΓòÉ 11.53. _WINTITLE ΓòÉΓòÉΓòÉ
  2740.  
  2741. _WINTITLE returns the title of the current window. 
  2742.  
  2743.  
  2744. ΓòÉΓòÉΓòÉ 11.54. _YEAR ΓòÉΓòÉΓòÉ
  2745.  
  2746. _YEAR is the current year (1980 to 2099). 
  2747.  
  2748.  
  2749. ΓòÉΓòÉΓòÉ 12. Variable Functions ΓòÉΓòÉΓòÉ
  2750.  
  2751. Variable functions are like internal variables, but they take one or more 
  2752. arguments (which can be environment variables or even other variable functions) 
  2753. and they return a value. 
  2754.  
  2755. The list below gives a one-line description of each function, and a 
  2756. cross-reference which selects a full screen help topic on that function.  A few 
  2757. of the variables are simple enough that the one-line description is sufficient, 
  2758. but in most cases you should check for any additional information in the 
  2759. cross-reference topic if you are not already familiar with a function.  You can 
  2760. also obtain help on any function with a HELP @functionname command at the 
  2761. prompt. 
  2762.  
  2763. See the discussion after the function list for additional information and 
  2764. examples. 
  2765.  
  2766. The variable functions are: 
  2767.  
  2768. System status 
  2769.  
  2770.         @DOSMEM[b|k|m]                      Size of largest free memory block 
  2771.         @READSCR[row,col,len]               Read characters from the screen 
  2772.  
  2773.  Drives and devices 
  2774.  
  2775.         @CDROM[d:]                          CD-ROM drive detection (0 or 1) 
  2776.         @DEVICE[name]                       Character device detection 
  2777.         @DISKFREE[d:,b|k|m]                 Free disk space 
  2778.         @DISKTOTAL[d:,b|k|m]                Total disk space 
  2779.         @DISKUSED[d:,b|k|m]                 Used disk space 
  2780.         @FSTYPE[d:]                         File system type (FAT, HPFS, CDFS, 
  2781.                                             etc.) 
  2782.         @LABEL[d:]                          Volume label 
  2783.         @READY[d:]                          Drive ready status (0 or 1) 
  2784.         @REMOTE[d:]                         Remote (network) drive detection (0 
  2785.                                             or 1) 
  2786.         @REMOVABLE[d:]                      Removable drive detection (0 or 1) 
  2787.  
  2788.  Files 
  2789.  
  2790.         @ATTRIB[filename,[nrhsda]]          File attribute test (0 or 1) 
  2791.         @DESCRIPT[filename]                 File description 
  2792.         @EXETYPE[filename]                  Executable file type (DOS, PM, WIN, 
  2793.                                             etc.) 
  2794.         @FILEAGE[filename]                  File age (date and time) 
  2795.         @FILECLOSE[n]                       Close a file 
  2796.         @FILEDATE[filename]                 File date 
  2797.         @FILEOPEN[filename,mode]            Open a file 
  2798.         @FILEREAD[n [,length]]              Read next line from a file 
  2799.         @FILES[filename [, -nrhsda]]        Count files matching a wildcard 
  2800.         @FILESEEK[n,offset,start]           Move a file pointer to an offset 
  2801.         @FILESEEKL[n,offset,start]          Move a file pointer to a line 
  2802.                                             number 
  2803.         @FILESIZE[filename,b|k|m]           Size of files matching a wildcard 
  2804.         @FILETIME[filename]                 File time 
  2805.         @FILEWRITE[n,text]                  Write next line to a file 
  2806.         @FILEWRITEB[n,length,string]        Write bytes from a string to a file 
  2807.         @FINDFIRST[filename,nrhsda]         Find first matching file 
  2808.         @FINDNEXT[filename,nrhsda]          Find next matching file 
  2809.         @LINE[filename,n]                   Read a random line from a file 
  2810.         @LINES[filename]                    Count lines in a file 
  2811.         @SEARCH[filename]                   Path search 
  2812.         @UNIQUE[d:\path]                    Create file with unique name 
  2813.  
  2814.  File names 
  2815.  
  2816.         @EXT[filename]                      File extension 
  2817.         @FILENAME[filename]                 File name and extension 
  2818.         @FULL[filename]                     Full file name with path 
  2819.         @NAME[filename]                     File name without path or extension 
  2820.         @PATH[filename]                     File path without name 
  2821.  
  2822.  Strings and characters 
  2823.  
  2824.         @ASCII[c]                           Numeric ASCII value for a character 
  2825.         @CHAR[n]                            Character value for numeric ASCII 
  2826.         @FORMAT[[-][x][.y],string]          Formats (justifies) a string 
  2827.         @INDEX[string1,string2]             Position of one string in another 
  2828.         @INSTR[start,length,string]         Extract a substring 
  2829.         @LEN[string]                        Length of a string 
  2830.         @LOWER[string]                      Convert string to lower case 
  2831.         @ REPEAT[c,n]                       Repeat a character 
  2832.         @SUBSTR[string,start,length]        Extract a substring 
  2833.         @TRIM[string]                       Remove blanks from a string 
  2834.         @UPPER[string]                      Convert string to upper case 
  2835.         @WORD[["sep",]n,string]             Extract a word from a string 
  2836.         @WORDS[["sep",]string]              Counts number of words in a string 
  2837.  
  2838.  Numbers and arithmetic 
  2839.  
  2840.         @COMMA[n]                           Inserts commas in a number 
  2841.         @DEC[%var]                          Decremented value of a variable 
  2842.         @EVAL[expression]                   Arithmetic calculations 
  2843.         @INC[%var]                          Incremented value of a variable 
  2844.         @INT[n]                             Integer part of a number 
  2845.         @NUMERIC[string]                    Test if a string is numeric 
  2846.         @RANDOM[min,max]                    Generate a random integer 
  2847.  
  2848.  Dates and times 
  2849.  
  2850.         @DATE[mm-dd-yy]                     Convert date to number of days 
  2851.         @MAKEAGE[n]                         Convert date/time to file date/time 
  2852.         @MAKEDATE[n]                        Convert number of days to date 
  2853.         @MAKETIME[n]                        Convert number of seconds to time 
  2854.         @TIME[hh:mm:ss]                     Convert time to number of seconds 
  2855.         @TIMER[n]                           Elapsed time of specified timer 
  2856.  
  2857.  Utility 
  2858.  
  2859.         @ALIAS[name]                        Value of an alias 
  2860.         @IF[condition,true,false]           Evaluates a test condition 
  2861.         @EXEC[command]                      Execute a command 
  2862.         @REXX[expr]                         Execute a REXX expression 
  2863.         @SELECT[file,t,l,b,r,title]         Menu selection 
  2864.  
  2865.  Like all environment variables, these variable functions must be preceded by a 
  2866.  percent sign (%@EVAL, %@LEN, etc.).  All variable functions must have square 
  2867.  brackets enclosing their argument(s).  The argument(s) to a variable function 
  2868.  cannot exceed 255 characters in length for all arguments taken as a group. 
  2869.  
  2870.  Some variable functions, like @DISKFREE, are shown with "b|k|m" as one of 
  2871.  their arguments.  Those functions return a number of bytes, kilobytes, or 
  2872.  megabytes based on the "b|k|m" argument: 
  2873.  
  2874.         b   return the number of bytes 
  2875.         K   return the number of kilobytes (bytes / 1,024) 
  2876.         k   return the number of thousands of bytes (bytes / 1,000) 
  2877.         M   return the number of megabytes (bytes / 1,048,576) 
  2878.         m   return the number of millions of bytes (bytes / 1,000,000) 
  2879.  
  2880.  You can include commas in the results from a "b|k|m" function by appending a 
  2881.  "c" to the argument.  For example, to add commas to a "b" or number of bytes 
  2882.  result, enter "bc" as the argument. 
  2883.  
  2884.  In variable functions which take a drive letter as an argument, like @DISKFREE 
  2885.  or @READY, the drive letter must be followed by a colon.  The function will 
  2886.  not work properly if you use the drive letter without the colon. 
  2887.  
  2888.  The @FILEREAD, @FILEWRITE, @FILESEEK, and @FILECLOSE functions allow you to 
  2889.  access files based on their file handle.  These functions should only be used 
  2890.  with file handles returned by @FILEOPEN!  If you use them with any other file 
  2891.  handle you may damage other files opened by 4OS2 (or, in a secondary shell, 
  2892.  the program which started 4OS2), or hang your system. 
  2893.  
  2894.  Examples 
  2895.  
  2896.  You can use variable functions in a wide variety of ways depending on your 
  2897.  needs.  We've included a few examples below to give you an idea of what's 
  2898.  possible. 
  2899.  
  2900.  To set the prompt to show the amount of free memory (see PROMPT for details on 
  2901.  including variable functions in your prompt): 
  2902.  
  2903.           [c:\] prompt (%%@dosmem[K]K) $p$g
  2904.  
  2905.  Set up a simple command-line calculator.  The calculator is used with a 
  2906.  command like CALC 3 * (4 + 5): 
  2907.  
  2908.           [c:\] alias calc `echo The answer is:  %@eval[%&]`
  2909.  
  2910.  The following batch file uses variable functions to implement "once a day" 
  2911.  execution of a group of commands.  It works by constructing a 6-digit number 
  2912.  "yymmdd" from today's date, and comparing that to a number of the same type 
  2913.  stored in the file C:\ONCEADAY.DAT. If today's date is numerically larger than 
  2914.  the saved date, and the time is after 6:00 AM, then the "once a day" commands 
  2915.  are run, and today's date is saved in the file as the new date for comparison. 
  2916.  Otherwise, no action is taken.  You can make this file simpler using the 
  2917.  %@DATE and %@TIME functions instead of using %@SUBSTR to extract substrings of 
  2918.  the %_DATE and %_TIME variables; we used the approach shown to demonstrate the 
  2919.  use of %@SUBSTR. 
  2920.  
  2921.           rem  Temporary variables used to shorten example lines:
  2922.           rem    DD is _date, DY is yymmdd date, TM is _time
  2923.           set dd=%_date
  2924.           set dy=%@substr[%dd,6,2]%@substr[%dd,0,2]%@substr[%dd,3,2]
  2925.           set lastdate=0
  2926.           iff exist c:\onceaday.dat then
  2927.              set lastdate=%@line[onceaday.dat,0]
  2928.           endiff
  2929.           iff %dy gt %lastdate then
  2930.              set tm=%_time
  2931.              iff "%@substr[%tm,0,2]%@substr[%tm,3,2]" gt "0600" then
  2932.                 rem Commands to be executed once a day go here
  2933.                 echo %dy > c:\onceaday.dat
  2934.              endiff
  2935.           endiff
  2936.  
  2937.  
  2938. ΓòÉΓòÉΓòÉ 12.1. @ALIAS ΓòÉΓòÉΓòÉ
  2939.  
  2940. @ALIAS[name]:  Returns the contents of the specified alias as a string, or a 
  2941. null string if the alias doesn't exist.  When manipulating strings returned by 
  2942. @ALIAS you may need to disable certain special characters with the SETDOS /X 
  2943. command. Otherwise, command separators, redirection characters, and other 
  2944. similar "punctuation" in the alias may be interpreted as part of the current 
  2945. command, rather than part of a simple text string. 
  2946.  
  2947.  
  2948. ΓòÉΓòÉΓòÉ 12.2. @ASCII ΓòÉΓòÉΓòÉ
  2949.  
  2950. @ASCII[c]:  Returns the numeric value of the specified ASCII character as a 
  2951. string.  For example %@ASCII[A] returns 65.  You can put an escape character 
  2952. [^] before the actual character to process.  This allows quotes and other 
  2953. special characters as the argument (e.g., %@ASCII[^`]). 
  2954.  
  2955.  
  2956. ΓòÉΓòÉΓòÉ 12.3. @ATTRIB ΓòÉΓòÉΓòÉ
  2957.  
  2958. @ATTRIB[filename,[nrhsda]]:  Returns a "1" if the specified file has the 
  2959. matching attribute(s); otherwise returns a "0".  The attributes are: 
  2960.  
  2961.         N   Normal (no attributes set) 
  2962.         R   Read-only 
  2963.         H   Hidden 
  2964.         S   System 
  2965.         D   Directory 
  2966.         A   Archive 
  2967.  
  2968.  The attributes (other than N) can be combined (for example 
  2969.  %@ATTRIB[MYFILE,HS]).  ATTRIB will only return a 1 if all of the attributes 
  2970.  match. 
  2971.  
  2972.  If you do not specify any attributes, @ATTRIB will return the attributes of 
  2973.  the specified file in the format RHSAD, rather than a "0" or "1".  Attributes 
  2974.  which are not set will be replaced with an underscore.  For example, if 
  2975.  SECURE.DAT has the read-only, hidden, and archive attributes set, 
  2976.  %@ATTRIB[SECURE.DAT] would return RH_A_. 
  2977.  
  2978.  
  2979. ΓòÉΓòÉΓòÉ 12.4. @CDROM ΓòÉΓòÉΓòÉ
  2980.  
  2981. @CDROM[d:]:  Returns "1" if the drive is a CD-ROM or "0" otherwise. 
  2982.  
  2983.  
  2984. ΓòÉΓòÉΓòÉ 12.5. @CHAR ΓòÉΓòÉΓòÉ
  2985.  
  2986. @CHAR[n]:  Returns the character corresponding to an ASCII numeric value.  For 
  2987. example %@CHAR[65] returns A. 
  2988.  
  2989.  
  2990. ΓòÉΓòÉΓòÉ 12.6. @DATE ΓòÉΓòÉΓòÉ
  2991.  
  2992. @DATE[mm-dd-yy]:  Returns the number of days since January 1, 1980 for the 
  2993. specified date.  DATE uses the date format and separators mandated by your 
  2994. country code (for example dd.mm.yy in Germany, or  yy-mm-dd in Japan). 
  2995.  
  2996.  
  2997. ΓòÉΓòÉΓòÉ 12.7. @COMMA ΓòÉΓòÉΓòÉ
  2998.  
  2999. @COMMA[n]:  Inserts commas, or the "thousands separator" character for your 
  3000. country ID, into a numeric string. 
  3001.  
  3002.  
  3003. ΓòÉΓòÉΓòÉ 12.8. @DEC ΓòÉΓòÉΓòÉ
  3004.  
  3005. @DEC[%var]:  Returns the same value as @EVAL[%var - 1].  That is, it retrieves 
  3006. and decrements the value of a variable.  The variable itself is not changed; to 
  3007. do so, use a command like this: 
  3008.  
  3009.         set var=%@dec[%var]
  3010.  
  3011.  
  3012. ΓòÉΓòÉΓòÉ 12.9. @DESCRIPT ΓòÉΓòÉΓòÉ
  3013.  
  3014. @DESCRIPT[filename]:  Returns the file description for the specified filename 
  3015. (see DESCRIBE). 
  3016.  
  3017.  
  3018. ΓòÉΓòÉΓòÉ 12.10. @DEVICE ΓòÉΓòÉΓòÉ
  3019.  
  3020. @DEVICE[name]:  Returns "1" if the specified name is a character device (such 
  3021. as a printer or serial port), or "0" if not. 
  3022.  
  3023.  
  3024. ΓòÉΓòÉΓòÉ 12.11. @DISKFREE ΓòÉΓòÉΓòÉ
  3025.  
  3026. @DISKFREE[d:,b|k|m]: Returns the amount of free disk space on the specified 
  3027. drive. 
  3028.  
  3029.  
  3030. ΓòÉΓòÉΓòÉ 12.12. @DISKTOTAL ΓòÉΓòÉΓòÉ
  3031.  
  3032. @DISKTOTAL[d:,b|k|m]:  Returns the total disk space on the specified drive. 
  3033.  
  3034.  
  3035. ΓòÉΓòÉΓòÉ 12.13. @DISKUSED ΓòÉΓòÉΓòÉ
  3036.  
  3037. @DISKUSED[d:,b|k|m]:  Returns the amount of disk space in use by files and 
  3038. directories on the specified drive. 
  3039.  
  3040.  
  3041. ΓòÉΓòÉΓòÉ 12.14. @DOSMEM ΓòÉΓòÉΓòÉ
  3042.  
  3043. @DOSMEM[b|k|m]:  Returns the size of the largest free memory block (either in 
  3044. physical or virtual memory). 
  3045.  
  3046.  
  3047. ΓòÉΓòÉΓòÉ 12.15. @EVAL ΓòÉΓòÉΓòÉ
  3048.  
  3049. @EVAL[expression]:  Evaluates an arithmetic expression.  @EVAL supports 
  3050. addition (+), subtraction (-), multiplication (*), division (/), integer 
  3051. division (\, returns the integer part of the quotient), modulo (%%), and 
  3052. integer exponentiation (**).  The expression can contain environment variables 
  3053. and other variable functions.  @EVAL also supports parentheses, commas, and 
  3054. decimals.  Parentheses can be nested.  @EVAL will strip leading and trailing 
  3055. zeros from the result. When evaluating expressions, **, *, /, and %% take 
  3056. precedence over + and -.  For example, 3 + 4 * 2 will be interpreted as 3 + 8, 
  3057. not as 7 * 2.  To change this order of evaluation, use parentheses to specify 
  3058. the order you want. Also see @DEC and @INC. 
  3059.  
  3060. The maximum precision is 16 digits to the left of the decimal point and 8 
  3061. digits to the right of the decimal point.  You can alter the default precision 
  3062. to the right of the decimal point with the EvalMax and EvalMin directives in 
  3063. 4OS2.INI and with the SETDOS /F command. 
  3064.  
  3065. You can alter the precision for a single evaluation with the construct 
  3066. @EVAL[expression=x.y].  The x value specifies the minimum decimal precision 
  3067. (i.e., the minimum number of decimal places displayed); the y value sets the 
  3068. maximum decimal precision.  If x is greater than y, it is ignored.  You can 
  3069. specify either or both arguments, for example%colon. 
  3070.  
  3071.         @eval[3/7=2]            returns 0.42857143
  3072.         @eval[3/7=.4]           returns 0.4286
  3073.         @eval[3/6=2.4]          returns 0.50
  3074.  
  3075.  
  3076. ΓòÉΓòÉΓòÉ 12.16. @EXEC ΓòÉΓòÉΓòÉ
  3077.  
  3078. @EXEC[command]:  Execute the command and return the numeric exit code.  The 
  3079. command can be an alias, internal command, external command, .BTM file, or .BAT 
  3080. file.  @EXEC is primarily intended for running a program from within the 
  3081. PROMPT.  It is a "back door" entry into command processing and should be used 
  3082. with extreme caution.  Incorrect or recursive use of @EXEC may hang your 
  3083. system. 
  3084.  
  3085.  
  3086. ΓòÉΓòÉΓòÉ 12.17. @EXETYPE ΓòÉΓòÉΓòÉ
  3087.  
  3088. @EXETYPE[filename]:  Returns the application type as a string: 
  3089.  
  3090.         DOS         DOS .COM, .EXE, or .BAT file (OS/2 2.x only) 
  3091.         AVIO        OS/2 Character mode, windowed 
  3092.         FS          OS/2 Character mode, full-screen 
  3093.         PM          OS/2 Presentation Manager 
  3094.         WIN         Windows 3 (OS/2 2.x only) 
  3095.         UNKNOWN     Any other file 
  3096.  
  3097.  
  3098. ΓòÉΓòÉΓòÉ 12.18. @EXT ΓòÉΓòÉΓòÉ
  3099.  
  3100. @EXT[filename]:  Returns the extension from a file name, without a leading 
  3101. period. 
  3102.  
  3103.  
  3104. ΓòÉΓòÉΓòÉ 12.19. @FILEAGE ΓòÉΓòÉΓòÉ
  3105.  
  3106. @FILEAGE[filename]:  Returns the date and time of the file as a single numeric 
  3107. value.  The number can be used to compare the relative ages of two or more 
  3108. files. 
  3109.  
  3110.  
  3111. ΓòÉΓòÉΓòÉ 12.20. @FILECLOSE ΓòÉΓòÉΓòÉ
  3112.  
  3113. @FILECLOSE[n]:  Closes the file whose handle is "n."  You cannot close handles 
  3114. 0, 1 or 2.  Returns "0" if the file closed OK or "-1" if an error occurred.  Be 
  3115. sure to read the cautionary note about file functions under Variable Functions. 
  3116.  
  3117.  
  3118. ΓòÉΓòÉΓòÉ 12.21. @FILEDATE ΓòÉΓòÉΓòÉ
  3119.  
  3120. @FILEDATE[filename]:  Returns the date a file was last modified, in the default 
  3121. country format (mm-dd-yy for the US). 
  3122.  
  3123.  
  3124. ΓòÉΓòÉΓòÉ 12.22. @FILENAME ΓòÉΓòÉΓòÉ
  3125.  
  3126. @FILENAME[filename]:  Returns the name and extension of a file, without a path. 
  3127.  
  3128.  
  3129. ΓòÉΓòÉΓòÉ 12.23. @FILEOPEN ΓòÉΓòÉΓòÉ
  3130.  
  3131. @FILEOPEN[filename, read | write | append, [b | t]]:  Opens the file in the 
  3132. specified mode and returns the file handle as an integer.  Returns "-1" if the 
  3133. file cannot be opened. 
  3134.  
  3135. The optional third parameter controls whether the file is opened in binary mode 
  3136. ("b") or text mode ("t").  Text mode (the default) should be used to read text 
  3137. using @FILEREAD without a "length" parameter, and to write text using 
  3138. @FILEWRITE.  Binary mode should be used to read binary data with @FILEREAD with 
  3139. a "length" parameter, and to write binary data with @FILEWRITEB. 
  3140.  
  3141. Be sure to read the cautionary note about file functions under Variable 
  3142. Functions. 
  3143.  
  3144.  
  3145. ΓòÉΓòÉΓòÉ 12.24. @FILEREAD ΓòÉΓòÉΓòÉ
  3146.  
  3147. @FILEREAD[n [,length]]: Reads data from the file whose handle is "n."  Returns 
  3148. "**EOF**" if you attempt to read past the end of the file.  If "length" is not 
  3149. specified @FILEREAD will read until the next CR or LF (end of line) character. 
  3150. If "length" is specified, @FILEREAD will read "length" bytes regardless of any 
  3151. end of line characters. 
  3152.  
  3153. If you plan to read text a line at a time, without using "length", you should 
  3154. open the file in text mode.  If you plan to read binary data using "length", 
  3155. you should open the file in binary mode.  See @FILEOPEN for details on opening 
  3156. the file in the proper mode. 
  3157.  
  3158. Be sure to read the cautionary note about file functions under Variable 
  3159. Functions. 
  3160.  
  3161.  
  3162. ΓòÉΓòÉΓòÉ 12.25. @FILES ΓòÉΓòÉΓòÉ
  3163.  
  3164. @FILES[filename [, -nrhsda]]:  Returns the number of files that match the 
  3165. filename specification, which may contain wildcards and include lists.  Returns 
  3166. an empty string if no files match.  The filename must refer to a single 
  3167. directory; to check several directories, use @FILES once for each directory, 
  3168. and add the results together with @EVAL. 
  3169.  
  3170. The second argument is a list of file attributes.  If it is included, only 
  3171. those files matching all the specified attributes are counted.  The attributes 
  3172. are: 
  3173.  
  3174.         N   Normal (no attributes set) 
  3175.         R   Read-only 
  3176.         H   Hidden 
  3177.         S   System 
  3178.         D   Directory 
  3179.         A   Archive 
  3180.  
  3181.   You can prefix an attribute with - to mean "everything except files with this 
  3182.  attribute." 
  3183.  
  3184.  
  3185. ΓòÉΓòÉΓòÉ 12.26. @FILESEEK ΓòÉΓòÉΓòÉ
  3186.  
  3187. @FILESEEK[n,offset,start]:  Moves the file pointer "offset" bytes in the file 
  3188. whose handle is "n".  Returns the new position of the pointer, in bytes from 
  3189. the start of the file.  Set "start" to 0 to seek relative to the beginning of 
  3190. the file, 1 to seek relative to the current file pointer, or 2 to seek relative 
  3191. to the end of the file.  The offset value may be negative (seek backward), 
  3192. positive (seek forward), or zero (return current position, but do not change 
  3193. it).  Be sure to read the cautionary note about file functions under Variable 
  3194. Functions. 
  3195.  
  3196.  
  3197. ΓòÉΓòÉΓòÉ 12.27. @FILESEEKL ΓòÉΓòÉΓòÉ
  3198.  
  3199. @FILESEEKL[n,line]:  Moves the file pointer to the specified line in the file 
  3200. whose handle is "n". Returns the new position of the pointer, in bytes from the 
  3201. start of the file. Be sure to read the cautionary note about file functions 
  3202. under Variable Functions. 
  3203.  
  3204.  
  3205. ΓòÉΓòÉΓòÉ 12.28. @FILESIZE ΓòÉΓòÉΓòÉ
  3206.  
  3207. @FILESIZE[filename,b|k|m]:  Returns the size of a file, or "-1" if the file 
  3208. does not exist.  If the filename includes wildcards or an include list, returns 
  3209. the combined size of all matching files. 
  3210.  
  3211.  
  3212. ΓòÉΓòÉΓòÉ 12.29. @FILETIME ΓòÉΓòÉΓòÉ
  3213.  
  3214. @FILETIME[filename]:  Returns the time a file was last modified, in hh:mm 
  3215. format. 
  3216.  
  3217.  
  3218. ΓòÉΓòÉΓòÉ 12.30. @FILEWRITE ΓòÉΓòÉΓòÉ
  3219.  
  3220. @FILEWRITE[n,text]:  Writes a line to the file whose handle is "n".  Returns 
  3221. the number of bytes written, or "-1" if an error occurred. 
  3222.  
  3223. If you plan to write text a line at a time with @FILEWRITE, you should open the 
  3224. file in text mode (see @FILEOPEN).  If you want to write binary data you should 
  3225. use @FILEWRITEB instead, and open the file in binary mode. 
  3226.  
  3227. Be sure to read the cautionary note about file functions under Variable 
  3228. Functions. 
  3229.  
  3230.  
  3231. ΓòÉΓòÉΓòÉ 12.31. @FILEWRITEB ΓòÉΓòÉΓòÉ
  3232.  
  3233. @FILEWRITEB[n,length,string]:  Writes the specified number of bytes from the 
  3234. string to the file whose handle is "n".  Returns the number of bytes written, 
  3235. or "-1" if an error occurred. 
  3236.  
  3237. If you plan to write binary data with @FILEWRITEB, you should open the file in 
  3238. binary mode (see @FILEOPEN).  If you want to write text a line at a time you 
  3239. should use @FILEWRITE instead, and open the file in text mode. 
  3240.  
  3241. Be sure to read the cautionary note about file functions under Variable 
  3242. Functions. 
  3243.  
  3244.  
  3245. ΓòÉΓòÉΓòÉ 12.32. @FINDFIRST ΓòÉΓòÉΓòÉ
  3246.  
  3247. @FINDFIRST[filename [,nrhsda]]:  Returns the name of the first file that 
  3248. matches the filename, which may contain wildcards and "include lists."  The 
  3249. second argument, if included, defines the attributes of the files that will be 
  3250. included in the search.  Returns an empty string if no files match.  The 
  3251. attributes are: 
  3252.  
  3253.         N   Normal (no attributes set) 
  3254.         R   Read-only 
  3255.         H   Hidden 
  3256.         S   System 
  3257.         D   Directory 
  3258.         A   Archive 
  3259.  
  3260.  @FINDFIRST always skips the "." and ".." entries when processing directory 
  3261.  names. 
  3262.  
  3263.  The attributes (other than N) can be combined (for example 
  3264.  %@FINDFIRST[MYFILE,HS]).  @FINDFIRST will only find a file if all of the 
  3265.  attributes match. 
  3266.  
  3267.  
  3268. ΓòÉΓòÉΓòÉ 12.33. @FINDNEXT ΓòÉΓòÉΓòÉ
  3269.  
  3270. @FINDNEXT[filename [,nrhsda]]:  Returns the name of the next file that matches 
  3271. the filename passed to @FINDFIRST. @FINDNEXT should only be used after a 
  3272. successful call to @FINDFIRST.  The first argument is included for 
  3273. compatibility with previous versions, but is ignored; it can be omitted if the 
  3274. second argument is not used (e.g. %@FINDNEXT[]).  The second argument, if 
  3275. included, defines the attributes of the files that will be included in the 
  3276. search (see @FINDFIRST for details).  Returns an empty string when no more 
  3277. files match 
  3278.  
  3279. @FINDNEXT always skips the "." and ".." entries when processing directory 
  3280. names. 
  3281.  
  3282.  
  3283. ΓòÉΓòÉΓòÉ 12.34. @FORMAT ΓòÉΓòÉΓòÉ
  3284.  
  3285. @FORMAT[[-][x][.y],string]:  Reformats a string, truncating it or padding it 
  3286. with spaces as necessary.  If you use the minus [-], the string is 
  3287. left-justified; otherwise, it is right-justified.  The "x" value is the minimum 
  3288. number of characters in the result.  The "y" value is the maximum number of 
  3289. characters in the result.  You can combine the options as necessary.  For 
  3290. example: 
  3291.  
  3292.         %@format[12,JPSoftware]         returns "  JPSoftware"
  3293.         %@format[.3,JPSoftware]         returns "JPS"
  3294.  
  3295.  
  3296. ΓòÉΓòÉΓòÉ 12.35. @FSTYPE ΓòÉΓòÉΓòÉ
  3297.  
  3298. @FSTYPE[d:]:  Returns the file system type for the specified drive.  @FSTYPE 
  3299. will return "FAT" for a DOS-compatible drive with a file allocation table, 
  3300. "HPFS" for a drive that uses OS/2's high performance file system, or "CDFS" for 
  3301. a CD-ROM drive.  It may return other values if additional file systems have 
  3302. been installed with the IFS= directive in CONFIG.SYS. 
  3303.  
  3304.  
  3305. ΓòÉΓòÉΓòÉ 12.36. @FULL ΓòÉΓòÉΓòÉ
  3306.  
  3307. @FULL[filename]:  Returns the fully qualified path name of a file. 
  3308.  
  3309.  
  3310. ΓòÉΓòÉΓòÉ 12.37. @IF ΓòÉΓòÉΓòÉ
  3311.  
  3312. @IF[condition,true,false]:  Evaluates the condition and returns a string based 
  3313. on the result.  The condition can include any of the tests allowed in the IF 
  3314. command.  If the condition is true, @IF returns the first result string; if it 
  3315. is false, @IF returns the second string.  For example, 
  3316. "%IF[2==2,Correct!,Oops!]" returns "Correct!" 
  3317.  
  3318.  
  3319. ΓòÉΓòÉΓòÉ 12.38. @INC ΓòÉΓòÉΓòÉ
  3320.  
  3321. @INC[%var]:  Returns the same value as %@EVAL[%var + 1].  That is, it retrieves 
  3322. and increments the value of a variable.  The variable itself is not changed; to 
  3323. do so, use a command like this: 
  3324.  
  3325.         set var=%@inc[%var]
  3326.  
  3327.  
  3328. ΓòÉΓòÉΓòÉ 12.39. @INDEX ΓòÉΓòÉΓòÉ
  3329.  
  3330. @INDEX[string1,string2]:  Returns the position of string2 within string1, or 
  3331. "-1" if string2 is not found.  The first position in string1 is numbered 0. 
  3332.  
  3333.  
  3334. ΓòÉΓòÉΓòÉ 12.40. @INSTR ΓòÉΓòÉΓòÉ
  3335.  
  3336. @INSTR[start, length, string]:  The same as @SUBSTR.  However, the string is at 
  3337. the end of the @INSTR argument list, so that commas in the string will not be 
  3338. confused with commas separating the arguments. 
  3339.  
  3340.  
  3341. ΓòÉΓòÉΓòÉ 12.41. @INT ΓòÉΓòÉΓòÉ
  3342.  
  3343. @INT[n]:  Returns the integer part of the number n. 
  3344.  
  3345.  
  3346. ΓòÉΓòÉΓòÉ 12.42. @LABEL ΓòÉΓòÉΓòÉ
  3347.  
  3348. @LABEL[d:]:  Returns the volume label of the specified disk drive. 
  3349.  
  3350.  
  3351. ΓòÉΓòÉΓòÉ 12.43. @LEN ΓòÉΓòÉΓòÉ
  3352.  
  3353. @LEN[string]:  Returns the length of a string. 
  3354.  
  3355.  
  3356. ΓòÉΓòÉΓòÉ 12.44. @LINE ΓòÉΓòÉΓòÉ
  3357.  
  3358. @LINE[filename,n]:  Returns line "n" from the specified file. The first line in 
  3359. the file is numbered 0.  "**EOF**" is returned for all line numbers beyond the 
  3360. end of the file.  If you need to scan through the lines of a file in sequence, 
  3361. the @FILEREAD function (above) and the "@filename" construct available in the 
  3362. FOR command are much faster than calling the @LINE function repeatedly.  @LINE 
  3363. will retrieve input from standard input if you specify CON as the filename.  If 
  3364. you are redirecting input to @LINE using this feature, you must use command 
  3365. grouping or the redirection will not work properly.  For example: 
  3366.  
  3367.         (echo %@line[con,0]) < myfile.dat
  3368.  
  3369.  
  3370. ΓòÉΓòÉΓòÉ 12.45. @LINES ΓòÉΓòÉΓòÉ
  3371.  
  3372. @LINES[filename]:  Returns the line number of the last line in the file, or 
  3373. "-1" if the file is empty.  The first line in the file is numbered 0, so (for 
  3374. example) @LINES will return 0 for a file containing one line. 
  3375.  
  3376.  
  3377. ΓòÉΓòÉΓòÉ 12.46. @LOWER ΓòÉΓòÉΓòÉ
  3378.  
  3379. @LOWER[string]:  Returns the string converted to lower case. 
  3380.  
  3381.  
  3382. ΓòÉΓòÉΓòÉ 12.47. @MAKEAGE ΓòÉΓòÉΓòÉ
  3383.  
  3384. @MAKEAGE[date[,time]]:  Returns the date and time (if included) as a single 
  3385. value in the same format as @FILEAGE. @MAKEAGE can be used to compare the time 
  3386. stamp of a file with a specific date and time, for example: 
  3387.  
  3388.         if %@fileage[myfile] lt %@makeage[1/1/85] echo OLD!
  3389.  
  3390.  
  3391. ΓòÉΓòÉΓòÉ 12.48. @MAKEDATE ΓòÉΓòÉΓòÉ
  3392.  
  3393. @MAKEDATE[n]:  Returns a date (formatted according to the current country 
  3394. settings).  "n" is the number of days since 1/1/80. This is the inverse of 
  3395. @DATE. 
  3396.  
  3397.  
  3398. ΓòÉΓòÉΓòÉ 12.49. @MAKETIME ΓòÉΓòÉΓòÉ
  3399.  
  3400. @MAKETIME[n]:  Returns a time (formatted according to the current country 
  3401. settings).  "n" is the number of seconds since midnight.  This is the inverse 
  3402. of @TIME. 
  3403.  
  3404.  
  3405. ΓòÉΓòÉΓòÉ 12.50. @NAME ΓòÉΓòÉΓòÉ
  3406.  
  3407. @NAME[filename]:  Returns the base name of a file, without the path or 
  3408. extension. 
  3409.  
  3410.  
  3411. ΓòÉΓòÉΓòÉ 12.51. @NUMERIC ΓòÉΓòÉΓòÉ
  3412.  
  3413. @NUMERIC[string]:  Returns "1" if the argument is composed entirely of digits 
  3414. (0 to 9), signs (+ or -), and the thousands and decimal separators.  Otherwise, 
  3415. returns "0". 
  3416.  
  3417.  
  3418. ΓòÉΓòÉΓòÉ 12.52. @PATH ΓòÉΓòÉΓòÉ
  3419.  
  3420. @PATH[filename]:  Returns the path from a file name, including the drive letter 
  3421. and a trailing backslash but not including the base name or extension. 
  3422.  
  3423.  
  3424. ΓòÉΓòÉΓòÉ 12.53. @RANDOM ΓòÉΓòÉΓòÉ
  3425.  
  3426. @RANDOM[min, max]:  Returns a random value between min and max, inclusive. 
  3427. Min, max, and the returned value are all integers. 
  3428.  
  3429.  
  3430. ΓòÉΓòÉΓòÉ 12.54. @READSCR ΓòÉΓòÉΓòÉ
  3431.  
  3432. @READSCR[row,col,length]:  Returns the text displayed on the screen at the 
  3433. specified location.  The upper left corner of the screen is location 0,0. 
  3434.  
  3435.  
  3436. ΓòÉΓòÉΓòÉ 12.55. @READY ΓòÉΓòÉΓòÉ
  3437.  
  3438. @READY[d:]:  Returns "1" if the specified drive is ready; otherwise returns 
  3439. "0". 
  3440.  
  3441.  
  3442. ΓòÉΓòÉΓòÉ 12.56. @REMOTE ΓòÉΓòÉΓòÉ
  3443.  
  3444. @REMOTE[d:]:  Returns "1" if the specified drive is a remote (network) drive; 
  3445. otherwise returns "0". 
  3446.  
  3447.  
  3448. ΓòÉΓòÉΓòÉ 12.57. @REMOVABLE ΓòÉΓòÉΓòÉ
  3449.  
  3450. @REMOVABLE[d:]:  Returns "1" if the specified drive is removable (i.e., a 
  3451. floppy disk or removable hard disk); otherwise returns "0". 
  3452.  
  3453.  
  3454. ΓòÉΓòÉΓòÉ 12.58. @REPEAT ΓòÉΓòÉΓòÉ
  3455.  
  3456. @REPEAT[c,n]:  Returns the character "c" repeated "n" times. 
  3457.  
  3458.  
  3459. ΓòÉΓòÉΓòÉ 12.59. @REXX ΓòÉΓòÉΓòÉ
  3460.  
  3461. @REXX[expr]:  Calls the REXX interpreter to execute the expression. Returns the 
  3462. result string from REXX; if the REXX expression does not return a string, @REXX 
  3463. returns the REXX numeric result code. 
  3464.  
  3465.  
  3466. ΓòÉΓòÉΓòÉ 12.60. @SEARCH ΓòÉΓòÉΓòÉ
  3467.  
  3468. @SEARCH[filename]:  Searches for the filename using the PATH environment 
  3469. variable, appending an extension if one isn't specified.  Returns the 
  3470. fully-expanded name of the file including drive, path, base name, and 
  3471. extension, or an empty string if a matching file is not found.  If wildcards 
  3472. are used in the filename, @SEARCH will search for the first file that matches 
  3473. the wildcard specification, and return the drive and path for that file plus 
  3474. the wildcard filename (e.g., E:\UTIL\*.COM ). 
  3475.  
  3476.  
  3477. ΓòÉΓòÉΓòÉ 12.61. @SELECT ΓòÉΓòÉΓòÉ
  3478.  
  3479. @SELECT[filename,top,left,bottom,right,title]:  Pops up a selection window with 
  3480. the lines from the specified file. Returns the text of the line the scrollbar 
  3481. is on if you press Enter, or an empty string if you press Esc.  @SELECT can be 
  3482. used to display menus or other selection lists from a batch file.  To select 
  3483. from lines passed through input redirection or a pipe, use CON as the filename. 
  3484. You can move through the selection window with standard navigation keystrokes. 
  3485. To change the navigation keys, see the Key Mapping directives in the .INI file. 
  3486.  
  3487.  
  3488. ΓòÉΓòÉΓòÉ 12.62. @SUBSTR ΓòÉΓòÉΓòÉ
  3489.  
  3490. @SUBSTR[string,start,length]:  Returns a substring, starting at the position 
  3491. "start" and continuing for "length" characters.  If the length is omitted, it 
  3492. will default to the remainder of the string.  If the length is negative, the 
  3493. start is relative to the right side of the string.  The first character in the 
  3494. string is numbered 0; if the length is negative, the last character is numbered 
  3495. 0.  For example, %@SUBSTR[%_TIME,0,2] gets the current time and extracts the 
  3496. hour.  If the string includes commas, it must be quoted with double quotes ["] 
  3497. or back quotes [`].  The quotes do count in calculating the position of the 
  3498. substring. @INSTR performs the same function, and allows commas in the string 
  3499. without quoting. 
  3500.  
  3501.  
  3502. ΓòÉΓòÉΓòÉ 12.63. @TIME ΓòÉΓòÉΓòÉ
  3503.  
  3504. @TIME[hh:mm:ss]:  Returns the number of seconds since midnight for the 
  3505. specified time.  The time must be in 24-hour format; "am" and "pm" cannot be 
  3506. used. 
  3507.  
  3508.  
  3509. ΓòÉΓòÉΓòÉ 12.64. @TIMER ΓòÉΓòÉΓòÉ
  3510.  
  3511. @TIMER[n]:  Returns the current split time for a stopwatch started with the 
  3512. TIMER command.  The value of "n" specifies the timer to read and can be 1, 2, 
  3513. or 3. 
  3514.  
  3515.  
  3516. ΓòÉΓòÉΓòÉ 12.65. @TRIM ΓòÉΓòÉΓòÉ
  3517.  
  3518. @TRIM[string]:  Returns the string with the leading and trailing white space 
  3519. (space and tab characters) removed. 
  3520.  
  3521.  
  3522. ΓòÉΓòÉΓòÉ 12.66. @UNIQUE ΓòÉΓòÉΓòÉ
  3523.  
  3524. @UNIQUE[d:\path]:  Creates a zero-length file with a unique name in the 
  3525. specified directory, and returns the full name and path.  If no path is 
  3526. specified, the file will be created in the current directory.  The file name 
  3527. will be FAT-compatible (8 character name and 3-character extension) regardless 
  3528. of whether the file is created on a FAT or HPFS drive.  This function allows 
  3529. you to create a  temporary file without overwriting an existing file. 
  3530.  
  3531.  
  3532. ΓòÉΓòÉΓòÉ 12.67. @UPPER ΓòÉΓòÉΓòÉ
  3533.  
  3534. @UPPER[string]:  Returns the string converted to upper case. 
  3535.  
  3536.  
  3537. ΓòÉΓòÉΓòÉ 12.68. @WORD ΓòÉΓòÉΓòÉ
  3538.  
  3539. @WORD[["xxx",]n,string]:  Returns the "nth" word in a string.  The first word 
  3540. is numbered 0.  If "n" is negative, words are returned from the end of the 
  3541. string.  The first argument is a list of word separators you want to use; if 
  3542. you don't specify it, only spaces, tabs, and commas are considered to be word 
  3543. separators.  For example: 
  3544.  
  3545.         %@WORD[2,NOW IS THE TIME]     returns "THE"
  3546.         %@WORD[-0,NOW IS THE TIME]    returns "TIME"
  3547.         %@WORD[-2,NOW IS THE TIME]    returns "IS"
  3548.         %@WORD["=",1,2 + 2=4]         returns "4"
  3549.  
  3550.  
  3551. ΓòÉΓòÉΓòÉ 12.69. @WORDS ΓòÉΓòÉΓòÉ
  3552.  
  3553. @WORDS[["xxx",]string]:  Returns the number of words in the string.  The 
  3554. optional list of separators follows the same format as @WORD.  If the "string" 
  3555. argument is enclosed in quotation marks, you must enter a list of separators as 
  3556. well. 
  3557.  
  3558.  
  3559. ΓòÉΓòÉΓòÉ 13. 4OS2.INI ΓòÉΓòÉΓòÉ
  3560.  
  3561. The configuration of 4OS2 is controlled through an optional file of 
  3562. initialization information called 4OS2.INI. 
  3563.  
  3564. This section contains general information on 4OS2.INI, and an example. For 
  3565. information on specific directives see the separate topic for each type of 
  3566. directive: 
  3567.  
  3568.             Initialization Directives 
  3569.             Configuration Directives 
  3570.             Color Directives 
  3571.             Key Mapping Directives 
  3572.             Advanced Directives 
  3573.  
  3574.  These topics list the directives, with a one-line description of each, and a 
  3575.  cross-reference which selects a full screen help topic on that directive. A 
  3576.  few of the directives are simple enough that the one-line description is 
  3577.  sufficient, but in most cases you should check for any additional information 
  3578.  in the cross-reference topic if you are not already familiar with the 
  3579.  directive. 
  3580.  
  3581.  You can also obtain help on most directives with a HELP directive command at 
  3582.  the prompt. 
  3583.  
  3584.  You can create, add to, and edit 4OS2.INI with any ASCII text editor.  4OS2 
  3585.  reads 4OS2.INI when it starts, and configures itself accordingly.  4OS2.INI is 
  3586.  not re-read when you change it.  For changes to take effect, you must restart 
  3587.  the session or window in which 4OS2 is running. 
  3588.  
  3589.  Each item that you can include in 4OS2.INI has a default value.  You only need 
  3590.  to include entries in the file for settings that you want to change from their 
  3591.  default values.  If you are happy with all of the default values, you don't 
  3592.  need an .INI file at all. 
  3593.  
  3594.  4OS2 primary shells search for the .INI file in three places: 
  3595.  
  3596.         *   If there is an "@d:\path\inifile" option on the 4OS2 startup 
  3597.             command liine 4OS2 will use the path and file name specified there, 
  3598.             and will not look elsewhere. 
  3599.         *   If there is no .INI file name on the startup command line, the 
  3600.             search proceeds to the same directory where the 4OS2 program file 
  3601.             (4OS2.EXE ) is stored.  This is the "normal" location for the .INI 
  3602.             file.  4OS2 determines this directory automatically.  You can also 
  3603.             set it yourself by placing a COMSPEC directory name on the startup 
  3604.             command line. 
  3605.         *   If the .INI file is not found in the directory where the program 
  3606.             file is stored, a final check is made in the root directory of the 
  3607.             boot drive. 
  3608.  
  3609.  When 4OS2 is loaded as a secondary shell, it does not search for the .INI 
  3610.  file.  Instead, it retrieves the primary shell's .INI file data, processes the 
  3611.  [Secondary] section of the original .INI file if necessary, and then processes 
  3612.  any "@d:\path\inifile" option on the secondary shell command line.  You can 
  3613.  override this behavior with the NextINIFile directive. 
  3614.  
  3615.  Most lines in the .INI file consist of a one-word directive, an equal sign 
  3616.  [=], and a value.  For example, in the following line, the word "History" is 
  3617.  the directive and "2048" is the value: 
  3618.  
  3619.           History = 2048
  3620.  
  3621.  Any spaces before or after the equal sign are ignored. 
  3622.  
  3623.  If you have a long string to enter in the .INI file (for example, for the 
  3624.  ColorDir directive), you must enter it all on one line.  Strings cannot be 
  3625.  "continued" to a second line.  Each line may be up to 1023 characters long. 
  3626.  
  3627.  The format of the value part of a directive line depends on the individual 
  3628.  directive.  It may be a numeric value, a single character, a choice (like 
  3629.  "Yes" or "No"), a color setting, a key name, a path, a filename, or a text 
  3630.  string.  The value begins with the first non-blank character after the equal 
  3631.  sign and ends at the end of the line or the beginning of a comment. 
  3632.  
  3633.  Blank lines are ignored in the .INI file and can be used to separate groups of 
  3634.  directives.  You can place comments in the file by beginning a line with a 
  3635.  semicolon [;].  You can also place comments at the end of any line except one 
  3636.  containing a text string value.  To do so, enter at least one space or tab 
  3637.  after the value, a semicolon, and your comment, like this: 
  3638.  
  3639.           History = 2048       ;set history list size
  3640.  
  3641.  If you try to place a comment at the end of a string value, the comment will 
  3642.  become part of the string and will probably cause an error. 
  3643.  
  3644.  When 4OS2 detects an error while processing the .INI file, it displays an 
  3645.  error message and prompts you to press a key to continue processing the file. 
  3646.  This allows you to note any errors before the startup process continues.  The 
  3647.  directive in error will retain its previous or default value.  Only the most 
  3648.  catastrophic errors (like a disk read failure) will terminate processing of 
  3649.  the remainder of the .INI file.  If you don't want a pause after each error, 
  3650.  use a PauseOnError = No directive at the beginning of the .INI file. 
  3651.  
  3652.  If you need to test different values for an .INI directive without repeatedly 
  3653.  editing the .INI file, see INIQuery. 
  3654.  
  3655.  The .INI file has three sections:  the first or global section, the [Primary] 
  3656.  section, and the [Secondary] section.  The global section consists of 
  3657.  directives at the beginning of the file, with no section name before them. 
  3658.  These directives are effective in all shells.  In most cases, this is the only 
  3659.  section you will need. 
  3660.  
  3661.  The [Primary] and [Secondary] sections include directives that are used in 
  3662.  primary and secondary shells respectively. Each section is identified by the 
  3663.  section name in square brackets on a line by itself.  You don't need to set up 
  3664.  these sections unless you want different directives for primary and secondary 
  3665.  shells. 
  3666.  
  3667.  Directives in the [Primary] section are used for the first or primary shell. 
  3668.  The values are passed automatically to all secondary shells, unless overridden 
  3669.  by a directive with the same name in the [Secondary] section. 
  3670.  
  3671.  Directives in the [Secondary] section are used in secondary shells only, and 
  3672.  override any corresponding primary shell settings. 
  3673.  
  3674.  Sections that begin with any name other than [Primary] or [Secondary] are 
  3675.  ignored. 
  3676.  
  3677.  The SETDOS command can override several of the .INI file directives.  For 
  3678.  example, the cursor shape used by 4OS2 can be adjusted either with the 
  3679.  CursorIns and CursorOver directives or the SETDOS /S command.  The 
  3680.  correspondence between SETDOS options and .INI directives is noted under each 
  3681.  directive below, and under each option of the SETDOS command. 
  3682.  
  3683.  This example configures certain special characters to match 4DOS, and changes 
  3684.  other default settings to suit the user's preferences.  All of these settings 
  3685.  except HelpBook would also work in 4DOS or 4DOS/NT. Note that the comments for 
  3686.  the HelpBook and ColorDir directives are on separate lines before the 
  3687.  directives themselves, as no comments are allowed in string directives: 
  3688.  
  3689.           PauseOnError = No             ;don't stop on INI errors
  3690.           CommandSep = ^                ;4DOS command separator
  3691.           ParameterChar = &             ;4DOS parameter character
  3692.           BatchEcho = No                ;default to ECHO OFF
  3693.                                         ;show only 4OS2 help for F1 / HELP
  3694.           HelpBook = 4OS2
  3695.           History = 2048                ;expand history to 2K bytes
  3696.           BeepFreq = 880                ;make beep higher pitch
  3697.           EditMode = Insert             ;insert mode for cmd edit
  3698.           CursorOver = 100              ;overstrike cursor 100%
  3699.           CursorIns = 10                ;insert cursor 10%
  3700.           ListFind = F5                 ;F5 does a find in LIST
  3701.           ListNext = F6                 ;and F6 does a find next
  3702.           StdColors = bri cya on blu    ;default colors
  3703.           ListColors = bri whi on blu   ;colors for LIST
  3704.           SelectColors = bri whi on blu ;same colors for SELECT
  3705.                                         ;set directory display colors
  3706.           colordir = DIRS:bri yel;com exe bat btm cmd:bri whi
  3707.  
  3708.  
  3709. ΓòÉΓòÉΓòÉ 13.1. Initialization Directives ΓòÉΓòÉΓòÉ
  3710.  
  3711. The directives in this section control how 4OS2 starts and where it looks for 
  3712. its files.  The initialization directives are: 
  3713.  
  3714.         4StartPath          Path for 4START and 4EXIT 
  3715.         DirHistory          Size of directory history list 
  3716.         HelpBook            Books to load in help system 
  3717.         History             Size of history list 
  3718.         INIQuery            Query for each line in 4OS2.INI 
  3719.         LocalAliases        Local vs. global aliases 
  3720.         LocalHistory        Local vs. global directory history 
  3721.         LocalHistory        Local vs. global history 
  3722.         PauseOnError        Pause on errors in 4OS2.INI 
  3723.         WindowState         Initial state for the 4OS2 window 
  3724.         WindowX, WindowY, WindowWidth, WindowHeightInitial size and position of 
  3725.                             the 4OS2 window 
  3726.  
  3727.  
  3728. ΓòÉΓòÉΓòÉ 13.1.1. 4StartPath ΓòÉΓòÉΓòÉ
  3729.  
  3730. 4StartPath = Path:  Sets the drive and directory where the 4START and 4EXIT 
  3731. batch files (if any) are located. 
  3732.  
  3733.  
  3734. ΓòÉΓòÉΓòÉ 13.1.2. DirHistory ΓòÉΓòÉΓòÉ
  3735.  
  3736. DirHistory = nnnn (256):  Sets the amount of memory allocated to the directory 
  3737. history in bytes.  The allowable range of values is 128 to 2048 bytes.  If you 
  3738. use a global directory history list the DirHistory value will be ignored in all 
  3739. shells except the shell which first establishes the global list. 
  3740.  
  3741.  
  3742. ΓòÉΓòÉΓòÉ 13.1.3. HelpBook ΓòÉΓòÉΓòÉ
  3743.  
  3744. HelpBook = String:  Sets the names of the "books" to be loaded when 4OS2 help 
  3745. is invoked with the HELP command or the F1 key.  The default is 4OS2+CMDREF 
  3746. which loads the 4OS2 help and the OS/2 command reference. 
  3747.  
  3748.  
  3749. ΓòÉΓòÉΓòÉ 13.1.4. History ΓòÉΓòÉΓòÉ
  3750.  
  3751. History = nnnn (1024):  Sets the amount of memory allocated to the command 
  3752. history list in bytes.  The allowable range of values is 256 to 8192 bytes.  If 
  3753. you use a global history list (see Command History and Recall), the History 
  3754. value is ignored in all shells except the shell which first establishes the 
  3755. global list. 
  3756.  
  3757.  
  3758. ΓòÉΓòÉΓòÉ 13.1.5. INIQuery ΓòÉΓòÉΓòÉ
  3759.  
  3760. INIQuery = Yes | NO:  If set to Yes, a prompt will be displayed before 
  3761. execution of each subsequent line in the current .INI file.  This allows you to 
  3762. modify certain directives when you start 4OS2 in order to test different 
  3763. configurations.  INIQuery can be reset to No at any point in the file. 
  3764. Normally INIQuery = Yes is only used during testing of other .INI file 
  3765. directives. 
  3766.  
  3767. The prompt generated by INIQuery = Yes is: 
  3768.  
  3769.         [contents of the line]  (Y/N/Q/R/E)  ?
  3770.  
  3771. At this prompt, you may enter: 
  3772.  
  3773.         Y = Yes:    Process this line and go on to the next. 
  3774.         N = No:     Skip this line and go on to the next. 
  3775.         Q = Quit:   Skip this line and all subsequent lines. 
  3776.         R = Rest:   Execute this and all subsequent lines. 
  3777.         E = Edit:   Edit the value for this entry. 
  3778.  
  3779.  If you choose E for Edit, you can enter a new value for the directive, but not 
  3780.  a new directive name. 
  3781.  
  3782.  For example, if you have found a compatibility problem you think may be 
  3783.  related to 4OS2's character (as opposed to line) input mode, you might change 
  3784.  your 4OS2.INI file so a part of it read as follows: 
  3785.  
  3786.           INIQuery = Yes
  3787.           LineInput = Yes
  3788.           INIQuery = No
  3789.  
  3790.  You could then choose to process, ignore, or edit the LineInput directive each 
  3791.  time 4OS2 started.  This would allow you to check whether changing the line 
  3792.  input mode would resolve the compatibility problem. 
  3793.  
  3794.  
  3795. ΓòÉΓòÉΓòÉ 13.1.6. LocalAliases ΓòÉΓòÉΓòÉ
  3796.  
  3797. LocalAliases = Yes | NO:  No forces all copies of 4OS2 to share the same alias 
  3798. list.  Yes keeps the lists for each shell separate.  See ALIAS for more details 
  3799. on local and global alias lists. 
  3800.  
  3801.  
  3802. ΓòÉΓòÉΓòÉ 13.1.7. LocalDirHistory ΓòÉΓòÉΓòÉ
  3803.  
  3804. LocalDirHistory = Yes | NO:  No forces all copies of command processor to share 
  3805. the same directory history.  Yes keeps the directory histories for each shell 
  3806. separate.  See Local and Global Directory History for more details. 
  3807.  
  3808.  
  3809. ΓòÉΓòÉΓòÉ 13.1.8. LocalHistory ΓòÉΓòÉΓòÉ
  3810.  
  3811. LocalHistory = Yes | NO:  No forces all copies of 4OS2 to share the same 
  3812. history list.  Yes keeps the lists for each shell separate.  See Command 
  3813. History and Recall for more details on local and global history lists. 
  3814.  
  3815.  
  3816. ΓòÉΓòÉΓòÉ 13.1.9. PauseOnError ΓòÉΓòÉΓòÉ
  3817.  
  3818. PauseOnError = YES | No:  Yes forces a pause with the message "Error in 
  3819. filename, press any key to continue processing" after displaying any error 
  3820. message related to a specific line in the .INI file.  No continues processing 
  3821. with no pause after an error message is displayed. 
  3822.  
  3823.  
  3824. ΓòÉΓòÉΓòÉ 13.1.10. WindowState ΓòÉΓòÉΓòÉ
  3825.  
  3826. WindowState = STANDARD | Maximize | Minimize:  Sets the initial state of the 
  3827. 4OS2 window.  Standard puts the window in the default position on the OS/2 
  3828. desktop, and is the default setting. Maximize maximizes the window; Minimize 
  3829. minimizes it.  If you use Maximize or Minimize, you may see the 4OS2 window 
  3830. appear briefly in the Standard position as it is created by OS/2, then switch 
  3831. to the new state. 
  3832.  
  3833.  
  3834. ΓòÉΓòÉΓòÉ 13.1.11. WindowX, WindowY, WindowWidth, WindowHeight ΓòÉΓòÉΓòÉ
  3835.  
  3836. WindowX = nnnn, WindowY = nnnn, WindowWidth = nnnn, WindowHeight = nnnn:  These 
  3837. 4 directives set the initial size and position of the 4OS2 window.  The 
  3838. measurements are in pixels or pels.  WindowX and WindowY refer to the position 
  3839. of the bottom left corner of the window relative to the bottom left corner of 
  3840. the screen. 
  3841.  
  3842.  
  3843. ΓòÉΓòÉΓòÉ 13.2. Configuration Directives ΓòÉΓòÉΓòÉ
  3844.  
  3845. These directives control the way that 4OS2 operate.  Some can be changed with 
  3846. the SETDOS command while 4OS2 is running. Any corresponding SETDOS command is 
  3847. listed in the description of each directive.  The configuration directives are: 
  3848.  
  3849.         AmPm                Time display format 
  3850.         BatchEcho           Default batch file echo state 
  3851.         BeepFreq            Default beep frequency 
  3852.         BeepLength          Default beep length 
  3853.         CommandSep          Multiple command separator character 
  3854.         CursorIns           Cursor shape in insert mode 
  3855.         CursorOver          Cursor shape in overstrike mode 
  3856.         DescriptionMax      Maximum length of file descriptions 
  3857.         Descriptions        Enable / disable description processing 
  3858.         EvalMax             Max digits after decimal point in @EVAL 
  3859.         EvalMin             Min digits after decimal point in @EVAL 
  3860.         EditMode            Editing mode (insert / overstrike) 
  3861.         EscapeChar          4OS2 escape character 
  3862.         HistCopy            History copy mode 
  3863.         HistLogName         History log file name 
  3864.         HistMin             Minimum command length to save 
  3865.         HistWinColors       History window colors 
  3866.         HistWinHeight       History window height 
  3867.         HistWinLeft         History window left side position 
  3868.         HistWinTop          History window top position 
  3869.         HistWinWidth        History window width 
  3870.         LineInput           Enable / disable line input mode 
  3871.         LogName             Log file name 
  3872.         NoClobber           Overwrite protection for output redirection 
  3873.         ParameterChar       Alias / batch file parameter character 
  3874.         Printer             LIST print device 
  3875.         ScreenRows          Screen height 
  3876.         UpperCase           Force file names to upper case 
  3877.  
  3878.  
  3879. ΓòÉΓòÉΓòÉ 13.2.1. AmPm ΓòÉΓòÉΓòÉ
  3880.  
  3881. AmPm = Yes | NO | Auto:  Yes displays times in 12-hour format with a trailing 
  3882. "a" for AM or "p" for PM.  The default of No forces a display in 24-hour time 
  3883. format.  Auto formats the time according to the country code set for your 
  3884. system.  AmPm controls the time displays used by DIR and SELECT, in LOG files, 
  3885. and the output of the TIMER, DATE, and TIME commands.  It has no effect on 
  3886. %_TIME, %@MAKETIME, the $t and $T options of PROMPT, or date and time ranges. 
  3887.  
  3888.  
  3889. ΓòÉΓòÉΓòÉ 13.2.2. BatchEcho ΓòÉΓòÉΓòÉ
  3890.  
  3891. BatchEcho = YES | No:  Sets the default batch echo mode. Yes enables echoing of 
  3892. all batch file commands unless ECHO is explicitly set off in the batch file. 
  3893. No disables batch file echoing unless ECHO is explicitly set on.  Also see 
  3894. SETDOS /V. 
  3895.  
  3896.  
  3897. ΓòÉΓòÉΓòÉ 13.2.3. BeepFreq ΓòÉΓòÉΓòÉ
  3898.  
  3899. BeepFreq = nnnn (440):  Sets the default BEEP command frequency in Hz.  This is 
  3900. also the frequency for "error" beeps (for example, if you press an illegal 
  3901. key).  To disable all error beeps set this or BeepLength to 0.  If you do, the 
  3902. BEEP command will still be operable, but will not produce sound unless you 
  3903. explicitly specify the frequency and duration. 
  3904.  
  3905.  
  3906. ΓòÉΓòÉΓòÉ 13.2.4. BeepLength ΓòÉΓòÉΓòÉ
  3907.  
  3908. BeepLength = nnnn (2):  Sets the default BEEP length in system clock ticks 
  3909. (approximately 1/18 of a second per tick). BeepLength is also the default 
  3910. length for "error" beeps (for example, if you press an illegal key). 
  3911.  
  3912.  
  3913. ΓòÉΓòÉΓòÉ 13.2.5. CommandSep ΓòÉΓòÉΓòÉ
  3914.  
  3915. CommandSep = c:  This is the character used to separate multiple commands on 
  3916. the same line.  The default is the ampersand [&]. You cannot use any of the 
  3917. redirection characters (| > < ) or any of the whitespace characters (space, 
  3918. tab, comma, or equal sign).  Also see SETDOS /C, the %+ internal variable, and 
  3919. 4DOS, 4OS2, and 4DOS/NT Compatibility for information on using compatible 
  3920. command separators for two or more products. 
  3921.  
  3922.  
  3923. ΓòÉΓòÉΓòÉ 13.2.6. CursorIns ΓòÉΓòÉΓòÉ
  3924.  
  3925. CursorIns = nnnn (100):  This is the shape of the cursor for insert mode during 
  3926. command-line editing and all commands which accept line input (DESCRIBE, ESET, 
  3927. etc.).  The size is a percentage of the total character cell size, between 0% 
  3928. and 100%.  Because of the way video drivers map the cursor shape, you may not 
  3929. get a smooth progression in cursor shapes as CursorIns and CursorOver change. 
  3930. If CursorIns or CursorOver is set to -1, 4OS2 will not attempt to modify the 
  3931. cursor shape at all; you can use this feature to give another program full 
  3932. control of the cursor shape. Also see CursorOver and SETDOS /S. 
  3933.  
  3934.  
  3935. ΓòÉΓòÉΓòÉ 13.2.7. CursorOver ΓòÉΓòÉΓòÉ
  3936.  
  3937. CursorOver = nnnn (15):  This is the shape of the cursor for overtype mode 
  3938. during command-line editing and all commands which accept line input.  The size 
  3939. is a percentage of the total character cell size, between 0% and 100%.  For 
  3940. details see CursorIns; also see SETDOS /S. 
  3941.  
  3942.  
  3943. ΓòÉΓòÉΓòÉ 13.2.8. DescriptionMax ΓòÉΓòÉΓòÉ
  3944.  
  3945. DescriptionMax = nnnn (40):  Controls the description length limit for 
  3946. DESCRIBE.  The allowable range is 20 to 512 characters. 
  3947.  
  3948.  
  3949. ΓòÉΓòÉΓòÉ 13.2.9. Descriptions ΓòÉΓòÉΓòÉ
  3950.  
  3951. Descriptions = YES | No:  Turns description handling on or off during the file 
  3952. processing commands COPY, DEL, MOVE, and REN.  If set to No, 4OS2 will not 
  3953. update the description file when files are moved, copied, deleted or renamed. 
  3954. Also see SETDOS /D. 
  3955.  
  3956.  
  3957. ΓòÉΓòÉΓòÉ 13.2.10. EditMode ΓòÉΓòÉΓòÉ
  3958.  
  3959. EditMode = Insert | OVERSTRIKE:  This directive lets you start the command-line 
  3960. editor in either insert or overstrike mode.  Also see SETDOS /M. 
  3961.  
  3962.  
  3963. ΓòÉΓòÉΓòÉ 13.2.11. EscapeChar ΓòÉΓòÉΓòÉ
  3964.  
  3965. EscapeChar = c :  Sets the character used to suppress the normal meaning of the 
  3966. following character.  The default is a caret [^]. See Escape Character for a 
  3967. description of special escape sequences.  You cannot use any of the redirection 
  3968. characters (|, >, or < ) or the whitespace characters (space, tab, comma, or 
  3969. equal sign) as the escape character.  Also see SETDOS /E, the %= internal 
  3970. variable, and 4DOS, 4OS2, and 4DOS/NT Compatibility for information on using 
  3971. compatible escape characters for two or more products. 
  3972.  
  3973.  
  3974. ΓòÉΓòÉΓòÉ 13.2.12. EvalMax ΓòÉΓòÉΓòÉ
  3975.  
  3976. EvalMax = nnnn (8):  Controls the maximum number of digits after the decimal 
  3977. point in values returned by @EVAL. This setting can be overridden with the 
  3978. construct @EVAL[expression=n.n].  The allowable range is 0 to 8.  Also see 
  3979. EvalMin and SETDOS /F. 
  3980.  
  3981.  
  3982. ΓòÉΓòÉΓòÉ 13.2.13. EvalMin ΓòÉΓòÉΓòÉ
  3983.  
  3984. EvalMin = nnnn (8):  Controls the minimum number of digits after the decimal 
  3985. point in values returned by @EVAL.  This setting can be overridden with the 
  3986. construct @EVAL[expression=n.n].  The allowable range is 0 to 8.  The EvalMin 
  3987. value will be ignored if it is larger than EvalMax.  Also see SETDOS /F. 
  3988.  
  3989.  
  3990. ΓòÉΓòÉΓòÉ 13.2.14. HistCopy ΓòÉΓòÉΓòÉ
  3991.  
  3992. HistCopy = Yes | NO:  Controls what happens when you re-execute a line from the 
  3993. command history.  If this option is set to Yes, the line is appended to the end 
  3994. of the history list.  By default, or if this option is set to No, no copy of 
  3995. the command is made.  The original copy of the command is always retained at 
  3996. its original position in the list, regardless of the setting of HistCopy. 
  3997.  
  3998.  
  3999. ΓòÉΓòÉΓòÉ 13.2.15. HistLogName ΓòÉΓòÉΓòÉ
  4000.  
  4001. HistLogName = File:  Sets the history log file name and path.  Using 
  4002. HistLogName does not turn history logging on; you must use a LOG /H ON command 
  4003. to do so. 
  4004.  
  4005.  
  4006. ΓòÉΓòÉΓòÉ 13.2.16. HistMin ΓòÉΓòÉΓòÉ
  4007.  
  4008. HistMin = nnnn (0):  Sets the minimum command-line size to save in the command 
  4009. history list.  Any command line whose length is less than this value will not 
  4010. be saved.  Legal values range from 0, which saves everything, to 1024, which 
  4011. disables all command history saves. 
  4012.  
  4013.  
  4014. ΓòÉΓòÉΓòÉ 13.2.17. HistWinColors ΓòÉΓòÉΓòÉ
  4015.  
  4016. HistWinColors = Color:  Sets the default colors for the command- line and 
  4017. directory history windows.  If this directive is not used the colors will be 
  4018. reversed from the current colors on the screen. 
  4019.  
  4020.  
  4021. ΓòÉΓòÉΓòÉ 13.2.18. HistWinHeight ΓòÉΓòÉΓòÉ
  4022.  
  4023. HistWinHeight = nn (12):  Sets the height of the command-line and directory 
  4024. history windows in lines, including the border.  Legal values range from 5 to 
  4025. the height of your screen.  Any value which would cause the bottom of the 
  4026. window to be off the screen will be adjusted so that the entire window remains 
  4027. on the screen. 
  4028.  
  4029.  
  4030. ΓòÉΓòÉΓòÉ 13.2.19. HistWinLeft ΓòÉΓòÉΓòÉ
  4031.  
  4032. HistWinLeft = nn (40):  Sets the horizontal position of the left side of the 
  4033. command-line and directory history windows.  Legal values range from 0 (the 
  4034. left edge of the screen) to the number of columns on your screen minus 10.  Any 
  4035. value which would cause the right side of a minimum-width window to be off the 
  4036. screen will be adjusted so that the entire window remains on the screen. 
  4037.  
  4038.  
  4039. ΓòÉΓòÉΓòÉ 13.2.20. HistWinTop ΓòÉΓòÉΓòÉ
  4040.  
  4041. HistWinTop = nn (1):  Sets the vertical position of the top of the command-line 
  4042. and directory history windows.  Legal values range from 0 (the top of the 
  4043. screen) to the number of rows on your screen minus 5.  Any value which would 
  4044. cause the bottom of a minimum- height window to be off the screen will be 
  4045. adjusted so that the entire window remains on the screen. 
  4046.  
  4047.  
  4048. ΓòÉΓòÉΓòÉ 13.2.21. HistWinWidth ΓòÉΓòÉΓòÉ
  4049.  
  4050. HistWinWidth = nn (36):  Sets the width of the command-line and directory 
  4051. history windows in characters, including the border. Legal values range from 10 
  4052. to the width of your screen.  Any value which would cause the right side of the 
  4053. window to be off the screen will be adjusted so that the entire window remains 
  4054. on the screen. 
  4055.  
  4056.  
  4057. ΓòÉΓòÉΓòÉ 13.2.22. LineInput ΓòÉΓòÉΓòÉ
  4058.  
  4059. LineInput = Yes | NO:  This directive controls how 4OS2 gets its input from the 
  4060. command line.  Yes forces 4OS2 to perform line-by-line input, just as CMD.EXE 
  4061. does, instead of character-by-character input.  This will disable command-line 
  4062. editing, history recall, the directory history window, and filename completion, 
  4063. and will reduce the 4OS2 input length limit from 1023 characters to 299 
  4064. characters.  It is normally used only for applications which do not work 
  4065. properly unless 4OS2 uses line input.  If you have a particular program that 
  4066. requires line input, you can use SETDOS /L to temporarily change modes.  See 
  4067. README.DOC for information on programs which require this option. 
  4068.  
  4069.  
  4070. ΓòÉΓòÉΓòÉ 13.2.23. LogName ΓòÉΓòÉΓòÉ
  4071.  
  4072. LogName = File:  Sets the log file name and path.  Using LogName does not turn 
  4073. logging on; you must use a LOG ON command to do so. 
  4074.  
  4075.  
  4076. ΓòÉΓòÉΓòÉ 13.2.24. NoClobber ΓòÉΓòÉΓòÉ
  4077.  
  4078. NoClobber = Yes | NO:  If set to Yes, will prevent standard output redirection 
  4079. from overwriting an existing file, and will require that the output file 
  4080. already exist for append redirection.  Also see SETDOS /N. 
  4081.  
  4082.  
  4083. ΓòÉΓòÉΓòÉ 13.2.25. ParameterChar ΓòÉΓòÉΓòÉ
  4084.  
  4085. ParameterChar = c:  Sets the character used after a percent sign to specify all 
  4086. or all remaining command-line arguments in a batch file or alias (e.g., %& or 
  4087. %n&; see Batch Files and ALIAS).  The default is the ampersand [&].  Also see 
  4088. SETDOS /P.  See 4DOS, 4OS2, and 4DOS/NT Compatibility for information on using 
  4089. compatible parameter characters for two or more products.. 
  4090.  
  4091.  
  4092. ΓòÉΓòÉΓòÉ 13.2.26. Printer ΓòÉΓòÉΓòÉ
  4093.  
  4094. Printer = devicename:  Sets the output device that the LIST command will print 
  4095. to.  By default, LPT1 is used. The device can be PRN, LPT1 to 3, COM1 to 4, NUL 
  4096. (which will disable printed output) or any other installed character device. 
  4097.  
  4098.  
  4099. ΓòÉΓòÉΓòÉ 13.2.27. ScreenRows ΓòÉΓòÉΓòÉ
  4100.  
  4101. ScreenRows = nnnn:  Sets the number of screen rows used by the video display. 
  4102. Normally the screen size is determined automatically, but if you have a 
  4103. non-standard display you may need to set it explicitly.  This value does not 
  4104. affect screen scrolling, which is controlled by OS/2 and your video driver. 
  4105. ScreenRows is used only by the LIST and SELECT commands, the paged output 
  4106. options of other commands (e.g., TYPE /P), and error checking in the screen 
  4107. output commands.  Also see SETDOS /R. 
  4108.  
  4109.  
  4110. ΓòÉΓòÉΓòÉ 13.2.28. UpperCase ΓòÉΓòÉΓòÉ
  4111.  
  4112. UpperCase = Yes | NO:  Yes specifies that file and directory names should be 
  4113. displayed in the traditional upper-case by internal commands like COPY and DIR. 
  4114. No allows the normal 4OS2 lower-case style. This directive does not affect the 
  4115. display of filenames on HPFS drives.  Also see SETDOS /U. 
  4116.  
  4117.  
  4118. ΓòÉΓòÉΓòÉ 13.3. Color Directives ΓòÉΓòÉΓòÉ
  4119.  
  4120. These directives control the colors that 4OS2 use for its displays. Screen 
  4121. border colors can only be set in StdColors.  "BORder" color specifications 
  4122. included in other directives will be ignored.  For complete details on color 
  4123. names see Colors and Color Names.  The color directives are: 
  4124.  
  4125.         BrightBG                Bright background colors 
  4126.         ColorDir                Directory colors 
  4127.         InputColors             Input colors 
  4128.         ListColors              LIST display colors 
  4129.         ListStatBarColors       LIST status bar colors 
  4130.         SelectColors            SELECT display colors 
  4131.         SelectStatBarColors     SELECT status bar colors 
  4132.         StdColors               Standard display colors 
  4133.  
  4134.  
  4135. ΓòÉΓòÉΓòÉ 13.3.1. BrightBG ΓòÉΓòÉΓòÉ
  4136.  
  4137. BrightBG = Yes | No.  If set to Yes, 4OS2 will enable bright background colors 
  4138. in full-screen sessions.  If set to No, bright backgrounds will be disabled but 
  4139. blinking foreground characters will be enabled.  If BrightBG is not used, 4OS2 
  4140. will not adjust the bright background / blinking foreground switch at all. 
  4141. Most color video boards default to a blinking foreground with bright background 
  4142. colors disabled.  See also SETDOS /B. 
  4143.  
  4144. Using BrightBG requires careful attention to interactions of display type, 
  4145. mode, and color.  For a detailed explanation, see Colors and Color Names. 
  4146.  
  4147.  
  4148. ΓòÉΓòÉΓòÉ 13.3.2. ColorDir ΓòÉΓòÉΓòÉ
  4149.  
  4150. ColorDir = ext1 ext2 ...:colora;ext3 ext4 ... :colorb; ...: Sets the directory 
  4151. colors used by DIR and SELECT.  The format is the same as that used for the 
  4152. COLORDIR environment variable.  See Color-Coded Directories for a detailed 
  4153. explanation. 
  4154.  
  4155.  
  4156. ΓòÉΓòÉΓòÉ 13.3.3. InputColors ΓòÉΓòÉΓòÉ
  4157.  
  4158. InputColors = Color:  Sets the colors used for command-line input.  This 
  4159. setting is useful for making your input stand out from the normal output. 
  4160.  
  4161.  
  4162. ΓòÉΓòÉΓòÉ 13.3.4. ListColors ΓòÉΓòÉΓòÉ
  4163.  
  4164. ListColors = Color:  Sets the colors used by the LIST command.  If this 
  4165. directive is not used, LIST will use the current default colors set by the CLS 
  4166. or COLOR command or by the StdColors directive. 
  4167.  
  4168.  
  4169. ΓòÉΓòÉΓòÉ 13.3.5. ListStatBarColors ΓòÉΓòÉΓòÉ
  4170.  
  4171. ListStatBarColors = Color:  Sets the colors used on the LIST status bar.  If 
  4172. this directive is not used, LIST will set the status bar to the reverse of the 
  4173. screen color (the screen color is controlled by ListColors). 
  4174.  
  4175.  
  4176. ΓòÉΓòÉΓòÉ 13.3.6. SelectColors ΓòÉΓòÉΓòÉ
  4177.  
  4178. SelectColors = Color:  Sets the color used by the SELECT command.  If this 
  4179. directive is not used, SELECT will use the current default colors set by the 
  4180. CLS or COLOR command or by the StdColors directive. 
  4181.  
  4182.  
  4183. ΓòÉΓòÉΓòÉ 13.3.7. SelectStatBarColors ΓòÉΓòÉΓòÉ
  4184.  
  4185. SelectStatBarColors = Color:  Sets the color used on the SELECT status bar.  If 
  4186. this directive is not used, SELECT will set the status bar to the reverse of 
  4187. the screen color (the screen color is controlled by SelectColors). 
  4188.  
  4189.  
  4190. ΓòÉΓòÉΓòÉ 13.3.8. StdColors ΓòÉΓòÉΓòÉ
  4191.  
  4192. StdColors = Color:  Sets the standard colors to be used when CLS is used 
  4193. without a color specification, and for LIST and SELECT if ListColors and 
  4194. SelectColors are not used.  Using this directive is similar to placing a COLOR 
  4195. command in AUTOEXEC.BAT.  StdColors takes effect the first time CLS, LIST, or 
  4196. SELECT is used after 4OS2 starts, but will not affect the color of error or 
  4197. other messages displayed during the loading and initialization process. 
  4198.  
  4199.  
  4200. ΓòÉΓòÉΓòÉ 13.4. Key Mapping Directives ΓòÉΓòÉΓòÉ
  4201.  
  4202. These directives allow you to change the keys used for command-line editing and 
  4203. other internal functions.  They are divided into four types, depending on the 
  4204. context in which the keys are used.  For a discussion and list of directives 
  4205. for each type see: 
  4206.  
  4207.             General Input Keys 
  4208.             Command-Line Editing Keys 
  4209.             History and @SELECT Window Keys 
  4210.             LIST Keys 
  4211.  
  4212.  Using a key mapping directive allows you to assign a different or additional 
  4213.  key to perform the function described.  For example, to use function key F3 to 
  4214.  invoke the HELP facility (normally invoked with F1): 
  4215.  
  4216.           Help = F3
  4217.  
  4218.  Any directive can be used multiple times to assign multiple keys to the same 
  4219.  function.  For example: 
  4220.  
  4221.           ListFind = F            ;F does a find in LIST
  4222.           ListFind = F5           ;F5 also does a find in LIST
  4223.  
  4224.  Use some care when you reassign keystrokes.  If you assign a default key to a 
  4225.  different function, it will no longer be available for its original use.  For 
  4226.  example, if you assign F1 to the AddFile directive (a part of filename 
  4227.  completion), the F1 key will no longer invoke the help system, so you will 
  4228.  probably want to assign a different key to Help. 
  4229.  
  4230.  See Keys and Key Names before using the key mapping directives. 
  4231.  
  4232.  Key assignments are processed before looking for keystroke aliases.  For 
  4233.  example, if you assign Shift-F1 to HELP and also assign Shift-F1 to a key 
  4234.  alias, the key alias will be ignored. 
  4235.  
  4236.  Assigning a new keystroke for a function does not deassign the default 
  4237.  keystroke for the same function.  If you want to deassign one of the default 
  4238.  keys, use the NormalKey directive described below or the corresponding 
  4239.  directive for keys in the other key groups (NormalEditKey, NormalHWinKey, or 
  4240.  NormalListKey). 
  4241.  
  4242.  
  4243. ΓòÉΓòÉΓòÉ 13.4.1. General Input Keys ΓòÉΓòÉΓòÉ
  4244.  
  4245. These directives apply to all input.  They are in effect whenever 4OS2 requests 
  4246. input from the keyboard, including during command-line editing and the 
  4247. DESCRIBE, ESET, INPUT, LIST, and SELECT commands.  The general input keys are: 
  4248.  
  4249.         Backspace           Deletes the character to the left of the cursor 
  4250.         BeginLine           Moves the cursor to the start of the line 
  4251.         Del                 Deletes the character at the cursor 
  4252.         DelToBeginning      Deletes from the cursor to the start of the line 
  4253.         DelToEnd            Deletes from the cursor to the end of the line 
  4254.         DelWordLeft         Deletes the word to the left of the cursor 
  4255.         DelWordRight        Deletes the word to the right of the cursor 
  4256.         Down                * Moves the cursor or scrolls the display down 
  4257.         EndLine             Moves the cursor to the end of the line 
  4258.         EraseLine           Deletes the entire line 
  4259.         ExecLine            Executes or accepts a line 
  4260.         Ins                 Toggles insert / overstrike mode 
  4261.         Left                * Moves the cursor or scrolls the display left 
  4262.         NormalKey           * Deassigns a key 
  4263.         Right               * Moves the cursor or scrolls the display right 
  4264.         Up                  * Moves the cursor or scrolls the display up 
  4265.         WordLeft            Moves the cursor left one word 
  4266.         WordRight           Moves the cursor right one word 
  4267.  
  4268.  
  4269. ΓòÉΓòÉΓòÉ 13.4.1.1. Backspace ΓòÉΓòÉΓòÉ
  4270.  
  4271. Backspace = Key (Bksp):  Deletes the character to the left of the cursor. 
  4272.  
  4273.  
  4274. ΓòÉΓòÉΓòÉ 13.4.1.2. BeginLine ΓòÉΓòÉΓòÉ
  4275.  
  4276. BeginLine = Key (Home):  Moves the cursor to the beginning of the line. 
  4277.  
  4278.  
  4279. ΓòÉΓòÉΓòÉ 13.4.1.3. ┬áDel ΓòÉΓòÉΓòÉ
  4280.  
  4281. Del = Key (Del):  Deletes the character at the cursor. 
  4282.  
  4283.  
  4284. ΓòÉΓòÉΓòÉ 13.4.1.4. DelToBeginning ΓòÉΓòÉΓòÉ
  4285.  
  4286. DelToBeginning = Key (Ctrl-Home):  Deletes from the cursor to the start of the 
  4287. line. 
  4288.  
  4289.  
  4290. ΓòÉΓòÉΓòÉ 13.4.1.5. DelToEnd ΓòÉΓòÉΓòÉ
  4291.  
  4292. DelToEnd = Key (Ctrl-End):  Deletes from the cursor to the end of the line. 
  4293.  
  4294.  
  4295. ΓòÉΓòÉΓòÉ 13.4.1.6. DelWordLeft ΓòÉΓòÉΓòÉ
  4296.  
  4297. DelWordLeft = Key (Ctrl-L):  Deletes the word to the left of the cursor. 
  4298.  
  4299.  
  4300. ΓòÉΓòÉΓòÉ 13.4.1.7. DelWordRight ΓòÉΓòÉΓòÉ
  4301.  
  4302. DelWordRight = Key (Ctrl-R, Ctrl-Bksp):  Deletes the word to the right of the 
  4303. cursor.  See ClearKeyMap if you need to remove the default mapping of Ctrl-Bksp 
  4304. to this function. 
  4305.  
  4306.  
  4307. ΓòÉΓòÉΓòÉ 13.4.1.8. Down ΓòÉΓòÉΓòÉ
  4308.  
  4309. Down = Key (Down):  Scrolls the display down one line in LIST; moves the cursor 
  4310. down one line in SELECT and in the command-line history, directory history, or 
  4311. %@SELECT window.  (Scrolling down through the command history at the prompt is 
  4312. controlled by NextHistory, not by this directive.) 
  4313.  
  4314.  
  4315. ΓòÉΓòÉΓòÉ 13.4.1.9. EndLine ΓòÉΓòÉΓòÉ
  4316.  
  4317. EndLine = Key (End):  Moves the cursor to the end of the line. 
  4318.  
  4319.  
  4320. ΓòÉΓòÉΓòÉ 13.4.1.10. EraseLine ΓòÉΓòÉΓòÉ
  4321.  
  4322. EraseLine = Key (Esc):  Deletes the entire line. 
  4323.  
  4324.  
  4325. ΓòÉΓòÉΓòÉ 13.4.1.11. ExecLine ΓòÉΓòÉΓòÉ
  4326.  
  4327. ExecLine = Key (Enter):  Executes or accepts a line. 
  4328.  
  4329.  
  4330. ΓòÉΓòÉΓòÉ 13.4.1.12. Ins ΓòÉΓòÉΓòÉ
  4331.  
  4332. Ins = Key (Ins):  Toggles insert / overstrike mode during line editing. 
  4333.  
  4334.  
  4335. ΓòÉΓòÉΓòÉ 13.4.1.13. Left ΓòÉΓòÉΓòÉ
  4336.  
  4337. Left = Key (Left):  Moves the cursor left one character; scrolls the display 
  4338. left 8 columns in LIST; scrolls the display left 4 columns in the command-line, 
  4339. directory history, or %@SELECT window. 
  4340.  
  4341.  
  4342. ΓòÉΓòÉΓòÉ 13.4.1.14. NormalKey ΓòÉΓòÉΓòÉ
  4343.  
  4344. NormalKey = Key:  Deassigns a general input key in order to disable the usual 
  4345. meaning of the key within 4OS2 and/or make it available for keystroke aliases. 
  4346. This will make the keystroke operate as a "normal" key with no special 
  4347. function.  For example: 
  4348.  
  4349.         NormalKey = Ctrl-End
  4350.  
  4351. will disable Ctrl-End, which is the standard "delete to end of line" key. 
  4352. Ctrl-End could then be assigned to a keystroke alias. Another key could be 
  4353. assigned the "delete to end of line" function with the DelToEnd directive. 
  4354.  
  4355.  
  4356. ΓòÉΓòÉΓòÉ 13.4.1.15. Right ΓòÉΓòÉΓòÉ
  4357.  
  4358. Right = Key (Right):  Moves the cursor right one character; scrolls the display 
  4359. right 8 columns in LIST; scrolls the display right 4 columns in the 
  4360. command-line history, directory history, or %@SELECT window. 
  4361.  
  4362.  
  4363. ΓòÉΓòÉΓòÉ 13.4.1.16. Up ΓòÉΓòÉΓòÉ
  4364.  
  4365. Up = Key (Up):  Scrolls the display up one line in LIST; moves the cursor up 
  4366. one line in SELECT and in the command-line history, directory history, or 
  4367. %@SELECT window.  (Scrolling up through the command history at the prompt is 
  4368. controlled by PrevHistory, not by this directive.) 
  4369.  
  4370.  
  4371. ΓòÉΓòÉΓòÉ 13.4.1.17. WordLeft ΓòÉΓòÉΓòÉ
  4372.  
  4373. WordLeft = Key (Ctrl-Left):  Moves the cursor left one word; scrolls the 
  4374. display left 40 columns in LIST. 
  4375.  
  4376.  
  4377. ΓòÉΓòÉΓòÉ 13.4.1.18. WordRight ΓòÉΓòÉΓòÉ
  4378.  
  4379. WordRight = Key (Ctrl-Right):  Moves the cursor right one word; scrolls the 
  4380. display right 40 columns in LIST. 
  4381.  
  4382.  
  4383. ΓòÉΓòÉΓòÉ 13.4.2. Command-Line Editing Keys ΓòÉΓòÉΓòÉ
  4384.  
  4385. These directives apply only to command-line editing.  They are only effective 
  4386. at the 4OS2 prompt.  The command-line editing keys are: 
  4387.  
  4388.         AddFile             Keeps filename completion entry and adds another 
  4389.         CommandEscape       Allows direct entry of a keystroke 
  4390.         DelHistory          Deletes a history list entry 
  4391.         EndHistory          Displays the last entry in the history list 
  4392.         Help                Invokes this help system 
  4393.         LineToEnd           Copies the current line to the end of the history 
  4394.         NextFile            Gets the next matching filename 
  4395.         NextHistory         Recalls the next command from the history 
  4396.         NormalEditKey       Deassigns a command-line editing key 
  4397.         PopFile             Opens the filename completion window 
  4398.         PrevFile            Gets the previous matching filename 
  4399.         PrevHistory         Recalls the previous command from the history 
  4400.         SaveHistory         Saves the command line without executing it 
  4401.  
  4402.  
  4403. ΓòÉΓòÉΓòÉ 13.4.2.1. AddFile ΓòÉΓòÉΓòÉ
  4404.  
  4405. AddFile = Key (F10):  Keeps the current filename completion entry and inserts 
  4406. the next matching name. 
  4407.  
  4408.  
  4409. ΓòÉΓòÉΓòÉ 13.4.2.2. CommandEscape ΓòÉΓòÉΓòÉ
  4410.  
  4411. CommandEscape = Key (Alt-255):  Allows direct entry of a keystroke that would 
  4412. normally be interpreted as an editor command. 
  4413.  
  4414.  
  4415. ΓòÉΓòÉΓòÉ 13.4.2.3. DelHistory ΓòÉΓòÉΓòÉ
  4416.  
  4417. DelHistory = Key (Ctrl-D):  Deletes the displayed history list entry and 
  4418. displays the previous entry. 
  4419.  
  4420.  
  4421. ΓòÉΓòÉΓòÉ 13.4.2.4. EndHistory ΓòÉΓòÉΓòÉ
  4422.  
  4423. EndHistory = Key (Ctrl-E):  Displays the last entry in the history list. 
  4424.  
  4425.  
  4426. ΓòÉΓòÉΓòÉ 13.4.2.5. ┬áHelp ΓòÉΓòÉΓòÉ
  4427.  
  4428. Help = Key (F1):  Invokes the HELP facility. 
  4429.  
  4430.  
  4431. ΓòÉΓòÉΓòÉ 13.4.2.6. LineToEnd ΓòÉΓòÉΓòÉ
  4432.  
  4433. LineToEnd = Key (Ctrl-Enter):  Copies the current command line to the end of 
  4434. the history list even if it has not been altered. 
  4435.  
  4436.  
  4437. ΓòÉΓòÉΓòÉ 13.4.2.7. NextFile ΓòÉΓòÉΓòÉ
  4438.  
  4439. NextFile = Key (F9, Tab):  Gets the next matching filename. See ClearKeyMap if 
  4440. you need to remove the default mapping of Tab to this function. 
  4441.  
  4442.  
  4443. ΓòÉΓòÉΓòÉ 13.4.2.8. NextHistory ΓòÉΓòÉΓòÉ
  4444.  
  4445. NextHistory = Key (Down):  Recalls the next command from the command history. 
  4446.  
  4447.  
  4448. ΓòÉΓòÉΓòÉ 13.4.2.9. NormalEditKey ΓòÉΓòÉΓòÉ
  4449.  
  4450. NormalEditKey = Key:  Deassigns a command-line editing key in order to disable 
  4451. the usual meaning of the key while editing a command line, and/or make it 
  4452. available for keystroke aliases.  For additional details see NormalKey. 
  4453.  
  4454.  
  4455. ΓòÉΓòÉΓòÉ 13.4.2.10. PopFile ΓòÉΓòÉΓòÉ
  4456.  
  4457. PopFile = Key (F7, Ctrl-Tab):  Opens the filename completion window.  You may 
  4458. not be able to use Ctrl-Tab, because not all systems recognize it as a 
  4459. keystroke.  See ClearKeyMap if you need to remove the default mapping of 
  4460. Ctrl-Tab to this function. 
  4461.  
  4462.  
  4463. ΓòÉΓòÉΓòÉ 13.4.2.11. PrevFile ΓòÉΓòÉΓòÉ
  4464.  
  4465. PrevFile = Key (F8, Shift-Tab):  Gets the previous matching filename.  See 
  4466. ClearKeyMap if you need to remove the default mapping of Shift-Tab to this 
  4467. function. 
  4468.  
  4469.  
  4470. ΓòÉΓòÉΓòÉ 13.4.2.12. PrevHistory ΓòÉΓòÉΓòÉ
  4471.  
  4472. PrevHistory = Key (Up):  Recalls the previous command from the command history. 
  4473.  
  4474.  
  4475. ΓòÉΓòÉΓòÉ 13.4.2.13. SaveHistory ΓòÉΓòÉΓòÉ
  4476.  
  4477. SaveHistory = Key (Ctrl-K):  Saves the command line in the command history list 
  4478. without executing it. 
  4479.  
  4480.  
  4481. ΓòÉΓòÉΓòÉ 13.4.3. History and @SELECT Window Keys ΓòÉΓòÉΓòÉ
  4482.  
  4483. These directives apply only to the command history window, the directory 
  4484. history window, and %@SELECT windows.  The History and @SELECT window keys are: 
  4485.  
  4486.         DirWinOpen          Opens the directory history window 
  4487.         HistWinBegin        Moves to the first line of the history window 
  4488.         HistWinDel          Deletes a line from within the history window 
  4489.         HistWinEdit         Moves a line from the history window to the prompt 
  4490.         HistWinEnd          Moves to the last line of the history window 
  4491.         HistWinExec         Executes the selected line in the history window 
  4492.         HistWinOpen         Opens the command history window 
  4493.         NormalHWinKey       Deassigns a history window key 
  4494.  
  4495.  
  4496. ΓòÉΓòÉΓòÉ 13.4.3.1. DirWinOpen ΓòÉΓòÉΓòÉ
  4497.  
  4498. DirWinOpen = Key (Ctrl-PgUp):  Opens the directory history window while at the 
  4499. command line. 
  4500.  
  4501.  
  4502. ΓòÉΓòÉΓòÉ 13.4.3.2. HistWinBegin ΓòÉΓòÉΓòÉ
  4503.  
  4504. HistWinBegin = Key (Ctrl-PgUp):  Moves to the first line of the history when in 
  4505. the history window. 
  4506.  
  4507.  
  4508. ΓòÉΓòÉΓòÉ 13.4.3.3. HistWinDel ΓòÉΓòÉΓòÉ
  4509.  
  4510. HistWinDel = Key (Ctrl-D):  Deletes a line from within the history window. 
  4511.  
  4512.  
  4513. ΓòÉΓòÉΓòÉ 13.4.3.4. HistWinEdit ΓòÉΓòÉΓòÉ
  4514.  
  4515. HistWinEdit = Key (Ctrl-Enter):  Moves a line from the history window to the 
  4516. prompt for editing. 
  4517.  
  4518.  
  4519. ΓòÉΓòÉΓòÉ 13.4.3.5. HistWinEnd ΓòÉΓòÉΓòÉ
  4520.  
  4521. HistWinEnd = Key (Ctrl-PgDn):  Moves to the last line of the history when in 
  4522. the history window. 
  4523.  
  4524.  
  4525. ΓòÉΓòÉΓòÉ 13.4.3.6. HistWinExec ΓòÉΓòÉΓòÉ
  4526.  
  4527. HistWinExec = Key (Enter):  Executes the selected line in the history window. 
  4528.  
  4529.  
  4530. ΓòÉΓòÉΓòÉ 13.4.3.7. HistWinOpen ΓòÉΓòÉΓòÉ
  4531.  
  4532. HistWinOpen = Key (PgUp):  Brings up the history window while at the command 
  4533. line. 
  4534.  
  4535.  
  4536. ΓòÉΓòÉΓòÉ 13.4.3.8. NormalHWinKey ΓòÉΓòÉΓòÉ
  4537.  
  4538. NormalHWinKey = Key:  Deassigns a history window key in order to disable the 
  4539. usual meaning of the key within the history window. For additional details see 
  4540. NormalKey. 
  4541.  
  4542.  
  4543. ΓòÉΓòÉΓòÉ 13.4.4. LIST Keys ΓòÉΓòÉΓòÉ
  4544.  
  4545. These directives are effective only inside the LIST command.  The LIST keys 
  4546. are: 
  4547.  
  4548.         ListFind            Prompts and searches for a string 
  4549.         ListHex             Toggles hexadecimal display mode 
  4550.         ListHighBit         Toggles LIST's "strip high bit" option 
  4551.         ListInfo            Displays information about the current file 
  4552.         ListNext            Finds the next matching string 
  4553.         ListPrint           Prints the file on LPT1 
  4554.         ListWrap            Toggles LIST's wrap option 
  4555.         NormalListKey       Deassigns a LIST key 
  4556.  
  4557.  
  4558. ΓòÉΓòÉΓòÉ 13.4.4.1. ListFind ΓòÉΓòÉΓòÉ
  4559.  
  4560. ListFind = Key (F):  Prompts and searches for a string. 
  4561.  
  4562.  
  4563. ΓòÉΓòÉΓòÉ 13.4.4.2. ListHex ΓòÉΓòÉΓòÉ
  4564.  
  4565. ListHex = Key (X):  Toggles hexadecimal display mode. 
  4566.  
  4567.  
  4568. ΓòÉΓòÉΓòÉ 13.4.4.3. ListHighBit ΓòÉΓòÉΓòÉ
  4569.  
  4570. ListHighBit = Key (H):  Toggles LIST's "strip high bit" option, which can aid 
  4571. in displaying files from certain word processors. 
  4572.  
  4573.  
  4574. ΓòÉΓòÉΓòÉ 13.4.4.4. ListInfo ΓòÉΓòÉΓòÉ
  4575.  
  4576. ListInfo = Key (I):  Displays information about the current file. 
  4577.  
  4578.  
  4579. ΓòÉΓòÉΓòÉ 13.4.4.5. ListNext ΓòÉΓòÉΓòÉ
  4580.  
  4581. ListNext = Key (N):  Finds the next matching string. 
  4582.  
  4583.  
  4584. ΓòÉΓòÉΓòÉ 13.4.4.6. ListPrint ΓòÉΓòÉΓòÉ
  4585.  
  4586. ListPrint = Key (P):  Prints the file on LPT1. 
  4587.  
  4588.  
  4589. ΓòÉΓòÉΓòÉ 13.4.4.7. ListWrap ΓòÉΓòÉΓòÉ
  4590.  
  4591. ListWrap = Key (W):  Toggles LIST's wrap option on and off. The wrap option 
  4592. wraps text at the right margin. 
  4593.  
  4594.  
  4595. ΓòÉΓòÉΓòÉ 13.4.4.8. NormalListKey ΓòÉΓòÉΓòÉ
  4596.  
  4597. NormalListKey = Key:  Deassigns a LIST key in order to disable the usual 
  4598. meaning of the key within LIST.  For additional details see NormalKey. 
  4599.  
  4600.  
  4601. ΓòÉΓòÉΓòÉ 13.5. Advanced Directives ΓòÉΓòÉΓòÉ
  4602.  
  4603. These directives are generally used for unusual circumstances, or for 
  4604. diagnosing problems.  Most often they are not needed in normal use.  The 
  4605. advanced directives are: 
  4606.  
  4607.         ClearKeyMap         Clear default key mappings 
  4608.         NextINIFile         Set secondary shell .INI file name 
  4609.  
  4610.  
  4611. ΓòÉΓòÉΓòÉ 13.5.1. ClearKeyMap ΓòÉΓòÉΓòÉ
  4612.  
  4613. ClearKeyMap:  Clears all current key mappings. ClearKeyMap is a special 
  4614. directive which has no value or "=" after it.  Use ClearKeyMap to make one of 
  4615. the keys in the default map (Tab, Shift-Tab, Ctrl-Tab, or Ctrl-Bksp) available 
  4616. for a keystroke alias, or in the [Secondary] section of the .INI file to clear 
  4617. key mappings inherited from the primary shell.  ClearKeyMap should appear 
  4618. before any key mapping directives.  If you want to clear some but not all of 
  4619. the default mappings, use ClearKeyMap, then recreate the mappings you want to 
  4620. retain (e.g., with "NextFile=Tab", etc.). 
  4621.  
  4622.  
  4623. ΓòÉΓòÉΓòÉ 13.5.2. DescriptionName ΓòÉΓòÉΓòÉ
  4624.  
  4625. DescriptionName = File:  Sets the file name in which to store file 
  4626. descriptions.  The default file name is DESCRIPT.ION.  Use this directive with 
  4627. caution because changing the name from the default will make it difficult to 
  4628. transfer file descriptions to another system. 
  4629.  
  4630.  
  4631. ΓòÉΓòÉΓòÉ 13.5.3. NextINIFile ΓòÉΓòÉΓòÉ
  4632.  
  4633. NextINIFile = File.  The full path and name of the file must be specified.  All 
  4634. subsequent shells will read the specified .INI file, and ignore any [Secondary] 
  4635. section in the original .INI file. 
  4636.  
  4637.  
  4638. ΓòÉΓòÉΓòÉ 14. 4OS2 Commands ΓòÉΓòÉΓòÉ
  4639.  
  4640. The best way to learn the 4OS2 commands is to experiment with them.  The lists 
  4641. below categorize the available commands by topic and will help you find the 
  4642. ones that you need. 
  4643.  
  4644. System configuration: 
  4645.  
  4646.         CHCP          CLS           COLOR         DATE
  4647.         FREE          HISTORY       KEYS          KEYBD
  4648.         LOG           MEMORY        PROMPT        REBOOT
  4649.         SETDOS        TIME          VER           VERIFY
  4650.         VOL
  4651.  
  4652. File and directory management: 
  4653.  
  4654.         ATTRIB        COPY          DEL           DESCRIBE
  4655.         LIST          MOVE          REN           SELECT
  4656.         TYPE
  4657.  
  4658. Subdirectory management: 
  4659.  
  4660.         CD            CDD           DIR           DIRS
  4661.         MD            POPD          PUSHD         RD
  4662.  
  4663. Input and output: 
  4664.  
  4665.         DRAWBOX       DRAWHLINE     DRAWVLINE     ECHO
  4666.         ECHOS         INKEY         INPUT         SCREEN
  4667.         SCRPUT        TEXT          VSCRPUT
  4668.  
  4669. Commands primarily for use in or with batch files and aliases (some work only 
  4670. in batch files; see the individual commands for details): 
  4671.  
  4672.         ALIAS         BEEP          CALL          CANCEL
  4673.         DELAY         DO            ENDLOCAL      FOR
  4674.         GLOBAL        GOSUB         GOTO          IF
  4675.         IFF           LOADBTM       ON            PAUSE
  4676.         QUIT          REM           RETURN        SETLOCAL
  4677.         SHIFT         UNALIAS
  4678.  
  4679. Environment and path commands: 
  4680.  
  4681.         DPATH         ESET          PATH          SET
  4682.         UNSET
  4683.  
  4684. Other commands: 
  4685.  
  4686.         ?         DETACH    EXCEPT
  4687.         EXIT       FFIND      HELP
  4688.         START     TEE          TIMER
  4689.         WINDOW   Y
  4690.  
  4691.  
  4692. ΓòÉΓòÉΓòÉ 14.1. ? - List the internal commands ΓòÉΓòÉΓòÉ
  4693.  
  4694.  Purpose:    Display a list of internal commands or prompt for a command. 
  4695.  
  4696.  Format:     ? ["prompt text" command] 
  4697.  
  4698.  Usage 
  4699.  
  4700.  ? by itself displays a list of internal commands. 
  4701.  
  4702.  If you have disabled a command with SETDOS /I, it will not appear in the list. 
  4703.  
  4704.  If you add prompt text and a command, ? will display the prompt followed by 
  4705.  "(Y/N)?" and wait for the user's response.  If the user presses "Y" or "y", 
  4706.  the command will be executed.  If the user presses "N" or "n", the command 
  4707.  will be ignored. 
  4708.  
  4709.  
  4710. ΓòÉΓòÉΓòÉ 14.2. ALIAS - Create or display aliases ΓòÉΓòÉΓòÉ
  4711.  
  4712.  Purpose:    Create new command names that execute one or more commands or 
  4713.              redefine default options for existing commands; assign commands to 
  4714.              keystrokes; load or display the list of defined alias names. 
  4715.  
  4716.  Format:     ALIAS [/P /R file...] [name [=][value ]] 
  4717.  
  4718.              file :  One or more files to read for alias definitions. 
  4719.              name :  Name for an alias, or for the key to execute the alias. 
  4720.              value :  Text to be substituted for the alias name. 
  4721.  
  4722.              /P(ause)                        /R(ead file) 
  4723.  
  4724.  See also:  UNALIAS. 
  4725.  
  4726.  Usage 
  4727.  
  4728.  The ALIAS command lets you create new command names or redefine internal 
  4729.  commands.  It also lets you assign one or more commands to a single keystroke. 
  4730.  An alias is often used to execute a complex series of commands with a few 
  4731.  keystrokes or to create "in memory batch files" that run much faster than 
  4732.  disk-based batch files. 
  4733.  
  4734.  For example, if you would rather type D instead of DIR /W, you would use the 
  4735.  command: 
  4736.  
  4737.           [c:\] alias d = dir /w
  4738.  
  4739.  Now when you type a single d as a command, it will be translated into a DIR /W 
  4740.  command. 
  4741.  
  4742.  If you define aliases for commonly used application programs, you can often 
  4743.  remove the directories they're stored in from the PATH. For example, if you 
  4744.  use Quattro Pro and had the C:\QPRO directory in your path, you could define 
  4745.  the following alias: 
  4746.  
  4747.           [c:\] alias qpro = c:\qpro\q.exe
  4748.  
  4749.  With this alias defined, you can probably remove C:\QPRO from your path. 
  4750.  Quattro Pro will now load much faster than it would if 4OS2 had to search the 
  4751.  PATH for it.  In addition, the PATH can be shorter, which will speed up 
  4752.  searches for other programs. 
  4753.  
  4754.  If you apply this technique for each application program, you can often reduce 
  4755.  your PATH to just two or three directories containing utility programs, and 
  4756.  significantly reduce the time it takes to load most software on your system. 
  4757.  Before removing a directory from the PATH, you will need to define aliases for 
  4758.  all the executable programs you commonly use which are stored in that 
  4759.  directory. 
  4760.  
  4761.  Aliases are stored in memory, and are not saved automatically when you turn 
  4762.  off your computer or end your current session.  See below for information on 
  4763.  saving and reloading your aliases. 
  4764.  
  4765.  Multiple Commands and Special Characters in Aliases 
  4766.  
  4767.  An alias can represent more than one command.  For example: 
  4768.  
  4769.           [c:\] alias letters = `cd \letters & text`
  4770.  
  4771.  creates a new command called LETTERS.  The command first uses CD to change to 
  4772.  a subdirectory called \LETTERS and then runs a program called TEXT.  The 
  4773.  ampersand [&] is the command separator and indicates that the two commands are 
  4774.  distinct and should be executed sequentially. 
  4775.  
  4776.  Aliases make extensive use of the command separator, and the parameter 
  4777.  character, and may also use the escape character.  These characters differ 
  4778.  between 4DOS and 4OS2 or 4DOS/NT.  In the text and examples below, we use the 
  4779.  4OS2 characters.  If you want to use the same aliases under different command 
  4780.  processors, see 4DOS, 4OS2, and 4DOS/NT Compatibility. 
  4781.  
  4782.  When you type alias commands at the command line or in a batch file, you must 
  4783.  use back quotes [`] around the definition if it contains multiple commands, 
  4784.  parameters (discussed below), environment variables, redirection, or piping. 
  4785.  The back quotes prevent premature expansion of these arguments.  You may use 
  4786.  back quotes around other definitions, but they are not required. (You do not 
  4787.  need back quotes when your aliases are loaded from an ALIAS /R file; see below 
  4788.  for details.)  The examples above and below include back quotes only when they 
  4789.  are required. 
  4790.  
  4791.  Nested Aliases 
  4792.  
  4793.  Aliases may invoke internal commands, external commands, or other aliases. 
  4794.  (However, an alias may not invoke itself, except in special cases where an IF 
  4795.  or IFF command is used to prevent an infinite loop.)  The two aliases below 
  4796.  demonstrate alias nesting (one alias invoking another).  The first line 
  4797.  defines an alias which runs a program called WP.EXE that is in the E:\WP60\ 
  4798.  subdirectory.  The second alias changes directories with the PUSHD command, 
  4799.  runs the WP alias, and then returns to the original directory with the POPD 
  4800.  command: 
  4801.  
  4802.           [c:\] alias wp = e:\wp60\wp.exe
  4803.           [c:\] alias w = `pushd c:\wp & wp & popd`
  4804.  
  4805.  The second alias above could have included the full path and name of the 
  4806.  WP.EXE program instead of calling the WP alias. However, writing two aliases 
  4807.  makes the second one easier to read and understand, and makes the first alias 
  4808.  available for independent use.  If you rename the WP.EXE program or move it to 
  4809.  a new directory, only the first alias needs to be changed. 
  4810.  
  4811.  Temporarily Disabling Aliases 
  4812.  
  4813.  If you put an asterisk [*] immediately before a command in the value of an 
  4814.  alias definition (the part after the equal sign), it tells 4OS2 not to attempt 
  4815.  to interpret that command as another (nested) alias.  An asterisk used this 
  4816.  way must be preceded by a space or the command separator and followed 
  4817.  immediately by an internal or external command name. 
  4818.  
  4819.  By using an asterisk, you can redefine the default options for any internal 
  4820.  command.  For example, suppose that you always want to use the DIR command 
  4821.  with the /2 (two column) and /P (pause at the end of each page) options: 
  4822.  
  4823.           [c:\] alias dir = *dir /2/p
  4824.  
  4825.  If you didn't include the asterisk, the second DIR on the line would be the 
  4826.  name of the alias itself, and 4OS2 would repeatedly re- invoke the DIR alias, 
  4827.  rather than running the DIR command.  This would cause an "Alias loop" or 
  4828.  "Command line too long" error. 
  4829.  
  4830.  An asterisk also helps you keep the names of internal commands from 
  4831.  conflicting with the names of external programs.  For example, suppose you 
  4832.  have a program called LIST.COM.  Normally, the internal LIST command will run 
  4833.  anytime you type LIST.  But two simple aliases will give you access to both 
  4834.  the LIST.COM program and the LIST command: 
  4835.  
  4836.           [c:\] alias list = c:\util\list.com
  4837.           [c:\] alias display = *list
  4838.  
  4839.  The first line above defines LIST as an alias for the LIST.COM program.  If 
  4840.  you stopped there, the external program would run every time you typed LIST 
  4841.  and you would not have easy access to the internal LIST command.  The second 
  4842.  line renames the internal LIST command as DISPLAY.  The asterisk is needed in 
  4843.  the second command to indicate that the following word means the internal 
  4844.  command LIST, not the LIST alias which runs your external program. 
  4845.  
  4846.  You can also use an asterisk before a command that you enter at the command 
  4847.  line or in a batch file.  If you do, that command won't be interpreted as an 
  4848.  alias.  This can be useful when you want to be sure you are running the true, 
  4849.  original command and not an alias with the same name, or temporarily defeat 
  4850.  the purpose of an alias which changes the meaning or behavior of a command. 
  4851.  
  4852.  Partial Alias Names 
  4853.  
  4854.  You can also use an asterisk in the name of an alias.  When you do, the 
  4855.  characters following the asterisk are optional when you invoke the alias 
  4856.  command.  (Use of an asterisk in the alias name is unrelated to the use of an 
  4857.  asterisk in the alias value discussed above.)  For example, with this alias: 
  4858.  
  4859.           [c:\] alias wher*eis = dir /sp
  4860.  
  4861.  the new command, WHEREIS, can be invoked as WHER, WHERE, WHEREI, or WHEREIS. 
  4862.  Now if you type: 
  4863.  
  4864.           [c:\] where myfile.txt
  4865.  
  4866.  The WHEREIS alias will be expanded to the command: 
  4867.  
  4868.           dir /sp myfile.txt
  4869.  
  4870.  Keystroke Aliases 
  4871.  
  4872.  If you want to assign an alias to a keystroke, use the keyname on the left 
  4873.  side of the equal sign, preceded by an at sign [@]. For example, to assign the 
  4874.  command DIR /W to the F5 key, type 
  4875.  
  4876.           [c:\] alias @F5 = dir /w
  4877.  
  4878.  See Keys and Key Names for a complete listing of key names and a description 
  4879.  of the key name format. 
  4880.  
  4881.  When you define keystroke aliases, the assignments will only be in effect at 
  4882.  the command line, not inside application programs.  Be careful not to assign 
  4883.  aliases to keys that are already used at the command line (like F1 for Help). 
  4884.  The command-line meanings take precedence and the keystroke alias will never 
  4885.  be invoked.  If you want to use one of the command-line keys for an alias 
  4886.  instead of its normal meaning, you must first disable its regular use with the 
  4887.  NormalKey or NormalEditKey directive in your .INI file. 
  4888.  
  4889.  If you define a keystroke alias with a single at sign as shown above, then, 
  4890.  when you press the F5 key, the value of the alias (DIR /W above) will be 
  4891.  placed on the command line for you.  You can type additional parameters if you 
  4892.  wish and then press Enter to execute the command.  With this particular alias, 
  4893.  you can define the files that you want to display after pressing F5 and before 
  4894.  pressing Enter to execute the command. 
  4895.  
  4896.  If you want the keystroke alias to take action automatically without waiting 
  4897.  for you to edit the command line or press Enter, you can begin the definition 
  4898.  with two at signs [@@]. 4OS2 will execute the alias "silently," without 
  4899.  displaying its text on the command line.  For example, this command will 
  4900.  assign an alias to the F6 key that uses the CDD command to take you back to 
  4901.  the previous default directory: 
  4902.  
  4903.           [c:\] alias @@f6 = cdd -
  4904.  
  4905.  You can also define a keystroke alias by using "@" or "@@" plus a scan code 
  4906.  for one of the permissible keys (see the Reference Tables for a list of scan 
  4907.  codes).  In most cases it will be easier to use key names.  Scan codes should 
  4908.  only be used with unusual keyboards where a key name is not available for the 
  4909.  key you are using. 
  4910.  
  4911.  Displaying Aliases 
  4912.  
  4913.  If you want to see a list of all current ALIAS commands, type: 
  4914.  
  4915.           [c:\] alias
  4916.  
  4917.  You can also view the definition of a single alias.  If you want to see the 
  4918.  definition of the alias LIST, you can type: 
  4919.  
  4920.           [c:\] alias list
  4921.  
  4922.  Saving and Reloading Your Aliases 
  4923.  
  4924.  You can save your aliases to a file called ALIAS.LST this way: 
  4925.  
  4926.           [c:\] alias > alias.lst
  4927.  
  4928.  You can then reload all the alias definitions in the file the next time you 
  4929.  boot up with the command: 
  4930.  
  4931.           [c:\] alias /r alias.lst
  4932.  
  4933.  This is much faster than defining each alias individually in a batch file.  If 
  4934.  you keep your alias definitions in a separate file which you load when your 
  4935.  system starts, you can edit them with a text editor, reload the edited file 
  4936.  with ALIAS /R, and know that the same alias list will be loaded the next time 
  4937.  you boot your computer. 
  4938.  
  4939.  When you define aliases in a file that will be read with the ALIAS /R command, 
  4940.  you do not need back quotes around the value, even if back quotes would 
  4941.  normally be required when defining the same alias at the command line or in a 
  4942.  batch file. 
  4943.  
  4944.  To remove an alias, use the UNALIAS command. 
  4945.  
  4946.  Alias Parameters 
  4947.  
  4948.  Aliases can use command-line arguments or parameters like those in batch 
  4949.  files.  The command-line arguments are numbered from %0 to %127.  %0 contains 
  4950.  the alias name.  It is up to the alias to determine the meaning of the other 
  4951.  parameters.  You can use quotation marks to pass spaces, tabs, commas, and 
  4952.  other special characters in an alias parameter; see Argument Quoting for 
  4953.  details. 
  4954.  
  4955.  Parameters that are referred to in an alias, but which are missing on the 
  4956.  command line, appear as empty strings inside the alias.  For example, if you 
  4957.  put two parameters on the command line, any reference in the alias to %3 or 
  4958.  any higher-numbered parameter will be interpreted as an empty string. 
  4959.  
  4960.  The parameter %n$ has a special meaning.  4OS2 interprets it to mean "the 
  4961.  entire command line, from argument n to the end."  If n is not specified, it 
  4962.  has a default value of 1, so %$ means "the entire command line after the alias 
  4963.  name."  The special parameter %# contains the number of command-line 
  4964.  arguments. 
  4965.  
  4966.  For example, the following alias will change directories, perform a command, 
  4967.  and return to the original directory: 
  4968.  
  4969.           [c:\] alias in `pushd %1 & %2$ & popd`
  4970.  
  4971.  When this alias is invoked as: 
  4972.  
  4973.           [c:\] in c:\comm mycomm /xmodem /2400
  4974.  
  4975.  the first parameter, %1, has the value c:\comm.  %2 is mycomm,  %3 is /xmodem, 
  4976.  and %4 is /2400. The command line expands into these three separate commands: 
  4977.  
  4978.           pushd c:\comm
  4979.           mycomm /xmodem /2400
  4980.           popd
  4981.  
  4982.  This next example uses the IFF command to redefine the defaults for SET.  It 
  4983.  should be entered on one line: 
  4984.  
  4985.           [c:\] alias set = `iff %# == 0 then & *set /p
  4986.                & else & *set %& & endiff`
  4987.  
  4988.  This modifies the SET command so that if SET is entered with no arguments, it 
  4989.  is replaced by SET /P (pause after displaying each page), but if SET is 
  4990.  followed by an argument, it behaves normally. Note the use of asterisks (*set) 
  4991.  to prevent alias loops. 
  4992.  
  4993.  If an alias uses parameters, command-line arguments will be deleted up to and 
  4994.  including the highest referenced argument.  For example, if an alias refers 
  4995.  only to %1 and %4, then the first and fourth arguments will be used, the 
  4996.  second and third arguments will be discarded, and any additional arguments 
  4997.  beyond the fourth will be appended to the expanded command (after the value 
  4998.  portion of the alias).  If an alias uses no parameters, all of the command- 
  4999.  line arguments will be appended to the expanded command. 
  5000.  
  5001.  Aliases also have full access to all variables in the environment, internal 
  5002.  variables, and variable functions.  For example, you can create a simple 
  5003.  command-line calculator this way (enter this on one line): 
  5004.  
  5005.           [c:\] alias calc = `echo The answer is: %@eval[%&]`
  5006.  
  5007.  Now, if you enter: 
  5008.  
  5009.           [c:\] calc 5 * 6
  5010.  
  5011.  the alias will display: 
  5012.  
  5013.           The answer is: 30
  5014.  
  5015.  Local and Global Aliases 
  5016.  
  5017.  The aliases can be stored in either a "local" or "global" list. 
  5018.  
  5019.  With a local alias list, any changes made to the aliases will only affect the 
  5020.  current copy of 4OS2.  They will not be visible in other shells or other 
  5021.  sessions. 
  5022.  
  5023.  With a global alias list, all copies of 4OS2 will share the same alias list, 
  5024.  and any changes made to the aliases in one copy will affect all other copies. 
  5025.  This is the default. 
  5026.  
  5027.  You can control the type of alias list with the LocalAliases directive in the 
  5028.  .INI file, and with the /L and /LA options of the START command. 
  5029.  
  5030.  Whenever you start a secondary shell which uses a local alias list, it 
  5031.  inherits a copy of the aliases from the previous shell. However, any changes 
  5032.  to the alias made in the secondary shell will affect only that shell.  If you 
  5033.  want changes made in a secondary shell to affect the previous shell, use a 
  5034.  global alias list in both shells. 
  5035.  
  5036.  Retaining Global Aliases with SHRALIAS 
  5037.  
  5038.  If you select a global alias list for 4OS2 you can share the aliases among all 
  5039.  copies of 4OS2 running in any session.  When you close all 4OS2 sessions, the 
  5040.  memory for the global alias list is released, and a new, empty alias list is 
  5041.  created the next time you start 4OS2. 
  5042.  
  5043.  If you want the alias list to be retained in memory even when no command 
  5044.  processor session is running, you need to load the SHRALIAS program, which 
  5045.  performs this service for both the global alias list and the global history 
  5046.  list.  SHRALIAS is supplied with your copy of 4OS2. 
  5047.  
  5048.  To load SHRALIAS, simply run the SHRALIAS.EXE program, which is normally 
  5049.  installed in the same directory as 4OS2.  You may find it convenient to load 
  5050.  SHRALIAS from your 4START file or your STARTUP.CMD file. 
  5051.  
  5052.  SHRALIAS runs as a "detached" process, which means it does not have a screen 
  5053.  display or accept keyboard input.  It is shut down automatically when OS/2 
  5054.  shuts down.  To unload SHRALIAS manually, run SHRALIAS.EXE with the parameter 
  5055.  /U. 
  5056.  
  5057.  The UNKNOWN_CMD Alias 
  5058.  
  5059.  If you create an alias with the name UNKNOWN_CMD, it will be executed any time 
  5060.  4OS2 would normally issue an "Unknown command" error message.  This allows you 
  5061.  to define your own handler for unknown commands.  When the UNKNOWN_CMD alias 
  5062.  is executed, the command line which generated the error is passed to the alias 
  5063.  for possible processing. 
  5064.  
  5065.  Use caution when you create the UNKNOWN_CMD alias.  If it contains an unknown 
  5066.  command, it will be called repeatedly and 4OS2 will lock up in an infinite 
  5067.  loop. 
  5068.  
  5069.  Options 
  5070.  
  5071.     /P:     (Pause) This option is only effective when ALIAS is used to display 
  5072.             existing definitions.  It pauses the display after each page and 
  5073.             waits for a keystroke before continuing (see Page and File 
  5074.             Prompts). 
  5075.  
  5076.     /R:     (Read file) This option loads an alias list from a file. The format 
  5077.             of the file is the same as that of the ALIAS display: 
  5078.  
  5079.                                 name=value
  5080.  
  5081.             where name is the name of the alias and value is its value.  You 
  5082.             can use an equal sign [=] or space to separate the name and value. 
  5083.             Back quotes are not required around the value.  You can add 
  5084.             comments to the file by starting each comment line with a colon 
  5085.             [:].  You can load multiple files with one ALIAS /R command by 
  5086.             placing the names on the command line, separated by spaces: 
  5087.  
  5088.                                 [c:\] alias /r alias1.lst alias2.lst
  5089.  
  5090.             Each definition in an ALIAS /R file can be up to 2047 characters 
  5091.             long. The definitions can span multiple lines in the file if each 
  5092.             line, except the last, is terminated with an escape character. 
  5093.  
  5094.  
  5095. ΓòÉΓòÉΓòÉ 14.3. ATTRIB - Change or view file attributes ΓòÉΓòÉΓòÉ
  5096.  
  5097.  Purpose:    Change or view file and subdirectory attributes. 
  5098.  
  5099.  Format:     ATTRIB [/A:[[-]rhsda] /D /P /Q /S] [+|-[AHRS]] files ... 
  5100.  
  5101.              files :  A file, directory, or list of files or directories on 
  5102.              which to operate. 
  5103.  
  5104.              /A(ttribute select)             /Q(uiet) 
  5105.              /D(irectories)                  /S(ubdirectories) 
  5106.              /P(ause) 
  5107.  
  5108.              Attribute flags: 
  5109.  
  5110.              +A      Set the archive attribute 
  5111.              -A      Clear the archive attribute 
  5112.              +H      Set the hidden attribute 
  5113.              -H      Clear the hidden attribute 
  5114.              +R      Set the read-only attribute 
  5115.              -R      Clear the read-only attribute 
  5116.              +S      Set the system attribute 
  5117.              -S      Clear the system attribute 
  5118.  
  5119.  File Selection 
  5120.  
  5121.  Supports extended wildcards, ranges, multiple file names, and include lists. 
  5122.  
  5123.  Usage 
  5124.  
  5125.  Every file and subdirectory has 4 attributes that can be turned on (set) or 
  5126.  turned off (cleared):  Archive, Hidden, Read- only, and System. 
  5127.  
  5128.  The ATTRIB command lets you set or clear attributes for any file, group of 
  5129.  files, or subdirectory.  You can view file attributes by entering ATTRIB 
  5130.  without specifying new attributes (i.e., without the [+|-[AHRS]] part of the 
  5131.  format), or with the DIR /T command. 
  5132.  
  5133.  For example, you can set the read-only and hidden attributes for the file MEMO 
  5134.  : 
  5135.  
  5136.           [c:\] attrib +rh memo
  5137.  
  5138.  Attribute options apply to the file(s) that follow the options on the ATTRIB 
  5139.  command line.  The example below shows how to set different attributes on 
  5140.  different files with a single command.  It sets the archive attribute for all 
  5141.  .TXT files, then sets the system attribute and clears the archive attribute 
  5142.  for TEST.COM : 
  5143.  
  5144.           [c:\] attrib +a *.txt +s -a test.com
  5145.  
  5146.  Your operating system also supports "D" (subdirectory) and "V" (volume label) 
  5147.  attributes.  These attributes cannot be altered with ATTRIB; they are designed 
  5148.  to be controlled only by the operating system itself. 
  5149.  
  5150.  Options 
  5151.  
  5152.     /A:     (Attribute select) Select only those files that have the specified 
  5153.             attribute(s) set.  Preceding the attribute character with a hyphen 
  5154.             [-] will select files that do not have that attribute set.  The 
  5155.             attributes are: 
  5156.  
  5157.                  R  Read-only 
  5158.                  H  Hidden 
  5159.                  S  System 
  5160.                  D  Subdirectory 
  5161.                  A  Archive 
  5162.  
  5163.             If no attributes are listed at all (e.g., ATTRIB /A: ...), ATTRIB 
  5164.             will select all files and subdirectories including hidden and 
  5165.             system files.  If attributes are combined, all the specified 
  5166.             attributes must match for a file to be selected. For example, 
  5167.             /A:RHS will select only those files with all three attributes set. 
  5168.  
  5169.     /D:     (Directories) If you use the /D option, ATTRIB will modify the 
  5170.             attributes of subdirectories in addition to files (yes, you can 
  5171.             have a hidden subdirectory): 
  5172.  
  5173.                                 [c:\] attrib /d +h c:\mydir
  5174.  
  5175.             In addition, the /D option will keep ATTRIB from appending "\*.*" 
  5176.             to the end of a directory name and modifying the attributes of all 
  5177.             the files in the subdirectory. 
  5178.  
  5179.             If you use a directory name instead of a file name, and omit /D, 
  5180.             ATTRIB will append "\*.*" to the end of the name and act on all 
  5181.             files in that directory, rather than acting on the directory 
  5182.             itself. 
  5183.  
  5184.     /P:     (Pause) Wait for a key to be pressed after each screen page before 
  5185.             continuing the display.  Your options at the prompt are explained 
  5186.             in detail under Page and File Prompts. 
  5187.  
  5188.     /Q:     (Quiet) This option turns off ATTRIB's normal screen output. It is 
  5189.             most useful in batch files. 
  5190.  
  5191.     /S:     (Subdirectories) If you use the /S option, the ATTRIB command will 
  5192.             be applied to all matching files in the current or named directory 
  5193.             and all of its subdirectories. 
  5194.  
  5195.  
  5196. ΓòÉΓòÉΓòÉ 14.4. BEEP - Beep the speaker ΓòÉΓòÉΓòÉ
  5197.  
  5198.  Purpose:    Beep the speaker or play simple music. 
  5199.  
  5200.  Format:     BEEP [frequency duration ...] 
  5201.  
  5202.              frequency :  The beep frequency in Hertz (cycles per second). 
  5203.              duration :  The beep length in 1/18th second intervals. 
  5204.  
  5205.  Usage 
  5206.  
  5207.  BEEP generates a sound through your computer's speaker.  It is normally used 
  5208.  in batch files to signal that an operation has been completed, or that the 
  5209.  computer needs attention. 
  5210.  
  5211.  Because BEEP allows you to specify the frequency and duration of the sound, 
  5212.  you can also use it to play simple music or to create different kinds of 
  5213.  signals for the user. 
  5214.  
  5215.  You can include as many frequency and duration pairs as you wish. No sound 
  5216.  will be generated for frequencies less than 20 Hz, allowing you to insert 
  5217.  short delays.  The default value for frequency is 440 Hz; the default value 
  5218.  for duration is 2. 
  5219.  
  5220.  This batch file fragment runs a program called DEMO, then plays a few notes 
  5221.  and waits for you to press a key: 
  5222.  
  5223.           demo & beep 440 4  600 2  1040 6
  5224.           pause Finished with the demo - hit a key...
  5225.  
  5226.  The following table gives the frequency values for a five octave range (middle 
  5227.  C is 262 Hz): 
  5228.  
  5229.           ΓòöΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòñΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòñΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòñΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòñΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòñΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòù
  5230.           Γòæ C      Γöé  131  Γöé  262  Γöé  523  Γöé  1046  Γöé  2093 Γòæ
  5231.           Γòæ C#/Db  Γöé  139  Γöé  277  Γöé  554  Γöé  1108  Γöé  2217 Γòæ
  5232.           Γòæ D      Γöé  147  Γöé  294  Γöé  587  Γöé  1175  Γöé  2349 Γòæ
  5233.           Γòæ D#/Eb  Γöé  156  Γöé  311  Γöé  622  Γöé  1244  Γöé  2489 Γòæ
  5234.           Γòæ E      Γöé  165  Γöé  330  Γöé  659  Γöé  1318  Γöé  2637 Γòæ
  5235.           Γòæ F      Γöé  175  Γöé  349  Γöé  698  Γöé  1397  Γöé  2794 Γòæ
  5236.           Γòæ F#/Gb  Γöé  185  Γöé  370  Γöé  740  Γöé  1480  Γöé  2960 Γòæ
  5237.           Γòæ G      Γöé  196  Γöé  392  Γöé  784  Γöé  1568  Γöé  3136 Γòæ
  5238.           Γòæ G#/Ab  Γöé  208  Γöé  415  Γöé  831  Γöé  1662  Γöé  3322 Γòæ
  5239.           Γòæ A      Γöé  220  Γöé  440  Γöé  880  Γöé  1760  Γöé  3520 Γòæ
  5240.           Γòæ A#/Bb  Γöé  233  Γöé  466  Γöé  932  Γöé  1866  Γöé  3729 Γòæ
  5241.           Γòæ B      Γöé  248  Γöé  494  Γöé  988  Γöé  1973  Γöé  3951 Γòæ
  5242.           ΓòÜΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòºΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòºΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòºΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòºΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòºΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓò¥
  5243.  
  5244.  
  5245. ΓòÉΓòÉΓòÉ 14.5. CALL - Execute one batch file from another ΓòÉΓòÉΓòÉ
  5246.  
  5247.  Purpose:    Execute one batch file from within another. 
  5248.  
  5249.  Format:     CALL file 
  5250.  
  5251.              file :  The batch file to execute. 
  5252.  
  5253.  See also:  CANCEL and QUIT. 
  5254.  
  5255.  Usage 
  5256.  
  5257.  CALL allows batch files to call other batch files (batch file nesting).  The 
  5258.  calling batch file is suspended while the called (second) batch file runs. 
  5259.  When the second batch file finishes, the original batch file resumes execution 
  5260.  at the next command.  If you execute a batch file from inside another batch 
  5261.  file without using CALL, the first batch file is terminated before the second 
  5262.  one starts. 
  5263.  
  5264.  4OS2 supports batch file nesting up to ten levels deep. 
  5265.  
  5266.  The current ECHO state is inherited by a called batch file. 
  5267.  
  5268.  A called batch file will return to the calling file after processing the last 
  5269.  line in the called file, or when a QUIT command is executed.  A called batch 
  5270.  file should always return in this way, or terminate all batch files with 
  5271.  CANCEL.  Restarting (or CALLing) the original batch file from within a called 
  5272.  file will prevent 4OS2 from detecting that you've left the second file, and it 
  5273.  may cause an infinite loop or a stack overflow. 
  5274.  
  5275.  CALL returns an exit code which matches the batch file return code. You can 
  5276.  test this exit code with the %_? or %? environment variable, and use it with 
  5277.  conditional commands(&& and ||). 
  5278.  
  5279.  
  5280. ΓòÉΓòÉΓòÉ 14.6. CANCEL - Terminate batch file processing ΓòÉΓòÉΓòÉ
  5281.  
  5282.  Purpose:    Terminate batch file processing. 
  5283.  
  5284.  Format:     CANCEL [value ] 
  5285.  
  5286.              value :  The exit code from 0 to 255 to return to 4OS2. 
  5287.  
  5288.  See also:  CALL and QUIT. 
  5289.  
  5290.  Usage 
  5291.  
  5292.  The CANCEL command ends all batch file processing, regardless of the batch 
  5293.  file nesting level.  Use QUIT to end a nested batch file and return to the 
  5294.  previous batch file. 
  5295.  
  5296.  You can CANCEL at any point in a batch file.  If CANCEL is used from within an 
  5297.  alias it will end execution of both the alias and any batch file(s) which are 
  5298.  running at the time. 
  5299.  
  5300.  The following batch file fragment compares an input line to "end" and 
  5301.  terminates all batch file processing if it matches: 
  5302.  
  5303.           input Enter your choice:  %%option
  5304.           if "%option" == "end" cancel
  5305.  
  5306.  If you specify a value, CANCEL will set the ERRORLEVEL or exit code to 
  5307.  thatvalue (see the IF command, and the %? variable). 
  5308.  
  5309.  
  5310. ΓòÉΓòÉΓòÉ 14.7. CD - Change the current directory ΓòÉΓòÉΓòÉ
  5311.  
  5312.  Purpose:    Display or change the current directory. 
  5313.  
  5314.  Format:     CD [ path | - ] 
  5315.                 or 
  5316.              CHDIR [ path | - ] 
  5317.  
  5318.              path :  The directory to change to, including an optional drive 
  5319.              name. 
  5320.  
  5321.  See also:  CDD, MD, PUSHD, RD, and CDPATH. 
  5322.  
  5323.  Usage 
  5324.  
  5325.  CD and CHDIR are synonyms.  You can use either one. 
  5326.  
  5327.  CD lets you navigate through the disk subdirectory structure by changing the 
  5328.  current working directory.  If you enter CD and a directory name, the named 
  5329.  directory becomes the new current directory.  For example, to change to the 
  5330.  subdirectory C:\FINANCE\MYFILES : 
  5331.  
  5332.           [c:\] cd \finance\myfiles
  5333.           [c:\finance\myfiles]
  5334.  
  5335.  Every disk drive on the system has its own current directory. Specifying both 
  5336.  a drive and a directory in the CD command will change the current directory on 
  5337.  the specified drive, but will not change the default drive.  For example, to 
  5338.  change the default directory on drive A: 
  5339.  
  5340.           [c:\] cd a:\utility
  5341.           [c:\]
  5342.  
  5343.  Notice that this command does not change to drive A:.  Use the CDD command to 
  5344.  change the current drive and directory at the same time. 
  5345.  
  5346.  You can change to the parent directory with CD ..; you can also go up one 
  5347.  additional directory level with each additional [.]. For example, CD .... will 
  5348.  go up three levels in the directory tree (see Extended Parent Directory 
  5349.  Names).  You can move to a sibling directory -- one that branches from the 
  5350.  same parent directory as the current subdirectory -- with a command like CD 
  5351.  ..\newdir. 
  5352.  
  5353.  If you enter CD with no argument or with only a disk drive name, it will 
  5354.  display the current directory on the default or named drive. 
  5355.  
  5356.  CD saves the current directory before changing to a new directory. You can 
  5357.  switch back to the previous directory by entering CD -. (There must be a space 
  5358.  between the CD command and the hyphen.)  You can switch back and forth between 
  5359.  two directories by repeatedly entering CD -.  The saved directory is the same 
  5360.  for both the CD and CDD commands.  Drive changes and automatic directory 
  5361.  changes also modify the saved directory, so you can use CD - to return to a 
  5362.  directory that you exited with an automatic directory change. 
  5363.  
  5364.  Directory changes made with CD are recorded for display in the directory 
  5365.  history window. 
  5366.  
  5367.  CD never changes the default drive.  If you change directories on one drive, 
  5368.  switch to another drive, and then enter CD -, the directory will be restored 
  5369.  on the first drive but the current drive will not be changed. 
  5370.  
  5371.  If CD can't change directly to the specified directory, it will look for the 
  5372.  CDPATH variable; see CDPATH for details. 
  5373.  
  5374.  
  5375. ΓòÉΓòÉΓòÉ 14.8. CDD - Change the current drive and directory ΓòÉΓòÉΓòÉ
  5376.  
  5377.  Purpose:    Change the current disk drive and directory. 
  5378.  
  5379.  Format:     CDD path 
  5380.  
  5381.              path :  The name of the directory (or drive and directory) to 
  5382.              change to. 
  5383.  
  5384.  See also:  CD, MD, PUSHD, RD, and CDPATH. 
  5385.  
  5386.  Usage 
  5387.  
  5388.  CDD is similar to the CD command, except that it also changes the default disk 
  5389.  drive if one is specified.  CDD will change to the directory and drive you 
  5390.  name.  To change from the root directory on drive A to the subdirectory C:\WP: 
  5391.  
  5392.           [a:\] cdd c:\wp
  5393.           [c:\wp]
  5394.  
  5395.  You can change to the parent directory with CDD ..; you can also go up one 
  5396.  additional directory level with each additional [.].  For example, CDD .... 
  5397.  will go up three levels in the directory tree. 
  5398.  
  5399.  CDD saves the current drive and directory before changing to a new directory. 
  5400.  You can switch back to the previous drive and directory by entering CDD -. 
  5401.  (There must be a space between the CDD command and the hyphen.)  You can 
  5402.  switch back and forth between two drives and directories by repeatedly 
  5403.  entering CDD -.  The saved directory is the same for both the CD and CDD 
  5404.  commands.  Drive changes and automatic directory changes also modify the saved 
  5405.  directory, so you can use CDD - to return to a directory that you exited with 
  5406.  a drive change or an automatic directory change. 
  5407.  
  5408.  Directory changes made with CDD are recorded for display in the directory 
  5409.  history window. 
  5410.  
  5411.  If CDD can't change directly to the specified directory, it will look for the 
  5412.  CDPATH variable; see CDPATH for details. 
  5413.  
  5414.  
  5415. ΓòÉΓòÉΓòÉ 14.9. CHCP - Change the current code page ΓòÉΓòÉΓòÉ
  5416.  
  5417.  Purpose:    Display or change the current system code page. 
  5418.  
  5419.  Format:     CHCP [n ] 
  5420.  
  5421.              n :  A system code page number. 
  5422.  
  5423.  Usage 
  5424.  
  5425.  Code page switching allows you to select different character sets for language 
  5426.  support. 
  5427.  
  5428.  If you enter CHCP without a number, the current code page is displayed. 
  5429.  
  5430.           [c:\] chcp
  5431.           Active code page: 437
  5432.  
  5433.  If you enter CHCP plus a code page number, the system code page is changed. 
  5434.  For example, to set the code page to multilingual: 
  5435.  
  5436.           [c:\] chcp 850
  5437.  
  5438.  CHCP accepts one of the prepared system code pages.  An error message is 
  5439.  displayed if a code page is selected that has not been prepared for the 
  5440.  system. 
  5441.  
  5442.  See your OS/2 documentation for more information on CHCP. 
  5443.  
  5444.  
  5445. ΓòÉΓòÉΓòÉ 14.10. CLS - Clear the screen ΓòÉΓòÉΓòÉ
  5446.  
  5447.  Purpose:    Clear the video display and move the cursor to the upper left 
  5448.              corner; optionally change the default display and border colors. 
  5449.  
  5450.  Format:     CLS [[BRIght] [BLInk] fg ON [BRIght] bg ] [BORder bc ] 
  5451.  
  5452.              fg :  The new foreground color 
  5453.              bg :  The new background color 
  5454.              bc :  The new border color 
  5455.  
  5456.  Usage 
  5457.  
  5458.  CLS can be used to clear the screen without changing colors, or to clear the 
  5459.  screen and change the screen colors simultaneously. These three examples show 
  5460.  how to clear the screen to the default colors, to bright white letters on a 
  5461.  blue background, and to bright yellow letters on a magenta background with a 
  5462.  blue border: 
  5463.  
  5464.           [c:\] cls
  5465.           [c:\] cls bright white on blue
  5466.           [c:\] cls bri yel on mag bor blu
  5467.  
  5468.  CLS is often used in batch files to clear the screen before displaying text. 
  5469.  
  5470.  See Colors and Color Names for details about colors and notes on the use of 
  5471.  bright background colors. 
  5472.  
  5473.  
  5474. ΓòÉΓòÉΓòÉ 14.11. COLOR - Change the display colors ΓòÉΓòÉΓòÉ
  5475.  
  5476.  Purpose:    Change the default display colors. 
  5477.  
  5478.  Format:     COLOR [BRIght] [BLInk] fg ON [BRIght] bg [BORder bc ] 
  5479.  
  5480.              fg :  The new foreground color 
  5481.              bg :  The new background color 
  5482.              bc :  The new border color 
  5483.  
  5484.  See also:  CLS, and Colors and Color Names for details about using colors. 
  5485.  
  5486.  Usage 
  5487.  
  5488.  COLOR is normally used in batch files before displaying text. For example, to 
  5489.  set screen colors to bright white on blue, you can use this command: 
  5490.  
  5491.           [c:\] color bright white on blue
  5492.  
  5493.  
  5494. ΓòÉΓòÉΓòÉ 14.12. COPY - Copy files ΓòÉΓòÉΓòÉ
  5495.  
  5496.  Purpose:    Copy data between disks, directories, files, or physical hardware 
  5497.              devices (such as your printer or serial port). 
  5498.  
  5499.  Format:     COPY [/A:[[-]rhsda] /C /H /M /N /P /Q /R /S /T /U /V] source [+] 
  5500.              ... [/A /B] destination [/A /B] 
  5501.  
  5502.              source :  A file or list of files or a device to copy from. 
  5503.              destination :  A file, directory, or device to copy to. 
  5504.  
  5505.              /A(SCII)                        /P(rompt) 
  5506.              /A:(ttribute select)            /Q(uiet) 
  5507.              /B(inary)                       /R(eplace) 
  5508.              /C(hanged)                      /S(ubdirectories) 
  5509.              /H(idden)                       /T(otals) 
  5510.              /M(odified)                     /U(pdate) 
  5511.              /N(othing)                      /V(erify) 
  5512.  
  5513.  See also:  ATTRIB, MOVE, and REN. 
  5514.  
  5515.  File Selection 
  5516.  
  5517.  Supports extended wildcards, ranges, multiple file names, and include lists. 
  5518.  Date, time, or size ranges anywhere on the line apply to all source files. 
  5519.  
  5520.  Usage 
  5521.  
  5522.  The COPY command accepts all traditional syntax and options and adds several 
  5523.  new features. 
  5524.  
  5525.  The simplest use of COPY is to make a copy of a file, like this example which 
  5526.  makes a copy of a file called FILE1.ABC : 
  5527.  
  5528.           [c:\] copy file1.abc file2.def
  5529.  
  5530.  You can also copy a file to another drive and/or directory.  The following 
  5531.  command copies FILE1 to the \MYDIR directory on drive E: 
  5532.  
  5533.           [c:\] copy file1 e:\mydir
  5534.  
  5535.  You can copy several files at once by using wildcards: 
  5536.  
  5537.           [c:\] copy *.txt e:\mydir
  5538.  
  5539.  You can also list several source files in one command.  The following command 
  5540.  copies 3 files from the current directory to the \MYDIR directory on drive E: 
  5541.  
  5542.           [c:\] copy file1 file2 file3 e:\mydir
  5543.  
  5544.  The way COPY interprets your command line depends on how many arguments (file, 
  5545.  directory, or device names) are on the line, and whether the arguments are 
  5546.  separated with [+] signs or spaces. 
  5547.  
  5548.  If there is only one argument on the line, COPY assumes it is the source, and 
  5549.  uses the current drive and directory as the destination.  For example, the 
  5550.  following command copies all the .DAT files on drive A to the current 
  5551.  directory on drive C: 
  5552.  
  5553.           [c:\] copy a:*.dat
  5554.  
  5555.  If there are two or more arguments on the line and [+] signs are not used, 
  5556.  then COPY assumes that the last argument is the destination and copies all 
  5557.  source files to this new location.  If the destination is a drive, directory, 
  5558.  or device name then the source files are copied individually to the new 
  5559.  location.  If the destination is a file name, the first source file is copied 
  5560.  to the destination, and any additional source files are then appended to the 
  5561.  new destination file. 
  5562.  
  5563.  For example, the first of these commands copies the .DAT files from the 
  5564.  current directory on drive A individually to C:\MYDIR (which must already 
  5565.  exist as a directory); the second appends all the .DAT files together into one 
  5566.  large file called C:\DATA (assuming C:\DATA is not a directory): 
  5567.  
  5568.           [c:\] copy a:*.dat c:\mydir\
  5569.           [c:\] copy a:*.dat c:\data
  5570.  
  5571.  When you copy to a directory, if you add a backslash [\] to the end of the 
  5572.  name as shown in the first example above, COPY will display an error message 
  5573.  if the name does not refer to an existing directory.  You can use this feature 
  5574.  to keep COPY from treating a mistyped destination directory name as a file 
  5575.  name and attempting to append all your source files to a destination file, 
  5576.  when you really meant to copy them individually to a destination directory. 
  5577.  
  5578.  A plus [+] tells COPY to append two or more files to a single destination 
  5579.  file.  If you list several source files separated with [+] and don't specify a 
  5580.  destination, COPY will use the name of the first source file as the 
  5581.  destination, and append each subsequent file to the first file.  In this case 
  5582.  the destination file will always be created in the current directory, even if 
  5583.  the first source file is in another directory or on another drive. 
  5584.  
  5585.  For example, the following command will append the contents of C:\MEMO2 and 
  5586.  C:\MEMO3 to C:\MEMO1 and leave the combined contents in the file named 
  5587.  C:\MEMO1 : 
  5588.  
  5589.           [c:\] copy memo1+memo2+memo3
  5590.  
  5591.  To append the same three files but store the result in BIGMEMO: 
  5592.  
  5593.           [c:\] copy memo1+memo2+memo3 bigmemo
  5594.  
  5595.  To append C:\MEM\MEMO2 and C:\MEM\MEMO3 to D:\DATA\MEMO1, and leave the result 
  5596.  in C:\MEM\MEMO1 : 
  5597.  
  5598.           [c:\mem] copy d:\data\memo1+memo2+memo3
  5599.  
  5600.  You cannot append files to a device (such as a printer); if you try to do so, 
  5601.  COPY will ignore the [+] signs and copy the files individually.  If you 
  5602.  attempt to append several source files to a destination directory or disk, 
  5603.  COPY will append the files and place the copy in the new location with the 
  5604.  same name as the first source file. 
  5605.  
  5606.  If your destination has wildcards in it, COPY will attempt to match them with 
  5607.  the source names.  For example, this command copies the .DAT files from drive 
  5608.  A to C:\MYDIR and gives the new copies the extension .DX : 
  5609.  
  5610.           [c:\] copy a:*.dat c:\mydir\*.dx
  5611.  
  5612.  This feature can give you unexpected results if you use it with multiple 
  5613.  source file names.  For example, suppose that drive A contains XYZ.DAT and 
  5614.  XYZ.TXT.  The command 
  5615.  
  5616.           [c:\] copy a:\*.dat a:\*.txt c:\mydir\*.dx
  5617.  
  5618.  will copy A:XYZ.DAT to C:\MYDIR\XYZ.DX.  Then it will copy A:XYZ.TXT to 
  5619.  C:\MYDIR\XYZ.DX, overwriting the first file it copied. 
  5620.  
  5621.  COPY also understands include lists, so you can specify several different 
  5622.  kinds of files in the same command.  This command copies the .TXT, .DOC, and 
  5623.  .BAT files from the E:\MYDIR directory to the root directory of drive A: 
  5624.  
  5625.           [c:\] copy e:\mydir\*.txt;*.doc;*.bat a:\
  5626.  
  5627.  You can use date, time, and size ranges to further define the files that you 
  5628.  want to copy.  This example copies every file in the E:\MYDIR directory, which 
  5629.  was created or modified yesterday, and which is also 10,000 bytes or smaller 
  5630.  in size, to the root directory of drive A: 
  5631.  
  5632.           [c:\] copy /[d-1] /[s0,10000] e:\mydir\*.* a:\
  5633.  
  5634.  COPY maintains the hidden and system attributes of files, but not the 
  5635.  read-only attribute.  The destination file will always have the archive 
  5636.  attribute set. 
  5637.  
  5638.  Options 
  5639.  
  5640.  The /A(SCII) and /B(inary) options apply to the preceding filename and to all 
  5641.  subsequent filenames on the command line until the file name preceding the 
  5642.  next /A or /B, if any.  The other options (/A:, /C, /H, /M, /N, /P, /Q, /R, 
  5643.  /S, /T, /U, /V) apply to all filenames on the command line, no matter where 
  5644.  you put them.  For example, either of the following commands could be used to 
  5645.  copy a font file to the printer in binary mode: 
  5646.  
  5647.           [c:\] copy /b myfont.dat prn
  5648.           [c:\] copy myfont.dat /b prn
  5649.  
  5650.  Some options do not make sense in certain contexts, in which case COPY will 
  5651.  ignore them.  For example, you cannot prompt before replacing an existing file 
  5652.  when the destination is a device such as the printer -- there's no such thing 
  5653.  as an "existing file" on the printer.  If you use conflicting output options, 
  5654.  like /Q and /P, COPY will take a "conservative" approach and give priority to 
  5655.  the option which generates more prompts or more information. 
  5656.  
  5657.     /A:     (ASCII) If you use /A with a source filename, the file will be 
  5658.             copied up to, but not including, the first Ctrl-Z (Control-Z or 
  5659.             ASCII 26) character in the file.  If you use /A with a destination 
  5660.             filename, a Ctrl-Z will be added to the end of the file (some 
  5661.             application programs use the Ctrl-Z to mark the end of a file).  /A 
  5662.             is the default when appending files, or when the destination is a 
  5663.             device like NUL or PRN, rather than a disk file. 
  5664.  
  5665.     /A:     (Attribute select) Select only those files that have the specified 
  5666.             attribute(s) set.  Preceding the attribute character with a hyphen 
  5667.             [-] will select files that do not have that attribute set.  The 
  5668.             attributes are: 
  5669.  
  5670.                  R  Read-only 
  5671.                  H  Hidden 
  5672.                  S  System 
  5673.                  D  Subdirectory 
  5674.                  A  Archive 
  5675.  
  5676.             If no attributes are listed at all (e.g., COPY /A: ...), COPY will 
  5677.             select all files and subdirectories including hidden and system 
  5678.             files.  If attributes are combined, all the specified attributes 
  5679.             must match for a file to be selected. For example, /A:RHS will 
  5680.             select only those files with all three attributes set.  You must 
  5681.             include the colon with this option to distinguish it from the 
  5682.             /A(SCII) switch, above. 
  5683.  
  5684.     /B:     (Binary) If you use /B with a source filename, the entire file is 
  5685.             copied; Ctrl-Z characters in the file do not affect the copy 
  5686.             operation.  Using /B with a destination filename prevents addition 
  5687.             of a Ctrl-Z to the end of the destination file. /B is the default 
  5688.             for normal file copies. 
  5689.  
  5690.     /C:     (Changed files) Copy files only if the destination file exists and 
  5691.             is older than the source (see also /U).  This option is useful for 
  5692.             updating the files in one directory from those in another without 
  5693.             copying any newly created files. 
  5694.  
  5695.     /H:     (Hidden) Copy all matching files including those with the hidden 
  5696.             and/or system attribute set. 
  5697.  
  5698.     /M:     (Modified) Copy only those files with the archive attribute set, 
  5699.             i.e., those which have been modified since the last backup.  The 
  5700.             archive attribute will not be cleared after copying; to clear it 
  5701.             use ATTRIB. 
  5702.  
  5703.     /N:     (Nothing) Do everything except actually perform the copy. This 
  5704.             option is useful for testing what the result of a complex COPY 
  5705.             command will be. 
  5706.  
  5707.     /P:     (Prompt) Ask the user to confirm each source file.  Your options at 
  5708.             the prompt are explained in detail under Page and File Prompts. 
  5709.  
  5710.     /Q:     (Quiet) Don't display filenames or the total number of files 
  5711.             copied.  This option is most often used in batch files.  See also 
  5712.             /T. 
  5713.  
  5714.     /R:     (Replace) Prompt the user before overwriting an existing file. 
  5715.             Your options at the prompt are explained in detail under Page and 
  5716.             File Prompts. 
  5717.  
  5718.     /S:     (Subdirectories) Copy the subdirectory tree starting with the files 
  5719.             in the source directory plus each subdirectory below that.  The 
  5720.             destination must be a directory; if it doesn't exist, COPY will 
  5721.             attempt to create it.  COPY will also attempt to create needed 
  5722.             subdirectories on the tree below the destination, including empty 
  5723.             source directories.  If you attempt to use COPY /S to copy a 
  5724.             subdirectory tree into part of itself, COPY will display an error 
  5725.             message and exit. 
  5726.  
  5727.     /T:     (Totals) Turns off  the display of filenames, like /Q, but does 
  5728.             display the total number of files copied. 
  5729.  
  5730.     /U:     (Update) Copy each source file only if it is newer than a matching 
  5731.             destination file or if a matching destination file does not exist 
  5732.             (see also /C).  This option is useful for keeping one directory 
  5733.             matched with another with a minimum of copying. 
  5734.  
  5735.     /V:     (Verify) Verify each disk write.  This is the same as executing the 
  5736.             VERIFY ON command, but is only active during the COPY.  /V does not 
  5737.             read back the file and compare its contents with what was written; 
  5738.             it only verifies that the data written to disk is physically 
  5739.             readable. 
  5740.  
  5741.  
  5742. ΓòÉΓòÉΓòÉ 14.13. DATE - Change the system date ΓòÉΓòÉΓòÉ
  5743.  
  5744.  Purpose:    Display and optionally change the system date. 
  5745.  
  5746.  Format:     DATE [mm -dd -yy ] 
  5747.  
  5748.              mm :  The month (1 - 12). 
  5749.              dd :  The day (1 - 31). 
  5750.              yy :  The year (80 - 99 = 1980 - 1999, or a 4- digit year). 
  5751.  
  5752.  See also:  TIME. 
  5753.  
  5754.  Usage 
  5755.  
  5756.  If you simply type DATE without any parameters, you will see the current 
  5757.  system date and time, and be prompted for a new date. Press ENTER if you don't 
  5758.  wish to change the date.  If you type a new date, it will become the current 
  5759.  system date, which is included in the directory entry for each file as it is 
  5760.  created or altered: 
  5761.  
  5762.           [c:\] date
  5763.           Thu  Dec 22, 1994  9:30:06
  5764.           Enter new date (mm-dd-yy):
  5765.  
  5766.  You can also enter a new system date by typing the DATE command plus the new 
  5767.  date on the command line: 
  5768.  
  5769.           [c:\] date 3-16-95
  5770.  
  5771.  You can use hyphens, slashes, or periods to separate the month, day, and year 
  5772.  entries.  A full 4-digit year can be entered if you wish. 
  5773.  
  5774.  DATE adjusts the format it expects depending on your country settings.  When 
  5775.  entering the date, use the correct format for the country setting currently in 
  5776.  effect on your system. 
  5777.  
  5778.  
  5779. ΓòÉΓòÉΓòÉ 14.14. DEL - Delete one or more files ΓòÉΓòÉΓòÉ
  5780.  
  5781.  Purpose:    Erase one file, a group of files, or entire subdirectories. 
  5782.  
  5783.  Format:     DEL [/A:[[-]rhsda] /F /N /P /Q /S /T /X /Y /Z] file... 
  5784.                 or 
  5785.              ERASE [/A:[[-]rhsda] /F /N /P /Q /S /T /X /Y /Z] file... 
  5786.  
  5787.              file :  The file, subdirectory, or list of files or subdirectories 
  5788.              to erase. 
  5789.  
  5790.              /A:(ttribute select)            /S(ubdirectories) 
  5791.              /F(orce delete)                 /T(otal) 
  5792.              /N(othing)                      /X (remove empty subdirectories) 
  5793.              /P(rompt)                       /Y(es to all prompts) 
  5794.              /Q(uiet)                        /Z(ap hidden and read-only files) 
  5795.  
  5796.  File Selection 
  5797.  
  5798.  Supports extended wildcards, ranges, multiple file names, and include lists. 
  5799.  
  5800.  Usage 
  5801.  
  5802.  DEL and ERASE are synonyms, you can use either one. 
  5803.  
  5804.  Use the DEL and ERASE commands with caution; the files and subdirectories that 
  5805.  you erase may be impossible to recover without specialized utilities and a lot 
  5806.  of work. 
  5807.  
  5808.  To erase a single file, simply enter the file name: 
  5809.  
  5810.           [c:\] del letters.txt
  5811.  
  5812.  You can also erase multiple files in a single command.  For example, to erase 
  5813.  all the files in the current directory with a .BAK or .PRN extension: 
  5814.  
  5815.           [c:\] del *.bak *.prn
  5816.  
  5817.  If you enter a subdirectory name, or a filename composed only of wildcards (* 
  5818.  and/or ?), DEL asks for confirmation (Y or N) unless you specified the /Y 
  5819.  option.  If you respond with a Y, DEL will delete all the files in that 
  5820.  subdirectory (hidden, system, and read-only files are only deleted if you use 
  5821.  the /Z option). 
  5822.  
  5823.  DEL displays the amount of disk space recovered, unless the /Q option is used 
  5824.  (see below).  It does so by comparing the amount of free disk space before and 
  5825.  after the DEL command is executed.  This amount may be incorrect if you are 
  5826.  using a deletion tracking system which stores deleted files in a hidden 
  5827.  directory, or if, under a multitasking system, another program performs a file 
  5828.  operation while the DEL command is executing. 
  5829.  
  5830.  Remember that DEL removes file descriptions along with files.  Most deletion 
  5831.  tracking systems will not be able to save or recover a file's description, 
  5832.  even if they can save or recover the data in a file. 
  5833.  
  5834.  DEL returns a non-zero exit code if no files are deleted, or if another error 
  5835.  occurs.  You can test this exit code with the %_? environment variable, and 
  5836.  use it with conditional commands)(&& and ||). 
  5837.  
  5838.  Options 
  5839.  
  5840.     /A:     (Attribute select) Select only those files that have the specified 
  5841.             attribute(s) set.  Preceding the attribute character with a hyphen 
  5842.             [-] will select files that do not have that attribute set.  The 
  5843.             attributes are: 
  5844.  
  5845.                  R  Read-only 
  5846.                  H  Hidden 
  5847.                  S  System 
  5848.                  D  Subdirectory 
  5849.                  A  Archive 
  5850.  
  5851.             If no attributes are listed at all (e.g., DEL /A: ...), DEL will 
  5852.             select all files and subdirectories including hidden and system 
  5853.             files.  If attributes are combined, all the specified attributes 
  5854.             must match for a file to be selected. For example, /A:RHS will 
  5855.             select only those files with all three attributes set. 
  5856.  
  5857.     /F:     (Force delete) This option is only available in the 32-bit version 
  5858.             of 4OS2.  It forces deletion of the file without saving it to the 
  5859.             DELDIR directory (if DELDIR is not in use, /F has no effect). 
  5860.  
  5861.     /N:     (Nothing) Do everything except actually delete the file(s).  This 
  5862.             is useful for testing what the result of a DEL would be. 
  5863.  
  5864.     /P:     (Prompt) Prompt the user to confirm each erasure.  Your options at 
  5865.             the prompt are explained in detail under Page and File Prompts. 
  5866.  
  5867.     /Q:     (Quiet) Don't display filenames as they are deleted, or the number 
  5868.             of files deleted or bytes freed.  See also /T. 
  5869.  
  5870.     /S:     (Subdirectories) Delete the specified files in this directory and 
  5871.             all of its subdirectories.  This is like a GLOBAL DEL, and can be 
  5872.             used to delete all the files in a subdirectory tree or even a whole 
  5873.             disk.  It should be used with caution! 
  5874.  
  5875.     /T:     (Total) Don't display filenames as they are deleted, but display 
  5876.             the total number of files deleted plus the amount of free disk 
  5877.             space recovered.  Unlike /Q, the /T option will not speed up 
  5878.             deletions under DOS. 
  5879.  
  5880.     /X:     (Remove empty subdirectories) Remove empty subdirectories after 
  5881.             deleting (only useful when used with /S). 
  5882.  
  5883.     /Y:     (Yes) The reverse of /P -- it assumes a Y response to everything, 
  5884.             including deleting an entire subdirectory tree.  4OS2 normally 
  5885.             prompts before deleting files when the name consists only of 
  5886.             wildcards or a subdirectory name (see above); /Y overrides this 
  5887.             protection, and should be used with extreme caution! 
  5888.  
  5889.     /Z:     (Zap) Delete read-only, hidden, and system files as well as normal 
  5890.             files.  Files with the read-only, hidden, or system attribute set 
  5891.             are normally protected from deletion; /Z overrides this protection, 
  5892.             and should be used with caution.  Because EXCEPT works by hiding 
  5893.             files, /Z will override an EXCEPT command. 
  5894.  
  5895.             For example, to delete the entire subdirectory tree starting with 
  5896.             C:\UTIL, including hidden and read- only files, without prompting 
  5897.             (use this command with CAUTION!): 
  5898.  
  5899.                                 [c:\] del /sxyz c:\util\
  5900.  
  5901.  
  5902. ΓòÉΓòÉΓòÉ 14.15. DELAY - Pause for a specified length of time ΓòÉΓòÉΓòÉ
  5903.  
  5904.  Purpose:    Pause for a specified length of time. 
  5905.  
  5906.  Format:     DELAY [seconds ] 
  5907.  
  5908.              seconds :  The number of seconds to delay. 
  5909.  
  5910.  Usage 
  5911.  
  5912.  DELAY is useful in batch file loops while waiting for something to occur.  To 
  5913.  wait for 10 seconds: 
  5914.  
  5915.           delay 10
  5916.  
  5917.  A simple loop could make a tone with the BEEP command to get the operator's 
  5918.  attention and then DELAY for a few seconds while waiting for the user to 
  5919.  respond. 
  5920.  
  5921.  For delays shorter than one second, use the BEEP command with an inaudible 
  5922.  frequency (below 20 Hz). 
  5923.  
  5924.  You can cancel a delay by pressing Ctrl-C or Ctrl-Break. 
  5925.  
  5926.  
  5927. ΓòÉΓòÉΓòÉ 14.16. DESCRIBE - Create or modify file descriptions ΓòÉΓòÉΓòÉ
  5928.  
  5929.  Purpose:    Create, modify, or delete file and subdirectory descriptions. 
  5930.  
  5931.  Format:     DESCRIBE [/A:[[-]rhsda]] file ["description" ] ... 
  5932.  
  5933.  /A:(ttribute select) 
  5934.  
  5935.              file :  The file or files to operate on. 
  5936.              "description" :  The description to attach to the file. 
  5937.  
  5938.  File Selection 
  5939.  
  5940.  Supports extended wildcards, ranges, multiple file names, and include lists. 
  5941.  
  5942.  Usage 
  5943.  
  5944.  DESCRIBE adds descriptions to files and subdirectories.  The descriptions are 
  5945.  displayed by DIR in single-column mode and by SELECT.  Descriptions let you 
  5946.  identify your files in much more meaningful ways than you can in an 
  5947.  eight-character filename. 
  5948.  
  5949.  You enter a description on the command line by typing the DESCRIBE command, 
  5950.  the filename, and the description in quotation marks, like this: 
  5951.  
  5952.           [c:\] describe memo.txt "Memo to Bob about party"
  5953.  
  5954.  If you don't put a description on the command line, DESCRIBE will prompt you 
  5955.  for it: 
  5956.  
  5957.           [c:\] describe memo.txt
  5958.           Describe "memo.txt" : Memo to Bob about party
  5959.  
  5960.  If you use wildcards or multiple filenames with the DESCRIBE command and don't 
  5961.  include the description text, you will be prompted to enter a description for 
  5962.  each file.  If you do include the description on the command line, all 
  5963.  matching files will be given the same description. 
  5964.  
  5965.  Each description can be up to 40 characters long.  You can change this limit 
  5966.  with the DescriptionMax directive in 4OS2.INI.  DESCRIBE can edit descriptions 
  5967.  longer than DescriptionMax (up to a limit of 511 characters), but will not 
  5968.  allow you to lengthen the existing text. 
  5969.  
  5970.  The descriptions are stored in each directory in a hidden file called 
  5971.  DESCRIPT.ION.  Use the ATTRIB command to remove the hidden attribute from this 
  5972.  file if you need to copy or delete it.  DESCRIPT.ION is always created as a 
  5973.  hidden file, but will not be re-hidden by 4OS2 if you remove the hidden 
  5974.  attribute.  You can change the description file name with the DescriptionName 
  5975.  directive in 4OS2.INI, and retrieve it with the _DName internal variable. 
  5976.  
  5977.  The description file is modified appropriately whenever you perform an 
  5978.  internal command which affects it (such as COPY, MOVE, DEL, or RENAME), but 
  5979.  not if you use an external program (such as XCOPY or a visual shell). 
  5980.  
  5981.  On HPFS drives, you will not see file descriptions in a normal DIR display, 
  5982.  because DIR must leave space for the long filenames used on these drives.  To 
  5983.  view the descriptions, use DIR /Z to display the directory in FAT format.  See 
  5984.  the DIR command for more details. 
  5985.  
  5986.  Options 
  5987.  
  5988.     /A:     (Attribute select) Select only those files that have the specified 
  5989.             attribute(s) set.  Preceding the attribute character with a hyphen 
  5990.             [-] will select files that do not have that attribute set.  The 
  5991.             attributes are: 
  5992.  
  5993.                  R  Read-only 
  5994.                  H  Hidden 
  5995.                  S  System 
  5996.                  D  Subdirectory 
  5997.                  A  Archive 
  5998.  
  5999.             If no attributes are listed at all (e.g., DESCRIBE /A: ...), 
  6000.             DESCRIBE will select all files and subdirectories including hidden 
  6001.             and system files.  If attributes are combined, all the specified 
  6002.             attributes must match for a file to be selected. For example, 
  6003.             /A:RHS will select only those files with all three attributes set. 
  6004.  
  6005.  
  6006. ΓòÉΓòÉΓòÉ 14.17. DETACH - Start a program in detached mode ΓòÉΓòÉΓòÉ
  6007.  
  6008.  Purpose:    Start an OS/2 program in detached mode. 
  6009.  
  6010.  Format:     DETACH command 
  6011.  
  6012.              command :  The name of a command to execute, including an optional 
  6013.              drive and path specification. 
  6014.  
  6015.  See also:  START. 
  6016.  
  6017.  Usage 
  6018.  
  6019.  When you start a program with DETACH, that program cannot use the keyboard, 
  6020.  mouse, or video display.  It is "detached" from the normal means of user input 
  6021.  and output.  However, you can redirect the program's standard I/O to other 
  6022.  devices if necessary, using redirection symbols. 
  6023.  
  6024.  The command can be an internal command, external command, alias, or batch 
  6025.  file.  If it is not an external command, 4OS2 will detach a copy of itself to 
  6026.  execute the command. 
  6027.  
  6028.  For example, the following command will detach a copy of 4OS2 to run the batch 
  6029.  file XYZ.BTM : 
  6030.  
  6031.           [c:\] detach xyz.btm
  6032.  
  6033.  Once the program has started, 4OS2 returns to the prompt immediately.  It does 
  6034.  not wait for a detached program to finish. 
  6035.  
  6036.  
  6037. ΓòÉΓòÉΓòÉ 14.18. DIR - Display directories ΓòÉΓòÉΓòÉ
  6038.  
  6039.  Purpose:    Display information about files and subdirectories. 
  6040.  
  6041.  Format:     DIR [/1 /2 /4 /A[[:][-]rhsda] /B /D /E /F /H /I"text" /J /K /L /M 
  6042.              /N /O[[:][-]adeginrsu] /P /R /S /T[:acw] /U /V /W /Z] [file...] 
  6043.  
  6044.              file :  The file, directory, or list of files or directories to 
  6045.              display. 
  6046.  
  6047.              /1 (one column)                 /L(ower case) 
  6048.              /2 (two columns)                /M (suppress footer) 
  6049.              /4 (four columns)               /N(ew format) 
  6050.              /A(ttribute select)             /O(rder) 
  6051.              /B(are)                         /P(ause) 
  6052.              /D(isable color coding)         /R (disable wRap) 
  6053.              /E (use upper case)             /S(ubdirectories) 
  6054.              /F(ull path)                    /T (aTtribute) or (Time) 
  6055.              /H(ide dots)                    /U (sUmmary information) 
  6056.              /I (match descriptions)         /V(ertical sort) 
  6057.              /J(ustify names)                /W(ide) 
  6058.              /K (suppress header)            /Z (use FAT format) 
  6059.  
  6060.  See also:  ATTRIB, DESCRIBE, SELECT, and SETDOS. 
  6061.  
  6062.  File Selection 
  6063.  
  6064.  Supports extended wildcards, ranges, multiple file names, and include lists. 
  6065.  
  6066.  Usage 
  6067.  
  6068.  DIR can be used to display information about files from one or more of your 
  6069.  disk directories, in a wide range of formats.  Depending on the options 
  6070.  chosen, you can display the file name, attributes, and size; the time and date 
  6071.  of the last change to the file; the file description; and the file's 
  6072.  compression ratio.  You can also display information in 1, 2, 4, or 5 columns, 
  6073.  sort the files several different ways, use color to distinguish file types, 
  6074.  and pause after each full screen. 
  6075.  
  6076.  The various DIR displays are controlled through options or switches.  The best 
  6077.  way to learn how to use the many options available with the DIR command is to 
  6078.  experiment.  You will soon know which options you want to use regularly.  You 
  6079.  can select those options permanently by using the ALIAS command. 
  6080.  
  6081.  You may want to mix several options.  For example, to display all the files in 
  6082.  the current directory, in 2 columns, sorted vertically (down one column then 
  6083.  down the next), and with a pause at the end of each page: 
  6084.  
  6085.           [c:\] dir /2/p/v
  6086.  
  6087.  To set up this format as the default, using an alias: 
  6088.  
  6089.           [c:\] alias dir=*dir /2/p/v
  6090.  
  6091.  This example displays all the files on all directories of drive C, including 
  6092.  hidden and system files, pausing after each page: 
  6093.  
  6094.           [c:\] dir /s/a/p c:\
  6095.  
  6096.  DIR allows wildcard characters (* and ?) in the filename.  If you don't 
  6097.  specify a filename, DIR defaults to *.* (display all non- hidden files and 
  6098.  subdirectories in the current directory).  To display all of the .WKS files in 
  6099.  the current directory: 
  6100.  
  6101.           [c:\] dir *.wks
  6102.  
  6103.  With the /I option, DIR can select files to display based on their 
  6104.  descriptions.  DIR will display a file if its description matches the text 
  6105.  after the /I switch.  The search is not case sensitive.  You can use wildcards 
  6106.  and extended wildcards as part of the text.  For example, to display any file 
  6107.  described as a " Test File" you can use this command: 
  6108.  
  6109.           [c:\] dir /i"test file"
  6110.  
  6111.  If you want to display files that include the words "test file" anywhere in 
  6112.  their descriptions, use extended wild cards like this: 
  6113.  
  6114.           [c:\] dir /i"*test file*"
  6115.  
  6116.  If you link two or more filenames together with spaces, DIR will display all 
  6117.  of the files that match the first name and then all of the files that match 
  6118.  the second name.  You may use a different drive and path for each filename. 
  6119.  This example lists all of the .WKS and then all of the .WK1 files in the 
  6120.  current directory: 
  6121.  
  6122.           [c:\] dir *.wks *.wk1
  6123.  
  6124.  If you use an include list to link multiple filenames, DIR will display the 
  6125.  matching filenames in a single listing.  Only the first filename in an include 
  6126.  list can have a path; the other files must be in the same path.  This example 
  6127.  displays the same files as the previous example, but the .WKS and .WK1 files 
  6128.  are intermixed: 
  6129.  
  6130.           [c:\] dir *.wks;*.wk1
  6131.  
  6132.  You can display the file and subdirectory names in color by setting the 
  6133.  COLORDIR environment variable or using the ColorDir directive in your .INI 
  6134.  file.  See Color-Coded Directories for details. 
  6135.  
  6136.  If you are using color-coded directories and attempt to redirect the output of 
  6137.  DIR to a character device, such as a serial port or the printer, 
  6138.  non-color-coded file names will be displayed on the device but color-coded 
  6139.  names may still be displayed on the screen. This will not occur if the output 
  6140.  of DIR is redirected to a disk file.  To prevent this problem, use the /D 
  6141.  switch to disable color coding when redirecting the output of DIR to a 
  6142.  character device. 
  6143.  
  6144.  By default, 4OS2 will display filenames in lower case on FAT drives, and in 
  6145.  the case in which the filenames are stored on HPFS drives (HPFS drives support 
  6146.  upper-case, lower-case, and mixed-case filenames).  You can override these 
  6147.  defaults and force filenames to display in upper case with /E, or in lower 
  6148.  case with /L. 
  6149.  
  6150.  On HPFS drives, DIR will format the display in HPFS format, with file names on 
  6151.  the right (to leave space for long names).  In this format file descriptions 
  6152.  are not displayed.  To display file descriptions on HPFS drives, use the /Z 
  6153.  switch to force the display into the standard FAT format. 
  6154.  
  6155.  When displaying file descriptions, DIR will wrap long lines to fit on the 
  6156.  screen.  DIR displays a maximum of 40 characters of text in each line of a 
  6157.  description, unless your screen width allows a wider display.  If you disable 
  6158.  description wrapping with the /R switch, the description is truncated at the 
  6159.  right edge of the screen, and a right arrow is added at the end of the line to 
  6160.  alert you to the existence of additional description text. 
  6161.  
  6162.  If you attempt to redirect the output of DIR to a character device, such as a 
  6163.  serial port or the printer, long descriptions will be wrapped at the screen 
  6164.  width in the redirected output.  If this is not what you want, use /R to 
  6165.  disable wrapping. 
  6166.  
  6167.  When sorting file names and extensions, 4OS2 normally assumes that sequences 
  6168.  of digits should be sorted numerically (for example, the file DRAW2 would come 
  6169.  before DRAW03 because 2 is numerically smaller than 03), rather than strictly 
  6170.  alphabetically (where DRAW2 would come second because "2" is after "0" in 
  6171.  alphanumeric order). You can defeat this behavior and force a strict 
  6172.  alphabetic sort with the /O:a option. 
  6173.  
  6174.  If you have selected a specific country code for your system, DIR will display 
  6175.  the date in the format for that country.  The default date format is U.S. 
  6176.  (mm-dd-yy).  The separator character in the file time will also be affected by 
  6177.  the country code. 
  6178.  
  6179.  DIR can handle directories of any size, limited only by available memory. 
  6180.  Memory requirements for DIR are generally not a concern under 4OS2, because of 
  6181.  the virtual memory available under these operating systems. 
  6182.  
  6183.  Options on the command line apply only to the filenames which follow the 
  6184.  option, and options at the end of the line apply to the preceding filename 
  6185.  only.  This allows you to specify different options for different groups of 
  6186.  files, yet retains compatibility with the traditional DIR command when a 
  6187.  single filename is specified. 
  6188.  
  6189.  Options 
  6190.  
  6191.     /1:     Single column display -- display the filename, size, date, time, 
  6192.             and description.  This is the default. If /T is used the attributes 
  6193.             are displayed instead of the description; if /C or /O:c is used the 
  6194.             compression ratio is displayed instead of the description. 
  6195.  
  6196.     /2:     Two column display -- display the filename, size, date, and time. 
  6197.             If you use /2 (or /4) on an HPFS drive, DIR will only display the 
  6198.             file names.  Also, the number of columns may be reduced to one for 
  6199.             names too long to fit on half the screen.  Due to these 
  6200.             restrictions, /2 is normally most useful on HPFS drives when used 
  6201.             with /Z to force the display to FAT format. 
  6202.  
  6203.     /4:     Four column display -- display the filename and size, in K 
  6204.             (kilobytes) or M (megabytes).  The note under /2 above regarding 
  6205.             HPFS drives applies to /4 as well. 
  6206.  
  6207.     /A:     (Attribute select)  Display only those files that have the 
  6208.             specified attribute(s) set.  Preceding the attribute character with 
  6209.             a hyphen [-] will display files that do not have that attribute 
  6210.             set.  The attributes are: 
  6211.  
  6212.               R  Read-only 
  6213.               H  Hidden 
  6214.               S  System 
  6215.               D  Subdirectory 
  6216.               A  Archive 
  6217.  
  6218.             If no attributes are listed at all (e.g., DIR /A ...), DIR will 
  6219.             display all files and subdirectories including hidden and system 
  6220.             files.  If attributes are combined, all the specified attributes 
  6221.             must match for a file to be included in the listing.  For example, 
  6222.             /A:RHS will display only those files with all three attributes set. 
  6223.  
  6224.     /B:     (Bare)  Suppress the header and summary lines, and display file or 
  6225.             subdirectory names only, in a single column. This option is most 
  6226.             useful when you want to redirect a list of names to a file or 
  6227.             another program.  If you use /B with /S, DIR will show the full 
  6228.             path of each file instead of simply its name and extension. 
  6229.  
  6230.     /D:     (Disable color coding)  Temporarily disable directory color coding. 
  6231.             May be required when color-coded directories are used and DIR 
  6232.             output is redirected to a character device like the printer (e.g., 
  6233.             PRN or LPT1) or serial port (e.g., COM1 or COM2).  /D is not 
  6234.             required when DIR output is redirected to a file. 
  6235.  
  6236.     /E:     Display filenames in the traditional upper case; also see SETDOS /U 
  6237.             and the UpperCase directive in 4OS2.INI. 
  6238.  
  6239.     /F:     (Full path)  Display each filename with its drive letter and path 
  6240.             in a single column, without other information. 
  6241.  
  6242.     /H:     (Hide dots)  Suppress the display of the "." and ".." directories. 
  6243.  
  6244.     /I:     Display filenames by matching text in their descriptions.  The text 
  6245.             can include wild cards and extended wildcards.  The search text 
  6246.             must be enclosed in quotation marks.  /I may be used to select 
  6247.             files even if descriptions are not displayed (for example, if /2 is 
  6248.             used).  However, /I will be ignored if /C or /O:c is used. 
  6249.  
  6250.     /J:     (Justify names)  Justify (align) filename extensions and display 
  6251.             them in the traditional format. 
  6252.  
  6253.     /K:     Suppress the header (disk and directory name) display. 
  6254.  
  6255.     /L:     (Lower case)  Display file and directory names in lower case; also 
  6256.             see SETDOS /U and the UpperCase directive in 4OS2.INI. 
  6257.  
  6258.     /M:     Suppress the footer (file and byte count totals) display. 
  6259.  
  6260.     /N:     Use the HPFS display format, even if the files are stored on a FAT 
  6261.             file system volume. 
  6262.  
  6263.     /O:     (Order) Set the sorting order.  You may use any combination of the 
  6264.             following sorting options; if multiple options are used, the 
  6265.             listing will be sorted with the first sort option as the primary 
  6266.             key, the next as the secondary key, and so on: 
  6267.  
  6268.               -  Reverse the sort order for the next option 
  6269.               a  Sort in ASCII order, not numerically, when there are digits in 
  6270.             the name 
  6271.               d  Sort by date and time (oldest first); for HPFS drives also see 
  6272.             /T 
  6273.               e  Sort by extension 
  6274.               g  Group subdirectories first, then files 
  6275.               i  Sort by file description (ignored if /C or /O:c is used) 
  6276.               n  Sort by filename (this is the default) 
  6277.               r  Reverse the sort order for all options 
  6278.               s  Sort by size 
  6279.               u  Unsorted 
  6280.  
  6281.     /P:     (Pause)  Wait for a key to be pressed after each screen page before 
  6282.             continuing the display.  Your options at the prompt are explained 
  6283.             in detail under Page and File Prompts. 
  6284.  
  6285.     /R      (disable wRap)  Forces long descriptions to be displayed on a 
  6286.             single line, rather than wrapped onto two or more lines.  Use /R 
  6287.             when output is redirected to a character device, such as a serial 
  6288.             port or the printer; or when you want descriptions truncated, 
  6289.             rather than wrapped, in the on-screen display. 
  6290.  
  6291.     /S:     (Subdirectories)  Display file information from the current 
  6292.             directory and all of its subdirectories.  DIR will only display 
  6293.             headers and summaries for those directories which contain files 
  6294.             that match the filename(s) and attributes (if /A is used) that you 
  6295.             specify on the command line. 
  6296.  
  6297.     /T      (aTtribute display)  Display the filenames and attributes. /T is 
  6298.             ignored if /C or /O:c is also used.  The attributes are displayed 
  6299.             in the format RHSA, with the following meanings: 
  6300.  
  6301.               R  Read-only 
  6302.               H  Hidden 
  6303.               S  System 
  6304.               A  Archive 
  6305.             If you wish to add another option after /T, you must start the next 
  6306.             option with a forward slash.  If you don't, 4OS2 will interpret the 
  6307.             /T as the time display switch and the following character as a 
  6308.             valid or invalid time selector  For example: 
  6309.  
  6310.                                         [c:\] dir /tz             incorrect, will display error
  6311.                                         [c:\] dir /t/z            correct
  6312.  
  6313.  
  6314.     /T:acw  (Time display)  Specify which of the date and time fields on an 
  6315.             HPFS drive should be displayed and used for sorting: 
  6316.  
  6317.               a  Last access time 
  6318.               c  Creation time 
  6319.               w  Last write time (default) 
  6320.  
  6321.     /U      (sUmmary information)  Only display the number of files, the total 
  6322.             file size, and the total amount of disk space used. 
  6323.  
  6324.     /V:     (Vertical sort)  Display the filenames sorted vertically rather 
  6325.             than horizontally (use with the /2, /4 or /W options). 
  6326.  
  6327.     /W:     (Wide)  Display filenames only, horizontally across the screen (5 
  6328.             columns on an 80-character wide display). 
  6329.  
  6330.     /Z:     Display an HPFS directory in FAT format.  Long names will be 
  6331.             truncated to 12 characters.  If the name is longer than 12 
  6332.             characters, it will be followed by a right arrow to show that one 
  6333.             or more characters have been truncated. 
  6334.  
  6335.  
  6336. ΓòÉΓòÉΓòÉ 14.19. DIRS - Display the directory stack ΓòÉΓòÉΓòÉ
  6337.  
  6338.  Purpose:    Display the current directory stack. 
  6339.  
  6340.  Format:     DIRS 
  6341.  
  6342.  See also:  PUSHD and POPD. 
  6343.  
  6344.  Usage 
  6345.  
  6346.  The PUSHD command adds the current default drive and directory to the 
  6347.  directory stack, a list that 4OS2 maintains in memory.  The POPD command 
  6348.  removes the top entry of the directory stack and makes that drive and 
  6349.  directory the new default.  The DIRS command displays the contents of the 
  6350.  directory stack, with the most recent entries on top (i.e., the next POPD will 
  6351.  retrieve the first entry that DIRS displays). 
  6352.  
  6353.  The directory stack holds 255 characters, enough for 10 to 20 typical drive 
  6354.  and directory entries. 
  6355.  
  6356.  
  6357. ΓòÉΓòÉΓòÉ 14.20. DO - Create loops in batch files ΓòÉΓòÉΓòÉ
  6358.  
  6359.  Purpose:    Create loops in batch files. 
  6360.  
  6361.  Format:     DO [n | FOREVER] 
  6362.                 or 
  6363.              DO varname = start TO end [BY n ] 
  6364.                 or 
  6365.              DO [WHILE | UNTIL] condition 
  6366.                 ... 
  6367.              [ITERATE] 
  6368.              [LEAVE] 
  6369.                 ... 
  6370.              ENDDO 
  6371.  
  6372.              n, start, end :  An integer between 0 and 2,147,483,647 inclusive, 
  6373.              or an internal variable or variable function that evaluates to 
  6374.              such a value. 
  6375.              varname :  The environment variable that will hold the loop 
  6376.              counter. 
  6377.              condition :  A test to determine if the loop should be executed. 
  6378.  
  6379.  Usage 
  6380.  
  6381.  DO can only be used in batch files. 
  6382.  
  6383.  DO can be used to create 3 different kinds of loops.  The first, introduced by 
  6384.  DO n, is a counted loop.  The batch file lines between DO and ENDDO are 
  6385.  repeated n times.  You can also specify "forever" for n if you wish to create 
  6386.  an endless loop. For example: 
  6387.  
  6388.           do 5
  6389.              beep
  6390.           enddo
  6391.  
  6392.  The second type of loop is similar to a "for loop" in programming languages 
  6393.  like BASIC.  DO creates an environment variable, varname, and sets it equal to 
  6394.  the value start (if varname already exists in the environment, it will be 
  6395.  overwritten).  DO then begins the loop process by comparing the value of 
  6396.  varname with the value of end.  If varname is less than or equal to end, DO 
  6397.  executes the batch file lines up to the ENDDO.  Next, DO adds 1 to the value 
  6398.  of varname, or adds the value n if BY n is specified, and repeats the compare 
  6399.  and execute process until varname is greater than end. This example displays 
  6400.  the even numbers from 2 through 20: 
  6401.  
  6402.           do i = 2 to 20 by 2
  6403.              echo %i
  6404.           enddo
  6405.  
  6406.  DO can also count down, rather than up.  If n is negative, varname will 
  6407.  decrease by n with each loop, and the loop will stop when varname is less than 
  6408.  end.  For example, to display the even numbers from 2 through 20 in reverse 
  6409.  order, replace the first line of the example above with: 
  6410.  
  6411.           do i = 20 to 2 by -2
  6412.  
  6413.  The third type of loop is called a "while loop" or "until loop." DO evaluates 
  6414.  the condition, which can be any of the tests supported by the IF command, and 
  6415.  executes the lines between DO and ENDDO as long as the condition is true.  The 
  6416.  loop ends when the condition becomes false. 
  6417.  
  6418.  WHILE tests the condition at the start of the loop; UNTIL tests it at the end. 
  6419.  If you use WHILE, the loop may never be executed (if the condition is false at 
  6420.  the start of the loop); if you use UNTIL, the loop will always be executed at 
  6421.  least once. 
  6422.  
  6423.  Two special commands, ITERATE and LEAVE, can only be used inside a DO / ENDDO 
  6424.  loop.  ITERATE ignores the remaining lines inside the loop and returns to the 
  6425.  beginning of loop for another iteration (unless DO determines that the loop is 
  6426.  finished).  LEAVE exits from the current DO loop and continues with the line 
  6427.  following ENDDO. Both ITERATE and LEAVE are most often used in an IF or IFF 
  6428.  command: 
  6429.  
  6430.           do while "%var" != "%val1"
  6431.              ...
  6432.              if "%var" == "%val2" leave
  6433.           enddo
  6434.  
  6435.  You can nest DO loops up to 15 levels deep. 
  6436.  
  6437.  You can exit from all DO / ENDDO loops by using GOTO to a line past the last 
  6438.  ENDDO.  However, be sure to read the cautionary notes about GOTO and DO under 
  6439.  the GOTO command before using a GOTO inside any DO loop. 
  6440.  
  6441.  
  6442. ΓòÉΓòÉΓòÉ 14.21. DPATH - Set the data search path ΓòÉΓòÉΓòÉ
  6443.  
  6444.  Purpose:    Specify the subdirectories which applications will search to find 
  6445.              files that are not in the current directory. 
  6446.  
  6447.  Format:     DPATH [directory [;directory... ]] 
  6448.  
  6449.              directory :  The full name of a directory to include in the DPATH 
  6450.              (data path) setting. 
  6451.  
  6452.  See also:  PATH, SET, and ESET. 
  6453.  
  6454.  Usage 
  6455.  
  6456.  When most OS/2 applications try to open a data file, they look for the file in 
  6457.  the current directory first.  If they fail to find the file there, they search 
  6458.  each of the directories in the DPATH setting in the order that they are 
  6459.  included.  Internal commands like TYPE do not search the DPATH directories for 
  6460.  files. 
  6461.  
  6462.  For example, the following DPATH command directs applications to look for 
  6463.  files in this order:  the current directory, the INIT directory on C, and the 
  6464.  CONFIG directory on D: 
  6465.  
  6466.           [c:\] dpath c:\init;d:\config
  6467.  
  6468.  The listing of directories to be searched can be set or viewed with DPATH. 
  6469.  The list is stored as an environment string with the variable name DPATH, and 
  6470.  can also be set or viewed with the SET command and edited with the ESET 
  6471.  command. 
  6472.  
  6473.  Directory names in the DPATH must be separated with semicolons [;].  4OS2 will 
  6474.  not shift directory names in the DPATH to upper case as it does with those in 
  6475.  the PATH setting.  If you want the names in the DPATH to be in upper case you 
  6476.  must enter them that way. 
  6477.  
  6478.  If you enter DPATH with no parameters, 4OS2 displays the current DPATH search 
  6479.  list. 
  6480.  
  6481.  
  6482. ΓòÉΓòÉΓòÉ 14.22. DRAWBOX - Draw a box ΓòÉΓòÉΓòÉ
  6483.  
  6484.  Purpose:    Draw a box on the screen. 
  6485.  
  6486.  Format:     DRAWBOX ulrow ulcol lrrow lrcol style [BRIght] [BLInk] fg ON 
  6487.              [BRIght] bg [FILl [BRIght] bgfill ] [ZOOm] [SHAdow] 
  6488.  
  6489.              ulrow :  Row for upper left corner 
  6490.              ulcol :  Column for upper left corner 
  6491.              lrrow :  Row for lower right corner 
  6492.              lrcol :  Column for lower right corner 
  6493.              style :  Box drawing style: 
  6494.              0   No lines (box is drawn with blanks) 
  6495.              1   Single line 
  6496.              2   Double line 
  6497.              3   Single line on top and bottom, double on sides 
  6498.              4   Double line on top and bottom, single on sides 
  6499.              fg :  Foreground character color 
  6500.              bg :  Background character color 
  6501.              bgfill :  Background fill color (for the inside of the box) 
  6502.  
  6503.  See also:  DRAWHLINE and DRAWVLINE. 
  6504.  
  6505.  Usage 
  6506.  
  6507.  DRAWBOX is useful for creating attractive screen displays in batch files. 
  6508.  
  6509.  For example, to draw a box around the entire screen with bright white lines on 
  6510.  a blue background: 
  6511.  
  6512.           drawbox 0 0 24 79 1 bri whi on blu fill blu
  6513.  
  6514.  See Colors and Color Names for details about colors and notes on the use of 
  6515.  bright background colors. 
  6516.  
  6517.  If you use ZOOM, the box appears to grow in steps to its final size.  The 
  6518.  speed of the zoom operation depends on the speed of your video system. 
  6519.  
  6520.  If you use SHADOW, a drop shadow is created by changing the characters in the 
  6521.  row under the box and the 2 columns to the right of the box to normal 
  6522.  intensity text with a black background (this will make characters displayed in 
  6523.  black disappear entirely). 
  6524.  
  6525.  The row and column values are zero-based, so on a standard 25 line by 80 
  6526.  column display, valid rows are 0 - 24 and valid columns are 0 - 79. 
  6527.  
  6528.  DRAWBOX checks for valid row and column values, and displays a "Usage" error 
  6529.  message if any values are out of range. 
  6530.  
  6531.  Unlike DRAWHLINE and DRAWVLINE, DRAWBOX does not automatically connect boxes 
  6532.  to existing lines on the screen with the proper connector characters.  If you 
  6533.  want to draw lines inside a box and have the proper connectors drawn 
  6534.  automatically, draw the box first, then use DRAWHLINE and DRAWVLINE to draw 
  6535.  the lines. 
  6536.  
  6537.  DRAWBOX uses the standard line and box drawing characters in the U.S. English 
  6538.  extended ASCII character set.  If your system is configured for a different 
  6539.  country or language, the box may not appear on your screen as you expect. 
  6540.  
  6541.  
  6542. ΓòÉΓòÉΓòÉ 14.23. DRAWHLINE - Draw a horizontal line ΓòÉΓòÉΓòÉ
  6543.  
  6544.  Purpose:    Draw a horizontal line on the screen. 
  6545.  
  6546.  Format:     DRAWHLINE row column len style [BRIght] [BLInk] fg ON [BRIght] bg 
  6547.  
  6548.              row :  Starting row 
  6549.              column :  Starting column 
  6550.              len :  Length of line 
  6551.              style :  Line drawing style: 
  6552.              1   Single line 
  6553.              2   Double line 
  6554.              fg :  Foreground character color 
  6555.              bg :  Background character color 
  6556.  
  6557.  See also:  DRAWBOX and DRAWVLINE. 
  6558.  
  6559.  Usage 
  6560.  
  6561.  DRAWHLINE is useful for creating attractive screen displays in batch files. 
  6562.  It detects other lines and boxes on the display, and creates the appropriate 
  6563.  connector characters when possible (not all types of lines can be connected 
  6564.  with the available characters). 
  6565.  
  6566.  For example, the following command draws a double line along the top row of 
  6567.  the display with green characters on a blue background: 
  6568.  
  6569.           drawhline 0 0 80 2 green on blue
  6570.  
  6571.  The row and column values are zero-based, so on a standard 25 line by 80 
  6572.  column display, valid rows are 0 - 24 and valid columns are 0 - 79.  DRAWHLINE 
  6573.  checks for a valid row and column, and displays a "Usage" error message if 
  6574.  either value is out of range. 
  6575.  
  6576.  See Colors and Color Names for details about colors and notes on the use of 
  6577.  bright background colors. 
  6578.  
  6579.  DRAWHLINE uses the standard line and box drawing characters in the U.S. 
  6580.  English extended ASCII character set.  If your system is configured for a 
  6581.  different country or language, the line may not appear on your screen as you 
  6582.  expect. 
  6583.  
  6584.  
  6585. ΓòÉΓòÉΓòÉ 14.24. DRAWVLINE - Draw a vertical line ΓòÉΓòÉΓòÉ
  6586.  
  6587.  Purpose:    Draw a vertical line on the screen. 
  6588.  
  6589.  Format:     DRAWVLINE row column len style [BRIght][BLInk] fg ON [BRIght] bg 
  6590.  
  6591.              row :  Starting row 
  6592.              column :  Starting column 
  6593.              len :  Length of line 
  6594.              style :  Line drawing style: 
  6595.              1   Single line 
  6596.              2   Double line 
  6597.              fg :  Foreground character color 
  6598.              bg :  Background character color 
  6599.  
  6600.  See also:  DRAWBOX and DRAWHLINE. 
  6601.  
  6602.  Usage 
  6603.  
  6604.  DRAWVLINE is useful for creating attractive screen displays in batch files. 
  6605.  It detects other lines and boxes on the display, and creates the appropriate 
  6606.  connector characters when possible (not all types of lines can be connected 
  6607.  with the available characters). 
  6608.  
  6609.  For example, to draw a double width line along the left margin of the display 
  6610.  with bright red characters on a black background: 
  6611.  
  6612.           drawvline 0 0 25 2 bright red on black
  6613.  
  6614.  The row and column values are zero-based, so on a standard 25 line by 80 
  6615.  column display, valid rows are 0 - 24 and valid columns are 0 - 79.  DRAWVLINE 
  6616.  checks for a valid row and column, and displays a "Usage" error message if 
  6617.  either value is out of range. 
  6618.  
  6619.  See Colors and Color Names for details about colors and notes on the use of 
  6620.  bright background colors. 
  6621.  
  6622.  DRAWVLINE uses the standard line and box drawing characters in the U.S. 
  6623.  English extended ASCII character set.  If your system is configured for a 
  6624.  different country or language, the line may not appear on your screen as you 
  6625.  expect. 
  6626.  
  6627.  
  6628. ΓòÉΓòÉΓòÉ 14.25. ECHO - Display a message / set echo state ΓòÉΓòÉΓòÉ
  6629.  
  6630.  Purpose:    Display a message, enable or disable batch file or command-line 
  6631.              echoing, or display the echo status. 
  6632.  
  6633.  Format:     ECHO [ON | OFF | message ] 
  6634.  
  6635.              message :  Text to display. 
  6636.  
  6637.  See also:  ECHOS, SCREEN, SCRPUT, SETDOS and TEXT. 
  6638.  
  6639.  Usage 
  6640.  
  6641.  4OS2 has a separate echo capability for batch files and for the command line. 
  6642.  The command-line ECHO state is independent of the batch file ECHO state; 
  6643.  changing ECHO in a batch file has no effect on the display at the command 
  6644.  prompt, and vice versa. 
  6645.  
  6646.  To see the current echo state, use the ECHO command with no arguments.  This 
  6647.  displays either the batch file or command-line echo state, depending on where 
  6648.  the ECHO command is performed. 
  6649.  
  6650.  In a batch file, if you turn ECHO on, each line of the file is displayed 
  6651.  before it is executed.  If you turn ECHO off, each line is executed without 
  6652.  being displayed.  ECHO can also be used in a batch file to display a message 
  6653.  on the screen.  Regardless of the ECHO state, a batch file line that begins 
  6654.  with the [@] character will not be displayed.  To turn off batch file echoing, 
  6655.  without displaying the ECHO command, use this line: 
  6656.  
  6657.           @echo off
  6658.  
  6659.  ECHO commands in a batch file will send messages to the screen while the batch 
  6660.  file executes, even if ECHO is set OFF.  For example, this line will display a 
  6661.  message in a batch file: 
  6662.  
  6663.           echo Processing your print files...
  6664.  
  6665.  If you want to echo a blank line from within a batch file, enter: 
  6666.  
  6667.           echo.
  6668.  
  6669.  You cannot use the command separator character [&], or the redirection symbols 
  6670.  [| > <] in an ECHO message, unless you enclose them in quotes (see Argument 
  6671.  Quoting) or precede them with the escape character. 
  6672.  
  6673.  ECHO defaults to ON in batch files.  The current ECHO state is inherited by 
  6674.  called batch files.  You can change the default setting to ECHO OFF with the 
  6675.  SETDOS /V0 command or the BatchEcho directive in the .INI file. 
  6676.  
  6677.  If you turn the command-line ECHO on, each command will be displayed before it 
  6678.  is executed.  This will let you see the command line after expansion of all 
  6679.  aliases and variables.  The command- line ECHO is most useful when you are 
  6680.  learning how to use advanced features.  This example will turn command-line 
  6681.  echoing on: 
  6682.  
  6683.           [c:\] echo on
  6684.  
  6685.  ECHO defaults to OFF at the command line. 
  6686.  
  6687.  
  6688. ΓòÉΓòÉΓòÉ 14.26. ECHOS - Display a message without CR/LF ΓòÉΓòÉΓòÉ
  6689.  
  6690.  Purpose:    Display a message without a trailing carriage return and line 
  6691.              feed. 
  6692.  
  6693.  Format:     ECHOS message 
  6694.  
  6695.  See also:  ECHO, SCREEN, SCRPUT, TEXT, and VSCRPUT. 
  6696.  
  6697.  Usage 
  6698.  
  6699.  ECHOS is useful for text output when you don't want to add a carriage return / 
  6700.  linefeed pair at the end of the line.  For example, you can use ECHOS when you 
  6701.  need to redirect control sequences to your printer; this example sends the 
  6702.  sequence Esc P to the printer on LPT1: 
  6703.  
  6704.           [c:\] echos ^eP > lpt1:
  6705.  
  6706.  You cannot use the command separator character [&] or the redirection symbols 
  6707.  [| > <] in an ECHOS message, unless you enclose them in quotes (see Argument 
  6708.  Quoting) or precede them with the escape character. 
  6709.  
  6710.  ECHOS does not translate or modify the message text.  For example, carriage 
  6711.  return characters are not translated to CR/LF pairs. ECHOS sends only the 
  6712.  characters you enter (after escape character and back quote processing).  The 
  6713.  only character you cannot put into an ECHOS message is the NUL character 
  6714.  (ASCII 0). 
  6715.  
  6716.  
  6717. ΓòÉΓòÉΓòÉ 14.27. ENDLOCAL - Restore the saved environment ΓòÉΓòÉΓòÉ
  6718.  
  6719.  Purpose:    Restore the saved disk drive, directory, environment, and alias 
  6720.              list. 
  6721.  
  6722.  Format:     ENDLOCAL 
  6723.  
  6724.  See also:  SETLOCAL. 
  6725.  
  6726.  Usage 
  6727.  
  6728.  The SETLOCAL command in a batch file saves the current disk drive, default 
  6729.  directory, all environment variables, and the alias list. ENDLOCAL restores 
  6730.  everything that was saved by the previous SETLOCAL command. 
  6731.  
  6732.  SETLOCAL and ENDLOCAL can only be used in batch files, not in aliases or from 
  6733.  the command line. 
  6734.  
  6735.  
  6736. ΓòÉΓòÉΓòÉ 14.28. ESET - Edit environment variables and aliases ΓòÉΓòÉΓòÉ
  6737.  
  6738.  Purpose:    Edit environment variables and aliases. 
  6739.  
  6740.  Format:     ESET [/A] variable name... 
  6741.  
  6742.              variable name :  The name of an environment variable or alias to 
  6743.              edit. 
  6744.  
  6745.              /A(lias) 
  6746.  
  6747.  See also:  ALIAS, UNALIAS, SET, and UNSET. 
  6748.  
  6749.  Usage 
  6750.  
  6751.  ESET allows you to edit environment variables and aliases using line editing 
  6752.  commands (see Command-Line Editing). 
  6753.  
  6754.  For example, to edit the executable file search path: 
  6755.  
  6756.           [c:\] eset path
  6757.           path=c:\;c:\dos;c:\util
  6758.  
  6759.  To create and then edit an alias: 
  6760.  
  6761.           [c:\] alias d = dir /d/j/p
  6762.           [c:\] eset d
  6763.           d=dir /d/j/p
  6764.  
  6765.  ESET will search for environment variables first and then aliases. If you have 
  6766.  an environment variable and an alias with the same name, ESET will edit the 
  6767.  environment variable and ignore the alias unless you use the /A option. 
  6768.  
  6769.  Environment variable and alias names are normally limited to 80 characters, 
  6770.  and their contents to 1,023 characters.  However, if you use special 
  6771.  techniques to create a longer environment variable, ESET will edit it provided 
  6772.  the variable contains no more than 2,047 characters of text. 
  6773.  
  6774.  If you have enabled global aliases (see ALIAS), any changes made to an alias 
  6775.  with ESET will immediately affect all other copies of 4OS2 which are using the 
  6776.  same alias list. 
  6777.  
  6778.  Option 
  6779.  
  6780.     /A:     (Alias) Edit the named alias even if an environment variable of the 
  6781.             same name exists.  If you have an alias and an environment variable 
  6782.             with the same name, you must use this switch to be able to edit the 
  6783.             alias. 
  6784.  
  6785.  
  6786. ΓòÉΓòÉΓòÉ 14.29. EXCEPT - Exclude files from a command ΓòÉΓòÉΓòÉ
  6787.  
  6788.  Purpose:    Perform a command on all available files except those specified. 
  6789.  
  6790.  Format:     EXCEPT (file ) command 
  6791.  
  6792.              file :  The file or files to exclude from the command. 
  6793.              command :  The command to execute, including all appropriate 
  6794.              arguments and switches. 
  6795.  
  6796.  See also:  ATTRIB. 
  6797.  
  6798.  File Selection 
  6799.  
  6800.  Supports extended wildcards, ranges, multiple file names, and include lists. 
  6801.  Date, time, or size ranges must appear immediately after the EXCEPT keyword. 
  6802.  
  6803.  Usage 
  6804.  
  6805.  EXCEPT provides a means of executing a command on a group of files and/or 
  6806.  subdirectories, and excluding a subgroup from the operation. The command can 
  6807.  be an internal command or alias, an external command, or a batch file. 
  6808.  
  6809.  You may use wildcards to specify the files to exclude from the command.  The 
  6810.  first example erases all the files in the current directory except those 
  6811.  beginning with MEMO, and those whose extension is .WKS.  The second example 
  6812.  copies all the files and subdirectories on drive C to drive D except those in 
  6813.  C:\MSC and C:\DOS, using the COPY command: 
  6814.  
  6815.           [c:\] except (memo*.* *.wks) erase *.*
  6816.           [c:\] except (c:\msc c:\dos) copy c:\*.* d:\ /s
  6817.  
  6818.  Date, time, and size ranges can be used immediately after the word EXCEPT to 
  6819.  further qualify which files should be excluded from the command.  If the 
  6820.  command is an internal command that supports ranges, an independent range can 
  6821.  also be used in the command itself. 
  6822.  
  6823.  EXCEPT prevents operations on the specified file(s) by setting the hidden 
  6824.  attribute, performing the command, and then clearing the hidden attribute.  If 
  6825.  the command is aborted in an unusual way, you may need to use the ATTRIB 
  6826.  command to remove the hidden attribute from the file(s). 
  6827.  
  6828.  Caution:  EXCEPT will not work with programs or commands that ignore the 
  6829.  hidden attribute or which work explicitly with hidden files, including DEL /Z, 
  6830.  and the /H (process hidden files) switch available in some 4OS2 file 
  6831.  processing commands. 
  6832.  
  6833.  You can use command grouping to execute multiple commands with a single 
  6834.  EXCEPT.  For example, the following command copies all files in the current 
  6835.  directory whose extensions begin with .DA, except the .DAT files, to the 
  6836.  D:\SAVE directory, then changes the first two characters of the extension of 
  6837.  the copied files to .SA: 
  6838.  
  6839.           [c:\data] except (*.dat) (copy *.da* d:\save & ren *.da* *.sa*)
  6840.  
  6841.  If you use filename completion (see Filename Completion) to enter the 
  6842.  filenames inside the parentheses, type a space after the open parenthesis 
  6843.  before entering a partial filename or pressing Tab.  Otherwise, the 
  6844.  command-line editor will treat the open parenthesis as the first character of 
  6845.  the filename to be completed. 
  6846.  
  6847.  
  6848. ΓòÉΓòÉΓòÉ 14.30. EXIT - Exit 4OS2 ΓòÉΓòÉΓòÉ
  6849.  
  6850.  Purpose:    Return from 4OS2. 
  6851.  
  6852.  Format:     EXIT [value ] 
  6853.  
  6854.              value :  The exit code to return (0 - 255). 
  6855.  
  6856.  Usage 
  6857.  
  6858.  EXIT terminates the current copy of 4OS2.  Use it to return to an application 
  6859.  when you have "shelled out" to work at the prompt, or to end an OS/2 
  6860.  command-line session. 
  6861.  
  6862.  To close the session, or to return to the application that started 4OS2, type: 
  6863.  
  6864.           [c:\] exit
  6865.  
  6866.  If you specify a value, EXIT will return that value to the program that 
  6867.  started 4OS2.  For example: 
  6868.  
  6869.           [c:\] exit 255
  6870.  
  6871.  The value is a number you can use to inform the program of some result, such 
  6872.  as the success or failure of a batch file.  This feature is most useful for 
  6873.  systems which use batch files to automate their operation, such as bulletin 
  6874.  boards, or custom application programs like databases that shell to 4OS2 to 
  6875.  perform certain tasks. 
  6876.  
  6877.  
  6878. ΓòÉΓòÉΓòÉ 14.31. FFIND - Search for files ΓòÉΓòÉΓòÉ
  6879.  
  6880.  Purpose:    Search for files by name or contents. 
  6881.  
  6882.  Format:     FFIND [/A:[[-]rhsda] /B /C /D[list] /E /K /L /M 
  6883.              /O[[:][-]acdeginrsu] /P /S /[T|X]"xx" /V file... 
  6884.  
  6885.              list :  A list of disk drive letters (without colons). 
  6886.              file :  The file, directory, or list of files or directories to 
  6887.              display. 
  6888.  
  6889.              /A(ttribute select)             /M (no footers) 
  6890.              /B(are)                         /O(rder) 
  6891.              /C(ase sensitive)               /P(ause) 
  6892.              /D(rive)                        /S(ubdirectories) 
  6893.              /E (upper case display)         /T"xx" (text search string) 
  6894.              /K (no headers)                 /V(erbose) 
  6895.              /L(ine numbers)                 /X["xx"] (hex display/search 
  6896.                                              string) 
  6897.  
  6898.  File Selection 
  6899.  
  6900.  Supports extended wildcards, ranges, multiple file names, and include lists. 
  6901.  
  6902.  Usage 
  6903.  
  6904.  FFIND is a flexible search command that looks for files based on their names 
  6905.  and their contents. Depending on the options you choose, FFIND can display 
  6906.  filenames, matching text, or a combination of both in a variety of formats. 
  6907.  
  6908.  If you want to search for files by name, FFIND works much like the DIR 
  6909.  command.  For example, to generate a list of all the .BTM files in the current 
  6910.  directory, you could use the command: 
  6911.  
  6912.           [c:\] ffind *.btm
  6913.  
  6914.  The output from this command is a list of full pathnames, followed by the 
  6915.  number of files found. 
  6916.  
  6917.  If you want to limit the output to a list of *.BTM files which contain the 
  6918.  string color, you could use this command instead: 
  6919.  
  6920.           [c:\] ffind /t"color" *.btm
  6921.  
  6922.  The output from this version of FFIND is a list of files that contain the 
  6923.  string color along with the first line in each file that contains that string. 
  6924.  By default, FFIND uses a case-insensitve search, so the command above will 
  6925.  include files that contain COLOR, Color, color, or any other combination of 
  6926.  upper-case and lower-case letters. 
  6927.  
  6928.  You can use extended wildcards in the search string to increase the 
  6929.  flexibility of FFIND's search.  For example, the following command will find 
  6930.  .TXT files which contain either the string June or July.  It will also find 
  6931.  Juny and Jule.  The /C option makes the search case-sensitive: 
  6932.  
  6933.           [c:\] ffind /c/t"Ju[nl][ey]" *.txt
  6934.  
  6935.  At times, you may need to search for data that cannot be represented by ASCII 
  6936.  characters.  You can use FFIND's /X option to represent the search string in 
  6937.  hexadecimal format.  With /X, the search must be represented by pairs of 
  6938.  hexadecimal digits separated by spaces; a search of this type is always 
  6939.  case-sensitive (41 63 65 is the hex code for "Ace"): 
  6940.  
  6941.           [c:\] ffind /x"41 63 65" *.txt
  6942.  
  6943.  You can use FFIND's other options to further specify the files for which you 
  6944.  are searching and to modify the way in which the output is displayed. 
  6945.  
  6946.  Options 
  6947.  
  6948.     /A:     (Attribute select) Select only those files that have the specified 
  6949.             attribute(s) set.  Preceding the attribute character with a hyphen 
  6950.             [-] will select files that do not have that attribute set.  The 
  6951.             attributes are: 
  6952.  
  6953.                  R  Read-only 
  6954.                  H  Hidden 
  6955.                  S  System 
  6956.                  D  Subdirectory 
  6957.                  A  Archive 
  6958.  
  6959.             If no attributes are listed at all (e.g., FFIND /A: ...), FFIND 
  6960.             will select all files and subdirectories including hidden and 
  6961.             system files.  If attributes are combined, all the specified 
  6962.             attributes must match for a file to be selected. For example, 
  6963.             /A:RHS will select only those files with all three attributes set. 
  6964.  
  6965.     /B:     (Bare) Display file names only and omit the text that matches the 
  6966.             search.  This option is only useful in combination with /T or /X, 
  6967.             which normally force FFIND to display file names and matching text. 
  6968.  
  6969.     /C:     (Case sensitive) Perform a case-sensitive search.  This option is 
  6970.             only valid with /T, which defaults to a case-insenitive search.  It 
  6971.             is not needed with a /X hexadecimal search, which is always 
  6972.             case-sensitive. 
  6973.  
  6974.     /D:     (Drive)  Search all files on one or more drives.  If you use /D 
  6975.             without a list of drives, FFIND will search the drives specified in 
  6976.             the list of files.  If no drive letters are listed, FFIND will 
  6977.             search the default drive.  You can include a list of drives or a 
  6978.             range of drives to search as part of the /D option.  For example, 
  6979.             to search drives C:, D:, E:, and G:, you can use either of these 
  6980.             commands: 
  6981.  
  6982.                                 [c:\] ffind /dcdeg ...
  6983.                                 [c:\] ffind /dc-eg ...
  6984.  
  6985.     /E:     Display filenames in the traditional upper case; also see SETDOS /U 
  6986.             and the UpperCase directive in 4OS2.INI. 
  6987.  
  6988.     /K:     (No headers) Suppress the display of the header or filename for 
  6989.             each matching text line. 
  6990.  
  6991.     /L:     (Line numbers) Include the line number for each text line 
  6992.             displayed. 
  6993.  
  6994.     /M:     (No footers) Suppress the footer (the number of files and number of 
  6995.             matches) at the end of FFIND's display. 
  6996.  
  6997.     /O:     (Order) Set the sorting order.  You may use any combination of the 
  6998.             following sorting options; if multiple options are used, the 
  6999.             listing will be sorted with the first sort option as the primary 
  7000.             key, the next as the secondary key, and so on: 
  7001.  
  7002.               -  Reverse the sort order for the next option 
  7003.  
  7004.               a  Sort in ASCII order, not numerically, when there are digits in 
  7005.             the name 
  7006.  
  7007.               d  Sort by date and time (oldest first); for HPFS drives also see 
  7008.             /T 
  7009.  
  7010.               e  Sort by extension 
  7011.  
  7012.               g  Group subdirectories first, then files 
  7013.  
  7014.               i  Sort by file description (ignored if /C or /O:c is used) 
  7015.  
  7016.               n  Sort by filename (this is the default) 
  7017.  
  7018.               r  Reverse the sort order for all options 
  7019.  
  7020.               s  Sort by size 
  7021.  
  7022.               u  Unsorted 
  7023.  
  7024.     /P:     (Pause) Wait for a key to be pressed after each screen page before 
  7025.             continuing the display.  Your options at the prompt are explained 
  7026.             in detail under Page and File Prompts. 
  7027.  
  7028.     /S:     (Subdirectories) Display matches from the current directory and all 
  7029.             of its subdirectories. 
  7030.  
  7031.     /T:     (Text search) Specify the text search string.  /T must be followed 
  7032.             by a text string in double quotes (e.g., /t"color").  FFIND will 
  7033.             perform a case-insensitive search unless you also use the /C 
  7034.             option.  For a hexadecimal search and/or hexadecimal display of the 
  7035.             location where the search string is found, see /X.   You can 
  7036.             specify a search string with either /T or /X, but not both. 
  7037.  
  7038.     /V:     (Verbose) Show every matching line.  FFIND's default behavior is to 
  7039.             show only the first matching line then and then go on to the next 
  7040.             file.  This option is only valid with /T or /X. 
  7041.  
  7042.     /X:     (Hexadecimal display / search) Specify hexadecimal display and an 
  7043.             optional hexadecimal search string. 
  7044.  
  7045.             If /X is followed by one or more pairs of hexadecimal digits in 
  7046.             quotes (e.g., / x"44 63 65"), FFIND will search for that exact 
  7047.             sequence of characters or data bytes without regard to the meaning 
  7048.             of those bytes as text.  If those bytes are found, the offset is 
  7049.             displayed (also in hexadecimal).  A search of this type will always 
  7050.             be case-sensitive. 
  7051.  
  7052.             If /X is not followed by a hexadecimal search string it must be 
  7053.             used in conjunction with /T, and will change the output format to 
  7054.             display hexadecimal offsets rather than actual text lines when the 
  7055.             search string is found.  For example, this command uses /T to 
  7056.             display the first line in each BTM file containing the word hello: 
  7057.  
  7058.                                 [c:\] ffind /t"hello" *.btm
  7059.                                 ---- c:\test.btm:
  7060.                                 echo hello
  7061.  
  7062.                                 1 line in 1 file
  7063.  
  7064.             If you use the same command with /X, the hexadecimal offset is 
  7065.             displayed instead of the text: 
  7066.  
  7067.                                 [c:\] ffind /t"hello" /x *.btm
  7068.                                 ---- c:\test.btm:
  7069.                                 Offset: 1A
  7070.  
  7071.                                 1 line in 1 file
  7072.  
  7073.             You can specify a search string with either /T or /X, but not both. 
  7074.  
  7075.  
  7076. ΓòÉΓòÉΓòÉ 14.32. FOR - Repeat a command ΓòÉΓòÉΓòÉ
  7077.  
  7078.  Purpose:    Repeat a command for several values of a variable. 
  7079.  
  7080.  Format:     FOR [/A:[[-]rhsda] /H] %var IN ([@]set ) [DO] command ... 
  7081.  
  7082.              %var :  The variable to be used in the command ("FOR variable"). 
  7083.              set :  A set of values for the variable. 
  7084.              command :  A command or group of commands to be executed for each 
  7085.              value of the variable. 
  7086.  
  7087.              /A(ttribute select)             /H(ide dots) 
  7088.  
  7089.  File Selection 
  7090.  
  7091.  Supports extended wildcards, ranges, multiple file names, and include lists. 
  7092.  Date, time, or size ranges must appear immediately after the FOR keyword. 
  7093.  
  7094.  Usage 
  7095.  
  7096.  FOR begins by creating a set.  It then executes a command for every member of 
  7097.  the set.  The command can be an internal command, an alias, an external 
  7098.  command, or a batch file. 
  7099.  
  7100.  Normally, the set is a list of files specified with wildcards.  For example, 
  7101.  if you use this line in a batch file: 
  7102.  
  7103.           for %x in (*.txt) do list %x
  7104.  
  7105.  then LIST will be executed once for each file in the current directory with 
  7106.  the extension .TXT.  The FOR variable %x is set equal to each of the file 
  7107.  names in turn, then the LIST command is executed for each file.  (You could do 
  7108.  the same thing more easily with a simple LIST *.TXT.  We used FOR here so you 
  7109.  could get a feel for how it operates, using a simple example.) 
  7110.  
  7111.  The set can include multiple files or an include list, like this: 
  7112.  
  7113.           for %x in (d:\*.txt;*.doc;*.asc) do type %x
  7114.  
  7115.  If the set includes filenames, the file list can be further refined by using 
  7116.  date, time, and size ranges.  The range must be placed immediately after the 
  7117.  word FOR.  The range will be ignored if no wildcards are used inside the 
  7118.  parentheses.  For example, this set is made up of all of the *.TXT files that 
  7119.  were created or updated on October 4, 1994: 
  7120.  
  7121.           for /[d10-4-94,+0] %x in (*.txt) do ...
  7122.  
  7123.  If the command is an internal command that supports ranges, an independent 
  7124.  range can also be used in the command itself. 
  7125.  
  7126.  The set can also be made up of text instead of file names.  For example, to 
  7127.  display the free space on drives C:, D:, and E:, you could use: 
  7128.  
  7129.           for %drive in (c d e) do free %drive:
  7130.  
  7131.  When the set is made up of text or several separate file names (not an include 
  7132.  list), the elements must be separated by spaces, tabs, commas, or the switch 
  7133.  character (normally a slash [/]). 
  7134.  
  7135.  You can also set the FOR variable equal to each line in a file by placing an 
  7136.  [@] in front of the file name.  If you have a file called DRIVES.TXT that 
  7137.  contains a list of drives on your computer, one drive name per line (with a 
  7138.  ":" after each drive letter), you can print the free space on each drive this 
  7139.  way: 
  7140.  
  7141.           for %d in (@drives.txt) do free %d > prn
  7142.  
  7143.  Because the [@] is also a valid filename character, FOR first checks to see if 
  7144.  the file exists with the [@] in its name (i.e., a file named @DRIVES.TXT ). 
  7145.  If so, the filename is treated as a normal argument.  If it doesn't exist, FOR 
  7146.  uses the filename (without the [@]) as the file from which to retrieve text. 
  7147.  
  7148.  You can use FOR to process the output of a command by using a Redirection and 
  7149.  Piping. To do so, use @CON as the file name.  For example, this command 
  7150.  creates a list of the names of all .MSG files in date/time order, then calls 
  7151.  the MSGPROC batch file for each file: 
  7152.  
  7153.           dir /b /od *.msg | for %fn in (@con) do call msgproc %fn
  7154.  
  7155.  You can use either % or %% in front of the variable name. Either form will 
  7156.  work, whether the FOR command is typed from the command line or is part of an 
  7157.  alias or batch file (some of the traditional command processors require a 
  7158.  single % if FOR is used at the command line, but use %% if it is used in a 
  7159.  batch file).  The variable name can be up to 80 characters long.  The word DO 
  7160.  is optional. 
  7161.  
  7162.  If you use a single-character FOR variable name, that name is given priority 
  7163.  over any environment variable which starts with the same letter, in order to 
  7164.  maintain compatibility with the traditional FOR command.  For example, the 
  7165.  following command tries to add a: and b: to the end of the PATH, but will not 
  7166.  work as intended: 
  7167.  
  7168.           [c:\] for %p in (a: b:) do path %path;%p
  7169.  
  7170.  The "%p" in "%path" will be interpreted as the FOR variable %p followed by the 
  7171.  text "ath", which is not what was intended.  To get around this, use a 
  7172.  different letter or a longer name for the FOR variable, or use square brackets 
  7173.  around the variable name (see Environment). 
  7174.  
  7175.  The following example uses FOR with variable functions to delete the .BAK 
  7176.  files for which a corresponding .TXT file exists in the current directory: 
  7177.  
  7178.           [c:\docs] for %file in (*.txt) do del %@name[%file].bak
  7179.  
  7180.  You can use command grouping to execute multiple commands for each element in 
  7181.  the list.  For example, the following command copies each .WKQ file in the 
  7182.  current directory to the D:\WKSAVE directory, then changes the extension of 
  7183.  each file in the current directory to .SAV.  This should be entered on one 
  7184.  line: 
  7185.  
  7186.           [c:\text] for %file in (*.wkq) do (copy %file d:\wksave\ &
  7187.                     ren %file *.sav)
  7188.  
  7189.  In a batch file you can use GOSUB to execute a subroutine for every element in 
  7190.  the set.  Within the subroutine, the FOR variable can be used just like any 
  7191.  environment variable.  This is a convenient way to execute a complex sequence 
  7192.  of commands for every element in the set without CALLing another batch file. 
  7193.  
  7194.  One unusual use of FOR is to execute a collection of batch files or other 
  7195.  commands with the same parameter.  For example, you might want to have three 
  7196.  batch files all operate on the same data file. The FOR command could look like 
  7197.  this: 
  7198.  
  7199.           [c:\] for %cmd in (filetest fileform fileprnt) do %cmd datafile
  7200.  
  7201.  This line will expand to three separate commands: 
  7202.  
  7203.           filetest datafile
  7204.           fileform datafile
  7205.           fileprnt datafile
  7206.  
  7207.  The variable that FOR uses (the %CMD in the example above) is created in the 
  7208.  environment and then erased when the FOR command is done.  However, for 
  7209.  compatibility with CMD.EXE, single-character FOR variables do not overwrite 
  7210.  existing environment variables with the same name.  As a result, when using a 
  7211.  multi-character variable name you must be careful not to use the name of one 
  7212.  of your environment variables as a FOR variable.  For example, a command that 
  7213.  begins 
  7214.  
  7215.           [c:\] for %path in ...
  7216.  
  7217.  will write over your current path setting and then erase the path variable 
  7218.  completely. 
  7219.  
  7220.  FOR statements can be nested. 
  7221.  
  7222.  Options 
  7223.  
  7224.     /A:     (Attribute select) Process only those files that have the specified 
  7225.             attribute(s).  /A will be used only when processing wildcard file 
  7226.             names in the set.  It will be ignored for filenames without 
  7227.             wildcards or other items in the set.  Preceding the attribute 
  7228.             character with a hyphen [-] will process files that do not have 
  7229.             that attribute set.  The attributes are: 
  7230.  
  7231.               R  Read-only 
  7232.               H  Hidden 
  7233.               S  System 
  7234.               D  Subdirectory 
  7235.               A  Archive 
  7236.  
  7237.             If no attributes are listed (e.g., FOR /A: ...), FOR will process 
  7238.             all files including hidden and system files.  If attributes are 
  7239.             combined, all the specified attributes must match for a file to be 
  7240.             included.  For example, /A:RHS will include only those files with 
  7241.             all three attributes set. 
  7242.  
  7243.             For example, to process only those files with the archive attribute 
  7244.             set: 
  7245.  
  7246.                                 for /a:a %f in (*.*) echo %f needs a backup!
  7247.  
  7248.     /H:     (Hide dots) Suppress the assignment of the "." and ".." directories 
  7249.             to "var". 
  7250.  
  7251.  
  7252. ΓòÉΓòÉΓòÉ 14.33. FREE - Display total and free disk space ΓòÉΓòÉΓòÉ
  7253.  
  7254.  Purpose:    Display the total disk space, total bytes used, and total bytes 
  7255.              free on the specified (or default) drive(s). 
  7256.  
  7257.  Format:     FREE [drive: ... ] 
  7258.  
  7259.              drive :  One or more drives to include in the report. 
  7260.  
  7261.  See also:  MEMORY. 
  7262.  
  7263.  Usage 
  7264.  
  7265.  FREE provides the same disk information as the external command CHKDSK, but 
  7266.  without the wait, since it does not check the integrity of the file and 
  7267.  directory structure of the disk. 
  7268.  
  7269.  A colon [:] is required after each drive letter.  This example displays the 
  7270.  status of drives A and C: 
  7271.  
  7272.           [c:\] free a: c:
  7273.  
  7274.  
  7275. ΓòÉΓòÉΓòÉ 14.34. GLOBAL - Execute a command all subdirectories ΓòÉΓòÉΓòÉ
  7276.  
  7277.  Purpose:    Execute a command in the current directory and its subdirectories. 
  7278.  
  7279.  Format:     GLOBAL [/H /I /P /Q] command 
  7280.  
  7281.              command :  The command to execute, including arguments and 
  7282.              switches. 
  7283.  
  7284.              /H(idden directories)           /P(rompt) 
  7285.              /I(gnore exit codes)            /Q(uiet) 
  7286.  
  7287.  Usage 
  7288.  
  7289.  GLOBAL performs the command first in the current directory and then in every 
  7290.  subdirectory under the current directory.  The command can be an internal 
  7291.  command, an alias, an external command, or a batch file. 
  7292.  
  7293.  This example copies the files in every directory on drive A to the directory 
  7294.  C:\TEMP : 
  7295.  
  7296.           [a:\] global copy *.* c:\temp
  7297.  
  7298.  If you use the /P option, GLOBAL will prompt for each subdirectory before 
  7299.  performing the command.  You can use this option if you want to perform the 
  7300.  command in most, but not all subdirectories of the current directory. 
  7301.  
  7302.  You can use command grouping to execute multiple commands in each 
  7303.  subdirectory.  For example, the following command copies each .TXT file in the 
  7304.  current directory and all of its subdirectories to drive A.  It then changes 
  7305.  the extension of each of the copied files to .SAV : 
  7306.  
  7307.           [c:\] global (copy *.txt a: & ren *.txt *.sav)
  7308.  
  7309.  Options 
  7310.  
  7311.     /H:     (Hidden directories) Forces GLOBAL to look for hidden directories. 
  7312.             If you don't use this switch, hidden directories are ignored. 
  7313.  
  7314.     /I:     (Ignore exit codes) If this option is not specified, GLOBAL will 
  7315.             terminate if the command returns a non- zero exit code.  Use /I if 
  7316.             you want command to continue in additional subdirectories even if 
  7317.             it returns an error in a previous subdirectory.  Even if you use 
  7318.             /I, GLOBAL will halt execution in response to Ctrl-C or Ctrl-Break. 
  7319.  
  7320.     /P:     (Prompt) Forces GLOBAL to prompt with each directory name before it 
  7321.             performs the command.  Your options at the prompt are explained in 
  7322.             detail under Page and File Prompts. 
  7323.  
  7324.     /Q:     (Quiet) Do not display the directory names as each directory is 
  7325.             processed. 
  7326.  
  7327.  
  7328. ΓòÉΓòÉΓòÉ 14.35. GOSUB - Execute a subroutine in a batch file ΓòÉΓòÉΓòÉ
  7329.  
  7330.  Purpose:    Execute a subroutine in the current batch file. 
  7331.  
  7332.  Format:     GOSUB label 
  7333.  
  7334.              label :  The batch file label at the beginning of the subroutine. 
  7335.  
  7336.  See also:  CALL, GOTO and RETURN. 
  7337.  
  7338.  Usage 
  7339.  
  7340.  GOSUB can only be used in batch files. 
  7341.  
  7342.  4OS2 allows subroutines in batch files.  A subroutine must start with a label 
  7343.  (a colon [:] followed by a one-word label name) which appears on a line by 
  7344.  itself.  Case differences are ignored when matching labels.  The subroutine 
  7345.  must end with a RETURN statement. 
  7346.  
  7347.  The subroutine is invoked with a GOSUB command from another part of the batch 
  7348.  file.  After the RETURN, processing will continue with the command following 
  7349.  the GOSUB command.  For example, the following batch file fragment calls a 
  7350.  subroutine which displays the directory and returns: 
  7351.  
  7352.           echo Calling a subroutine
  7353.           gosub subr1
  7354.           echo Returned from the subroutine
  7355.           quit
  7356.           :subr1
  7357.           dir /a/w
  7358.           return
  7359.  
  7360.  If the label doesn't exist, the batch file is terminated with the error 
  7361.  message "Label not found." 
  7362.  
  7363.  GOSUB saves the IFF state, so IFF statements inside a subroutine won't 
  7364.  interfere with IFF statements in the part of the batch file from which the 
  7365.  subroutine was called. 
  7366.  
  7367.  Subroutines can be nested. 
  7368.  
  7369.  
  7370. ΓòÉΓòÉΓòÉ 14.36. GOTO - Branch within a batch file ΓòÉΓòÉΓòÉ
  7371.  
  7372.  Purpose:    Branch to a specified line inside the current batch file. 
  7373.  
  7374.  Format:     GOTO [/I] label 
  7375.  
  7376.              label :  The batch file label to branch to. 
  7377.  
  7378.              /I(FF and DO continue) 
  7379.  
  7380.  See also:  GOSUB. 
  7381.  
  7382.  Usage 
  7383.  
  7384.  GOTO can only be used in batch files. 
  7385.  
  7386.  After a GOTO command in a batch file, the next line to be executed will be the 
  7387.  one immediately after the label.  The label must begin with a colon [:] and 
  7388.  appear on a line by itself. The colon is required on the line where the label 
  7389.  is defined, but is not required in the GOTO command itself.  Case differences 
  7390.  are ignored when matching labels. 
  7391.  
  7392.  This batch file fragment checks for the existence of the file CONFIG.SYS.  If 
  7393.  the file exists, the batch file jumps to C_EXISTS and copies all the files 
  7394.  from the current directory to the root directory on A:.  Otherwise, it prints 
  7395.  an error message and exits. 
  7396.  
  7397.           if exist config.sys goto C_EXISTS
  7398.           echo CONFIG.SYS doesn't exist - exiting.
  7399.           quit
  7400.           :C_EXISTS
  7401.           copy *.* a:\
  7402.  
  7403.  If the label doesn't exist, the batch file is terminated with the error 
  7404.  message "Label not found." 
  7405.  
  7406.  To avoid errors in the processing of nested statements and loops, GOTO cancels 
  7407.  all active IFF statements and DO / ENDDO loops unless you use /I.  This means 
  7408.  that a normal GOTO (without /I) may not branch to any label that is between an 
  7409.  IFF and the corresponding ENDIFF or between a DO and the corresponding ENDDO. 
  7410.  
  7411.  Options 
  7412.  
  7413.     /I:     (IFF and DO continue) Prevents GOTO from canceling IFF statements 
  7414.             and DO loops.  Use this option only if you are absolutely certain 
  7415.             that your GOTO command is branching entirely within any current IFF 
  7416.             statement and any active DO / ENDDO block.  Using /I under any 
  7417.             other conditions will cause an error later in your batch file. 
  7418.  
  7419.             You cannot branch into another IFF statement, another DO loop, or a 
  7420.             different IFF or DO nesting level, whether you use the /I option or 
  7421.             not.  If you do, you will eventually receive an "unknown command" 
  7422.             error (or execution of the UNKNOWN_CMD alias) on a subsequent 
  7423.             ENDDO, ELSE, ELSEIFF, or ENDIFF statement. 
  7424.  
  7425.  
  7426. ΓòÉΓòÉΓòÉ 14.37. HELP - Display help ΓòÉΓòÉΓòÉ
  7427.  
  7428.  Purpose:    Display help for internal commands, and optionally for external 
  7429.              commands. 
  7430.  
  7431.  Format:     HELP [topic ] 
  7432.  
  7433.              topic :  A help topic, internal command, or external command. 
  7434.  
  7435.  Usage 
  7436.  
  7437.  Online help is available for 4OS2.  The 4OS2 help system uses the OS/2 help 
  7438.  facility. 
  7439.  
  7440.  If you type the command HELP by itself (or press F1 when the command line is 
  7441.  empty), the table of contents is displayed.  If you type HELP plus a topic 
  7442.  name, that topic is displayed.  For example, 
  7443.  
  7444.           help copy
  7445.  
  7446.  displays information about the COPY command and its options. 
  7447.  
  7448.  
  7449. ΓòÉΓòÉΓòÉ 14.38. HISTORY - Manage the history list ΓòÉΓòÉΓòÉ
  7450.  
  7451.  Purpose:    Display, add to, clear, or read the history list. 
  7452.  
  7453.  Format:     HISTORY [/A command /F /P /R filename ] 
  7454.  
  7455.              /A(dd)                          /P(ause) 
  7456.              /F(ree)                         /R(ead) 
  7457.  
  7458.  See also:  LOG. 
  7459.  
  7460.  Usage 
  7461.  
  7462.  4OS2 keeps a list of the commands you have entered on the command line.  See 
  7463.  Command History and Recall for additional details. 
  7464.  
  7465.  The HISTORY command lets you view and manipulate the command history list 
  7466.  directly.  If no parameters are entered, HISTORY will display the current 
  7467.  command history list: 
  7468.  
  7469.           [c:\] history
  7470.  
  7471.  With the options explained below, you can clear the list, add new commands to 
  7472.  the list without executing them, save the list in a file, or read a new list 
  7473.  from a file. 
  7474.  
  7475.  The number of commands saved in the history list depends on the length of each 
  7476.  command line.  The history list size can be specified at startup from 256 to 
  7477.  8192 characters (see the History directive).  The default size is 1024 
  7478.  characters. 
  7479.  
  7480.  Your history list can be stored either locally (a separate history list for 
  7481.  each copy of 4OS2) or globally (all copies of 4OS2 share the same list).  For 
  7482.  full details see the discussion of local and global history lists under 
  7483.  Command History and Recall. 
  7484.  
  7485.  You can use the HISTORY command as an aid in writing batch files by 
  7486.  redirecting the HISTORY output to a file and then editing the file 
  7487.  appropriately.  However, it is easier to use the LOG /H command for this 
  7488.  purpose. 
  7489.  
  7490.  You can disable the history list or specify a minimum command-line length to 
  7491.  save with the HistMin directive in the .INI file. 
  7492.  
  7493.  Options 
  7494.  
  7495.     /A:     (Add) Add a command to the history list.  This performs the same 
  7496.             function as the Ctrl-K key at the command line (see Command History 
  7497.             and Recall). 
  7498.  
  7499.     /F:     (Free) Erase all entries in the command history list. 
  7500.  
  7501.     /P:     (Prompt) Wait for a key after displaying each page of the list. 
  7502.             Your options at the prompt are explained in detail under Page and 
  7503.             File Prompts. 
  7504.  
  7505.     /R:     (Read) Read the command history from the specified file and append 
  7506.             it to the history list currently held in memory.  Each line in the 
  7507.             file must fit within the command-line length limit). 
  7508.  
  7509.             You can save the history list by redirecting the output of HISTORY 
  7510.             to a file.  This example saves the command history to a file called 
  7511.             HISTFILE and reads it back again immediately.  If you leave out the 
  7512.             HISTORY /F command on the second line, the contents of the file 
  7513.             will be appended to the current history list instead of replacing 
  7514.             it: 
  7515.  
  7516.                                 [c:\] history > histfile
  7517.                                 [c:\] history /f
  7518.                                 [c:\] history /r histfile
  7519.  
  7520.             If you need to save your history at the end of each day's work, you 
  7521.             might use commands like this in your AUTOEXEC.BAT or other startup 
  7522.             file: 
  7523.  
  7524.                                 if exist c:\histfile history /r c:\histfile
  7525.                                 alias shut*down `history > c:\histfile`
  7526.  
  7527.             This restores the previous history list if it exists, then defines 
  7528.             an alias which will save the history before shutting off the 
  7529.             system. 
  7530.  
  7531.             If you are creating a HISTORY /R file by hand, and need to create 
  7532.             an entry that spans multiple lines in the file, you can do so by 
  7533.             terminating each line, except the last, with an escape character. 
  7534.             However, you cannot use this method to exceed the command-line 
  7535.             length limit. 
  7536.  
  7537.  
  7538. ΓòÉΓòÉΓòÉ 14.39. IF - Execute a command if a condition is true ΓòÉΓòÉΓòÉ
  7539.  
  7540.  Purpose:    Execute a command if a condition or set of conditions is true. 
  7541.  
  7542.  Format:     IF [NOT] condition [.AND. | .OR. | .XOR. [NOT] condition ...] 
  7543.              command 
  7544.  
  7545.              condition :  A test to determine if the command should be 
  7546.              executed. 
  7547.              command :  The command to execute if the condition is true. 
  7548.  
  7549.  See also:  IFF, @IF. 
  7550.  
  7551.  Usage 
  7552.  
  7553.  IF is normally used only in aliases and batch files.  It is always followed by 
  7554.  one or more conditions and then a command. First, the conditions are 
  7555.  evaluated.  If they are true, the command is executed.  Otherwise, the command 
  7556.  is ignored. If you add a NOT before a condition, the command is executed only 
  7557.  when the condition is false. 
  7558.  
  7559.  You can link conditions with .AND., .OR., or .XOR., and you can nest IF 
  7560.  statements.  The conditions can test strings, numbers, the existence of a file 
  7561.  or subdirectory, the exit code returned by the preceding external command, and 
  7562.  the existence of alias names and internal commands. 
  7563.  
  7564.  The command can be an alias, an internal command, an external command, or a 
  7565.  batch file.  The entire IF statement, including all conditions and the 
  7566.  command, must fit on one line. 
  7567.  
  7568.  You can use command grouping to execute multiple commands if the condition is 
  7569.  true.  For example, the following command tests if any .TXT files exist.  If 
  7570.  they do, they are copied to drive A: and their extensions are changed to .TXO 
  7571.  : 
  7572.  
  7573.           if exist *.txt (copy *.txt a: & ren *.txt *.txo)
  7574.  
  7575.  (Note that the IFF command provides a more structured method of executing 
  7576.  multiple commands if a condition or set of conditions is true.) 
  7577.  
  7578.  Conditions 
  7579.  
  7580.  The following conditional tests are available in both the IF and IFF commands. 
  7581.  They fit into two categories:  string and numeric tests, and status tests. 
  7582.  The tests can use environment variables, internal variables and variable 
  7583.  functions, file names, literal text, and numeric values as their arguments. 
  7584.  
  7585.  Spaces are required on either side of the test condition in all cases, except 
  7586.  == which will work with or without spaces around it. 
  7587.  
  7588.  String and Numeric Tests 
  7589.  
  7590.  Six test conditions can be used to test character strings.  The same 
  7591.  conditions are available for both numeric and normal text strings (see below 
  7592.  for details).  In each case you enter the test as: 
  7593.  
  7594.           string1 operator string2
  7595.  
  7596.  The operator defines the type of test (equal, greater than or equal, and so 
  7597.  on).  The operators are: 
  7598.  
  7599.         EQ or ==    string1 equal to string2 
  7600.         NE or !=    string1 not equal to string2 
  7601.         LT          string1 less than string2 
  7602.         LE          string1 less than or equal to string2 
  7603.         GE          string1 greater than or equal to string2 
  7604.         GT          string1 greater than string2 
  7605.  
  7606.  Status Tests 
  7607.  
  7608.  These conditions test the system or command processor status.  You can use 
  7609.  internal variables and variable functions to test many other parts of the 
  7610.  system status. 
  7611.  
  7612.     ERRORLEVEL [operator] n
  7613.         This test retrieves the exit code of the preceding external program. 
  7614.         By convention, programs return an exit code of 0 when they are 
  7615.         successful and a number between 1 and 255 to indicate an error.  The 
  7616.         condition can be any of the operators listed above (EQ, !=, GT, etc.). 
  7617.         If no operator is specified, the default is GE.  The comparison is done 
  7618.         numerically. 
  7619.  
  7620.         Not all programs return an explicit exit code.  For programs which do 
  7621.         not, the behavior of ERRORLEVEL is undefined. 
  7622.  
  7623.     EXIST filename
  7624.         If the file exists, the condition is true.  You can use wildcards in 
  7625.         the filename, in which case the condition is true if any file matching 
  7626.         the wildcard name exists. 
  7627.  
  7628.     ISALIAS aliasname
  7629.         If the name is defined as an alias, the condition is true. 
  7630.  
  7631.     ISDIR path
  7632.         If the subdirectory exists, the condition is true. 
  7633.  
  7634.     ISINTERNAL command
  7635.         If the specified command is an active internal command, the condition 
  7636.         is true.  Commands can be activated and deactivated with the SETDOS /I 
  7637.         command. 
  7638.  
  7639.  Combining Tests 
  7640.  
  7641.  You can negate the result of any test with NOT, and combine tests of any type 
  7642.  with .AND., .OR., and .XOR.  Test conditions are always scanned from left to 
  7643.  right -- there is no implied order of precedence, as there is in some 
  7644.  programming languages. 
  7645.  
  7646.  When two tests are combined with .AND., the result is true if both individual 
  7647.  tests are true.  When two tests are combined with .OR., the result is true if 
  7648.  either (or both) individual tests are true.  When two tests are combined with 
  7649.  .XOR., the result is true only if one of the tests is true and the other is 
  7650.  false. 
  7651.  
  7652.  This example runs a program called HIGHRES if either an EGA or VGA video 
  7653.  adapter is in use: 
  7654.  
  7655.           if "%_video" == "EGA" .or. "%_video" == "VGA" highres
  7656.  
  7657.  Using the IF Tests 
  7658.  
  7659.  When IF compares two character strings, it will use either a numeric 
  7660.  comparison or a string comparison.  A numeric comparison treats the strings as 
  7661.  numeric values and tests them arithmetically.  A string comparison treats the 
  7662.  strings as text. 
  7663.  
  7664.  The difference between numeric and string comparisons is best explained by 
  7665.  looking at the way two values are tested.  For example, consider comparing the 
  7666.  values 2 and 19.  Numerically, 2 is smaller, but as a string it is "larger" 
  7667.  because its first digit is larger than the first digit of 19.  So the first of 
  7668.  these condition s will be true, and the second will be false: 
  7669.  
  7670.           if 2 lt 19 ...
  7671.           if "2" lt "19" ...
  7672.  
  7673.  IF determines which kind of test to do by examining the first character of 
  7674.  each string.  If both strings begin with a numeric character (a digit, sign, 
  7675.  or decimal point), a numeric comparison is used.  If either value does not 
  7676.  begin with a numeric character, a string comparison is used.  To force a 
  7677.  string comparison when both values are or may be numeric, use double quotes 
  7678.  around the values you are testing, as shown above.  Because the double quote 
  7679.  is not a numeric character, it forces IF to do a string comparison. 
  7680.  
  7681.  Case differences are ignored in string comparisons.  If two strings begin with 
  7682.  the same text but one is shorter, the shorter string is considered to be "less 
  7683.  than" the longer one.  For example, "a" is less than "abc", and "hello_there" 
  7684.  is greater than "hello". 
  7685.  
  7686.  When you compare text strings, you should always enclose the arguments in 
  7687.  double quotes in order to avoid syntax errors which may occur if one of the 
  7688.  argument values is empty. 
  7689.  
  7690.  Numeric comparisons work with both integer and decimal values.  The values to 
  7691.  be compared must contain only numeric digits, decimal points, and an optional 
  7692.  sign (+ or -).  The number to the left of the decimal point may not exceed 
  7693.  2,147,483,648 (the maximum possible 32-bit positive integer).  The number of 
  7694.  digits to the right of the decimal point is limited only by the length of the 
  7695.  command line. 
  7696.  
  7697.  Internal variables and variable functions are very powerful when combined with 
  7698.  string and numeric comparisons.  They allow you to test the state of your 
  7699.  system, the characteristics of a file, date and time information, or the 
  7700.  result of a calculation.  You may want to review the variables and variable 
  7701.  functions when determining the best way to set up an IF test. 
  7702.  
  7703.  This first example is a batch file fragment which runs a program called 
  7704.  MONOPROG if a monochrome monitor is attached to the system: 
  7705.  
  7706.           if "%_monitor" == "mono" monoprog
  7707.  
  7708.  The second batch file fragment tests for a string value: 
  7709.  
  7710.           input "Enter your selection : " %%cmd
  7711.           if "%cmd" == "WP" goto wordproc
  7712.           if "%cmd" NE "GRAPHICS" goto badentry
  7713.  
  7714.  This example calls GO.BTM if the first two characters in the file MYFILE are 
  7715.  "GO" (enter this example on one line): 
  7716.  
  7717.           if "%@instr[0,2,%@line[myfile,0]]"=="GO"
  7718.           call go.btm
  7719.  
  7720.  This batch file fragment tests for the existence of A:\JAN.DOC before copying 
  7721.  it to drive C. 
  7722.  
  7723.           if exist a:\jan.doc copy a:\jan.doc c:\
  7724.  
  7725.  This example tests the exit code of the previous program and stops all batch 
  7726.  file processing if an error occurred: 
  7727.  
  7728.           if errorlevel==0 goto success
  7729.           echo "External Error -- Batch File Ends!"
  7730.           cancel
  7731.  
  7732.  
  7733. ΓòÉΓòÉΓòÉ 14.40. IFF - IF / THEN / ELSE conditional command execution ΓòÉΓòÉΓòÉ
  7734.  
  7735.  Purpose:    Perform IF / THEN / ELSE conditional execution of commands. 
  7736.  
  7737.  Format:     IFF [NOT] condition [.AND. | .OR. | .XOR. [NOT] condition ...] 
  7738.              THEN & commands 
  7739.              [ELSEIFF condition  THEN & commands ] ... 
  7740.              [ELSE & commands ] 
  7741.              & ENDIFF 
  7742.  
  7743.              condition :  A test to determine if the command(s) should be 
  7744.              executed. 
  7745.              commands :  One or more commands to execute if the condition(s) is 
  7746.              true.  If you use multiple commands, they must be separated by 
  7747.              command separators or be placed on separate lines of a batch file. 
  7748.  
  7749.  See also:  IF. 
  7750.  
  7751.  Usage 
  7752.  
  7753.  IFF is similar to the IF command, except that it can perform one set of 
  7754.  commands when a condition or set of conditions is true and different commands 
  7755.  when the conditions are false. 
  7756.  
  7757.  IFF can execute multiple commands when the conditions are true or false; IF 
  7758.  normally executes only one command.  IFF imposes no limit on the number of 
  7759.  commands and is generally a "cleaner" and more structured command than IF. 
  7760.  
  7761.  IFF is always followed by one or more conditions.  If they are true, the 
  7762.  commands that follow the word THEN are executed. Additional conditions can be 
  7763.  tested with ELSEIFF.  If none of these conditions are true, the commands that 
  7764.  follow the word ELSE are executed.  In both cases, after the selected commands 
  7765.  are executed, processing continues after the word ENDIFF. 
  7766.  
  7767.  If you add a NOT before the condition, the THEN commands are executed only 
  7768.  when the condition is false and the ELSE commands are executed only when the 
  7769.  condition is true. 
  7770.  
  7771.  The commands may be separated by command separators, or may be on separate 
  7772.  lines of a batch file.  You should include a command separator or a line break 
  7773.  after a THEN, before an ELSEIFF, and before and after an ELSE. 
  7774.  
  7775.  You can link conditions with .AND., .OR., or .XOR., and you can nest IFF 
  7776.  statements up to 15 levels deep.  The conditions can test strings or numbers, 
  7777.  the existence of a file or subdirectory, the errorlevel returned from the 
  7778.  preceding external command, and the existence of alias names and internal 
  7779.  commands. 
  7780.  
  7781.  See the IF command for a list of the possible conditions. 
  7782.  
  7783.  The commands can include any internal command, alias, external command, or 
  7784.  batch file. 
  7785.  
  7786.  The following batch file fragment tests the monitor type (monochrome or 
  7787.  color), and sets the appropriate colors and prompt (enter the "prompt" lines 
  7788.  on one line of the batch file): 
  7789.  
  7790.           iff "%_monitor" == "color" then
  7791.              color bright white on blue & cls
  7792.              prompt=$e[s$e[1;1f$e[41;1;37m$e[K  Path: $p$e[u$e[44;37m$n$g
  7793.           else
  7794.              prompt=$e[s$e[1;1f$e[0;7m$e[K  Path: $p$e[u$e[0m$n$g
  7795.           endiff
  7796.  
  7797.  The alias in this second example checks to see if the argument is a 
  7798.  subdirectory.  If so, the alias deletes the subdirectory's files and removes 
  7799.  it (enter this on one line): 
  7800.  
  7801.           [c:\] alias prune `iff isdir %1 then & del /sxz %1
  7802.                 & else & echo Not a directory! & endiff`
  7803.  
  7804.  Be sure to read the cautionary notes about GOTO and IFF under the GOTO command 
  7805.  before using a GOTO inside an IFF statement. 
  7806.  
  7807.  
  7808. ΓòÉΓòÉΓòÉ 14.41. INKEY - Get a character from the keyboard ΓòÉΓòÉΓòÉ
  7809.  
  7810.  Purpose:    Get a single keystroke from the user and store it in an 
  7811.              environment variable. 
  7812.  
  7813.  Format:     INKEY [/C /D /K"keys" /P /Wn /X] [prompt ] %%varname 
  7814.  
  7815.              prompt :  Optional text that is displayed as a prompt. 
  7816.              varname :  The variable that will hold the user's keystroke. 
  7817.  
  7818.              /C(lear buffer)                 /P(assword) 
  7819.              /D(igits only)                  /W(ait) 
  7820.              /K(valid keystrokes)            /X (no carriage return) 
  7821.  
  7822.  See also:  INPUT. 
  7823.  
  7824.  Usage 
  7825.  
  7826.  INKEY optionally displays a prompt.  Then it waits for a specified time or 
  7827.  indefinitely for a keystroke, and places the keystroke into an environment 
  7828.  variable.  It is normally used in batch files and aliases to get a menu choice 
  7829.  or other single-key input.  Along with the INPUT command, INKEY allows great 
  7830.  flexibility in reading input from within a batch file or alias. 
  7831.  
  7832.  If prompt text is included in an INKEY command, it is displayed while INKEY 
  7833.  waits for input. 
  7834.  
  7835.  The following batch file fragment prompts for a character and stores it in the 
  7836.  variable NUM : 
  7837.  
  7838.           inkey Enter a number from 1 to 9:  %%num
  7839.  
  7840.  INKEY reads standard input for the keystroke, so it will accept keystrokes 
  7841.  from a redirected file.  You can supply a list of valid keystrokes with the /K 
  7842.  option. 
  7843.  
  7844.  Standard keystrokes with ASCII values between 1 and 255 are stored directly in 
  7845.  the environment variable.  Extended keystrokes (for example, function keys and 
  7846.  cursor keys) are stored as a string in decimal format, with a leading @ (for 
  7847.  example, the F1 key is @59).  The Enter key is stored as an extended 
  7848.  keystroke, with the code @28.  See see the Reference Tables for a list of the 
  7849.  ASCII and extended key codes. 
  7850.  
  7851.  If you press Ctrl-C or Ctrl-Break while INKEY is waiting for a key, execution 
  7852.  of an alias will be terminated, and execution of a batch file will be 
  7853.  suspended while you are asked whether to cancel the batch jobIn a batch file 
  7854.  you can handle Ctrl-C and Ctrl-Break yourself with the ON BREAK command. 
  7855.  
  7856.  Options 
  7857.  
  7858.     /C:     (Clear buffer) Clears the keyboard buffer before INKEY accepts 
  7859.             keystrokes.  If you use this option, INKEY will ignore any 
  7860.             keystrokes which you type, either accidentally or intentionally, 
  7861.             before INKEY is ready to accept input. 
  7862.  
  7863.     /D:     (Digits only) Prevents INKEY from accepting any keystroke except a 
  7864.             digit from 0 to 9. 
  7865.  
  7866.     /K["keys"]:Specify the permissible keystrokes.  The list of valid 
  7867.             keystrokes should be enclosed in double quotes.  For alphabetic 
  7868.             keys the validity test is not case sensitive.  You can specify 
  7869.             extended keys by enclosing their names in square brackets (within 
  7870.             the quotes), for example: 
  7871.  
  7872.                                 inkey /k"ab[Alt-F10]" Enter A, B, Alt-F10 %%var
  7873.  
  7874.             See Keys and Key Names for a complete listing of the key names you 
  7875.             can use within the square brackets, and a description of the key 
  7876.             name format. 
  7877.  
  7878.             If an invalid keystroke is entered, 4OS2 will echo the keystroke if 
  7879.             possible, beep, move the cursor back one character, and wait for 
  7880.             another keystroke. 
  7881.  
  7882.     /P:     (Password) Prevents INKEY from echoing the character. 
  7883.  
  7884.     /W:     (Wait) Timeout period, in seconds, to wait for a response. If no 
  7885.             keystroke is entered by the end of the timeout period, INKEY 
  7886.             returns with the variable unchanged. You can specify /W0 to return 
  7887.             immediately if there are no keys waiting in the keyboard buffer. 
  7888.  
  7889.     /X:     (No carriage return) Prevents INKEY from displaying a carriage 
  7890.             return and line feed after the user's entry. 
  7891.  
  7892.             For example, the following batch file fragment waits up to 10 
  7893.             seconds for a character, then tests to see if a "Y" was entered: 
  7894.  
  7895.                                 set net=N
  7896.                                 inkey /K"YN" /w10 Load network (Y/N)?  %%net
  7897.                                 iff "%net" == "Y" then
  7898.                                 rem Commands to load the network go here
  7899.                                 endiff
  7900.  
  7901.  
  7902. ΓòÉΓòÉΓòÉ 14.42. INPUT - Get a string from the keyboard ΓòÉΓòÉΓòÉ
  7903.  
  7904.  Purpose:    Get a string from the keyboard and save it in an environment 
  7905.              variable. 
  7906.  
  7907.  Format:     INPUT [/C /D /E /Ln /N /P /Wn /X] [prompt ] %%varname 
  7908.  
  7909.              prompt :  Optional text that is displayed as a prompt. 
  7910.              varname :  The variable that will hold the user's input. 
  7911.  
  7912.              /C(lear buffer)                 /N(o colors) 
  7913.              /D(igits only)                  /P(assword) 
  7914.              /E(dit)                         /W(ait) 
  7915.              /L(ength)                       /X (no carriage return) 
  7916.  
  7917.  See also:  INKEY. 
  7918.  
  7919.  Usage 
  7920.  
  7921.  INPUT optionally displays a prompt.  Then it waits for a specified time or 
  7922.  indefinitely for your entry.  It places any characters you type into an 
  7923.  environment variable.  INPUT is normally used in batch files and aliases to 
  7924.  get multi-key input.  Along with the INKEY command, INPUT allows great 
  7925.  flexibility in reading user input from within a batch file or alias. 
  7926.  
  7927.  If prompt text is included in an INPUT command, it is displayed while INPUT 
  7928.  waits for input.  Standard command-line editing keys may be used to edit the 
  7929.  input string as it is entered.  If you use the /P password option, INPUT will 
  7930.  echo asterisks instead of the keys you type. 
  7931.  
  7932.  All characters entered up to, but not including, the carriage return are 
  7933.  stored in the variable. 
  7934.  
  7935.  The following batch file fragment prompts for a string and stores it in the 
  7936.  variable FNAME: 
  7937.  
  7938.           input Enter the file name:  %%fname
  7939.  
  7940.  INPUT reads standard input, so it will accept text from a re- directed file. 
  7941.  
  7942.  If you press Ctrl-C or Ctrl-Break while INPUT is waiting for input, execution 
  7943.  of an alias will be terminated, and execution of a batch file will be 
  7944.  suspended while you are asked whether to cancel the batch job.  In a batch 
  7945.  file you can handle Ctrl-C and Ctrl-Break yourself with the ON BREAK command. 
  7946.  
  7947.  Options 
  7948.  
  7949.     /C:     (Clear buffer) Clears the keyboard buffer before INPUT accepts 
  7950.             keystrokes.  If you use this option, INPUT will ignore any 
  7951.             keystrokes which you type, either accidentally or intentionally, 
  7952.             before INPUT is ready. 
  7953.  
  7954.     /D:     (Digits only) Prevents INKEY from accepting any keystroke except a 
  7955.             digit from 0 to 9. 
  7956.  
  7957.     /E:     (Edit) Allows you to edit an existing value.  If there is no 
  7958.             existing value for varname, INPUT proceeds as if /E had not been 
  7959.             used, and allows you to enter a new value. 
  7960.  
  7961.     /Ln:    (Length) Sets the maximum number of characters which INPUT will 
  7962.             accept to "n".  If you attempt to enter more than this number of 
  7963.             characters, INPUT will beep and prevent further input (you will 
  7964.             still be able to edit the characters typed before the limit was 
  7965.             reached). 
  7966.  
  7967.     /N:     (No colors) Disables the use of input colors defined in the 
  7968.             InputColors directive in 4OS2.INI, and forces INPUT to use the 
  7969.             default display colors. 
  7970.  
  7971.     /P:     (Password) Tells INPUT to echo asterisks, instead of the characters 
  7972.             you type. 
  7973.  
  7974.     /W:     (Wait) Timeout period, in seconds, to wait for a response. If no 
  7975.             keystroke is entered by the end of the timeout period, INPUT 
  7976.             returns with the variable unchanged. If you enter a key before the 
  7977.             timeout period, INPUT will wait indefinitely for the remainder of 
  7978.             the line.  You can specify /W0 to return immediately if there are 
  7979.             no keys waiting in the keyboard buffer. 
  7980.  
  7981.     /X:     (No carriage return) Prevents INPUT from displaying a carriage 
  7982.             return and line feed after the user's entry. 
  7983.  
  7984.  
  7985. ΓòÉΓòÉΓòÉ 14.43. KEYBD - Set the keyboard toggles ΓòÉΓòÉΓòÉ
  7986.  
  7987.  Purpose:    Set the state of the keyboard toggles:  Caps Lock, Num Lock, and 
  7988.              Scroll Lock. 
  7989.  
  7990.  Format:     KEYBD [/Cn /Nn /Sn] 
  7991.  
  7992.              n :  0 to turn off the toggle, or 1 to turn on the toggle. 
  7993.  
  7994.              /C(aps lock)                    /S(croll lock) 
  7995.              /N(um lock) 
  7996.  
  7997.  Usage 
  7998.  
  7999.  Most keyboards have 3 toggle keys, the Caps Lock, Num Lock, and Scroll Lock. 
  8000.  The toggle key status is usually displayed by three lights at the top right 
  8001.  corner of the keyboard. 
  8002.  
  8003.  This command lets you turn any toggle key on or off.  It is most useful in 
  8004.  batch files and aliases if you want the keys set a particular way before 
  8005.  collecting input from the user. 
  8006.  
  8007.  For example, to turn off the Num Lock and Caps Lock keys, you can use this 
  8008.  command: 
  8009.  
  8010.           [c:\] keybd /c0 /n0
  8011.  
  8012.  If you use the KEYBD command with no switches, it will display the present 
  8013.  state of the toggle keys. 
  8014.  
  8015.  In OS/2, the toggle key state is different for each session. Changes made with 
  8016.  KEYBD will affect the session in which the command is executed, but will not 
  8017.  affect other sessions. 
  8018.  
  8019.  Options 
  8020.  
  8021.     /C:     (Caps lock) Turn the Caps Lock key on or off. 
  8022.  
  8023.     /N:     (Num lock) Turn the Num Lock key on or off. 
  8024.  
  8025.     /S:     (Scroll lock) Turn the Scroll Lock key on or off. 
  8026.  
  8027.  
  8028. ΓòÉΓòÉΓòÉ 14.44. KEYS - Enable or disable the history list ΓòÉΓòÉΓòÉ
  8029.  
  8030.  Purpose:    Enable, disable, or display the history list. 
  8031.  
  8032.  Format:     KEYS [ON | OFF | LIST] 
  8033.  
  8034.  See also:  HISTORY. 
  8035.  
  8036.  Usage 
  8037.  
  8038.  This command is provided for compatibility with KEYS command in CMD.EXE, which 
  8039.  controls the history list in OS/2. The same functions are available by setting 
  8040.  the HistMin directive in the .INI file, and by using the HISTORY command. 
  8041.  
  8042.  The history list collects the commands you type for later recall, editing, and 
  8043.  viewing.  You can view the contents of the list through the history list 
  8044.  window or by typing any of the following commands: 
  8045.  
  8046.           [c:\] history
  8047.           [c:\] history /p
  8048.           [c:\] keys list
  8049.  
  8050.  The first command displays the entire history list.  The second displays the 
  8051.  entire list and pauses at the end of each full screen. The third command 
  8052.  produces the same output as the first, except that each line is numbered. 
  8053.  
  8054.  You can disable the collection and storage of commands in the history list by 
  8055.  typing: 
  8056.  
  8057.           [c:\] keys off
  8058.  
  8059.  You can turn the history back on with the command: 
  8060.  
  8061.           [c:\] keys on
  8062.  
  8063.  If you issue the KEYS command without any parameters, 4OS2 will show you the 
  8064.  current status of the history list. 
  8065.  
  8066.  KEYS also affects the way 4OS2 reads input from the keyboard.  KEYS OFF will 
  8067.  force 4OS2 into line input mode; KEYS ON will return input to the usual 
  8068.  character by character method.  See the LineInput directive, or the /L option 
  8069.  of the SETDOS command, for details on line input mode. 
  8070.  
  8071.  
  8072. ΓòÉΓòÉΓòÉ 14.45. LIST - Display a file ΓòÉΓòÉΓòÉ
  8073.  
  8074.  Purpose:    Display a file, with forward and backward paging and scrolling. 
  8075.  
  8076.  Format:     LIST [/A:[[-]rhsda] /H /S /W /X] file... 
  8077.  
  8078.              file :  A file or list of files to display. 
  8079.  
  8080.              /A:(ttribute select)            /W(rap) 
  8081.              /H(igh bit off)                 /X (heX display mode) 
  8082.              /S(tandard input) 
  8083.  
  8084.  See also:  TYPE. 
  8085.  
  8086.  File Selection 
  8087.  
  8088.  Supports extended wildcards, ranges, multiple file names, and include lists. 
  8089.  
  8090.  Usage 
  8091.  
  8092.  LIST provides a much faster and more flexible way to view a file than TYPE, 
  8093.  without the overhead of loading and using a text editor. 
  8094.  
  8095.  LIST is most often used for displaying ASCII text files.  Most other files 
  8096.  contain non-alphabetic characters and may be unreadable, except in hex mode. 
  8097.  
  8098.  For example, to display a file called MEMO.DOC : 
  8099.  
  8100.           [c:\] list memo.doc
  8101.  
  8102.  LIST uses the cursor pad to scroll through the file.  The following keys have 
  8103.  special meanings: 
  8104.  
  8105.         Space       Display the next page of the file (same as PgDn). 
  8106.         Home        Display the first page of the file. 
  8107.         End         Display the last page of the file. 
  8108.         Esc         Exit the current file. 
  8109.         Ctrl-C      Quit LIST. 
  8110.                    Scroll up one line. 
  8111.                    Scroll down one line. 
  8112.                    Scroll left 8 columns. 
  8113.                    Scroll right 8 columns. 
  8114.         Ctrl       Scroll left 40 columns. 
  8115.         Ctrl       Scroll right 40 columns. 
  8116.         F1          Display online help 
  8117.         B           Go back one file to the previous file in the current group 
  8118.                     of files. 
  8119.         F           Prompt and search for a string. 
  8120.         G           Go to a specific line, or, in hex mode, to a specific 
  8121.                     hexadecimal offset. 
  8122.         H           Toggle the "strip high bit" (/H) option. 
  8123.         I           Display information on the current file (the full name, 
  8124.                     size, date, and time). 
  8125.         N           Find next matching string. 
  8126.         P           Print the current page or the entire file. 
  8127.         W           Toggle the "line wrap" (/W) option. 
  8128.         X           Toggle the hex-mode display (/X) option. 
  8129.  
  8130.  Text searches performed with F and N are not case sensitive.  However, if the 
  8131.  display is currently in hexadecimal mode and you press F, you will be prompted 
  8132.  for whether you want to search in hexadecimal as well.  If you answer Y, you 
  8133.  should then enter the search string as a sequence of 2-digit hexadecimal 
  8134.  numbers separated by spaces, for example 41 63 65 (these are the ASCII values 
  8135.  for the string "Ace"; see ASCII for a complete list of ASCII codes). 
  8136.  Hexadecimal searches are case sensitive, and search for exactly the string you 
  8137.  enter. 
  8138.  
  8139.  You can use wildcards in the search string.  For example, you can search for 
  8140.  the string "to*day" to find the next line which contains the word "to" 
  8141.  followed by the word "day" later on the same line, or search for the numbers 
  8142.  "101" or "401" with the search string "[14]01". 
  8143.  
  8144.  LIST saves the search string used by F and N, so you can LIST multiple files 
  8145.  and search for the same string simply by pressing N in each file, or repeat 
  8146.  your search the next time you use LIST. 
  8147.  
  8148.  LIST normally allows long lines in the file to extend past the right edge of 
  8149.  the screen.  You can use the horizontal scrolling keys (see above) to view 
  8150.  text that extends beyond the screen width.  If you use the W command or /W 
  8151.  switch to wrap the display, each line is wrapped when it reaches the right 
  8152.  edge of the screen, and the horizontal scrolling keys are disabled. 
  8153.  
  8154.  If you print the file which LIST is displaying, the print format will match 
  8155.  the display format.  If you have switched to hexadecimal or wrapped mode, that 
  8156.  mode will be used for the printed output as well.  If you print in wrapped 
  8157.  mode, long lines will be wrapped at the width of the display.  If you print in 
  8158.  normal display mode without line wrap, long lines will be wrapped or truncated 
  8159.  by the printer, not by LIST. 
  8160.  
  8161.  Printed output normally goes to device LPT1.  If you wish to send the printed 
  8162.  output to another device, use the Printer directive in the .INI file. 
  8163.  
  8164.  Most of the LIST keystrokes can be reassigned with key mapping directives in 
  8165.  the .INI file . 
  8166.  
  8167.  You can set the colors used by LIST with the ListColors and ListStatBarColors 
  8168.  directives in the .INI file.  If ListColors is not used, the LIST display will 
  8169.  use the current default colors.  If ListStatBarColors is not used, the status 
  8170.  bar will use the reverse of the LIST display colors. 
  8171.  
  8172.  Options 
  8173.  
  8174.     /A:     (Attribute select) Select only those files that have the specified 
  8175.             attribute(s) set.  Preceding the attribute character with a hyphen 
  8176.             [-] will select files that do not have that attribute set.  The 
  8177.             attributes are: 
  8178.  
  8179.                  R  Read-only 
  8180.                  H  Hidden 
  8181.                  S  System 
  8182.                  D  Subdirectory 
  8183.                  A  Archive 
  8184.  
  8185.             If no attributes are listed at all (e.g., LIST /A: ...), LIST will 
  8186.             select all files and subdirectories including hidden and system 
  8187.             files.  If attributes are combined, all the specified attributes 
  8188.             must match for a file to be selected. For example, /A:RHS will 
  8189.             select only those files with all three attributes set. 
  8190.     /H:     (High bit off) Strip the high bit from each character before 
  8191.             displaying.  This is useful when displaying files created by some 
  8192.             word processors that turn on the high bit for formatting purposes. 
  8193.             You can toggle this option on and off from within LIST with the H 
  8194.             key. 
  8195.  
  8196.     /S:     (Standard input) Read from standard input rather than a file.  This 
  8197.             allows you to redirect command output and view it with LIST.  For 
  8198.             example, to use LIST to display the output of DIR: 
  8199.  
  8200.                                 [c:\] dir | list /s
  8201.  
  8202.     /W:     (Wrap) Wrap the text at the right edge of the screen.  This option 
  8203.             is useful when displaying files that don't have a carriage return 
  8204.             at the end of each line.  The horizontal scrolling keys do not work 
  8205.             when the display is wrapped.  You can toggle this option on and off 
  8206.             from within LIST with the W key. 
  8207.  
  8208.     /X      (heX mode):  Display the file in hexadecimal (hex) mode. This 
  8209.             option is useful when displaying executable files and other files 
  8210.             that contain non-text characters.  Each byte of the file is shown 
  8211.             as a pair of hex characters.  The corresponding text is displayed 
  8212.             to the right of each line of hexadecimal data.  You can toggle this 
  8213.             mode on and off from within LIST with the X key. 
  8214.  
  8215.  
  8216. ΓòÉΓòÉΓòÉ 14.46. LOADBTM - Switch a batch file's mode ΓòÉΓòÉΓòÉ
  8217.  
  8218.  Purpose:    Switch a batch file to or from BTM mode. 
  8219.  
  8220.  Format:     LOADBTM [ON | OFF] 
  8221.  
  8222.  Usage 
  8223.  
  8224.  4OS2 recognizes two kinds of batch files: .BAT or .CMD, and .BTM.  Batch files 
  8225.  executing in BTM mode run two to five times faster than in BAT or CMD mode. 
  8226.  Batch files automatically start in the mode indicated by their extension. 
  8227.  
  8228.  The LOADBTM command turns BTM mode on and off.  It can be used to switch modes 
  8229.  in either a .BAT / .CMD or .BTM file.  If you use LOADBTM with no argument, it 
  8230.  will display the current batch mode:  LOADBTM ON or LOADBTM OFF. 
  8231.  
  8232.  LOADBTM can only be used within a batch file.  It is most often used to switch 
  8233.  a .BAT file into BTM mode after memory-resident programs are loaded, or to 
  8234.  convert a .BAT or .CMD file to BTM mode without changing its extension. 
  8235.  
  8236.  Using LOADBTM to repeatedly switch modes within a batch file is not efficient. 
  8237.  In most cases the speed gained by running some parts of the file in BTM mode 
  8238.  will be more than offset by the speed lost through repeated loading of the 
  8239.  file each time BTM mode is invoked. 
  8240.  
  8241.  
  8242. ΓòÉΓòÉΓòÉ 14.47. LOG - Save a log of commands ΓòÉΓòÉΓòÉ
  8243.  
  8244.  Purpose:    Save a log of commands to a disk file. 
  8245.  
  8246.  Format:     LOG [/H /W file ] [ON | OFF | text ] 
  8247.  
  8248.              file :  The name of the file to hold the log. 
  8249.              text :  An optional message that will be added to the log. 
  8250.  
  8251.              /H(istory log)                  /W(rite to). 
  8252.  
  8253.  See also:  HISTORY. 
  8254.  
  8255.  Usage 
  8256.  
  8257.  LOG keeps a record of all internal and external commands you use. Each entry 
  8258.  includes the current system date and time, along with the actual command after 
  8259.  any alias or variable expansion.  You can use the log file as a record of your 
  8260.  daily activities. 
  8261.  
  8262.  LOG with the /H option keeps a similar record, but it does not record the date 
  8263.  and time for each command.  In addition, it records commands before aliases 
  8264.  and variables are expanded. 
  8265.  
  8266.  By default, LOG writes to the file 4OS2LOG in the root directory of the boot 
  8267.  drive.  The default file name for LOG /H is 4OS2HLOG. 
  8268.  
  8269.  Entering LOG or LOG /H with no parameters displays the name of the log file 
  8270.  and the log status (ON or OFF): 
  8271.  
  8272.           [c:\] log
  8273.           LOG (C:\4OS2LOG) is OFF
  8274.  
  8275.  To enable or disable logging, add the word "ON" or "OFF" after the LOG 
  8276.  command: 
  8277.  
  8278.           [c:\] log on
  8279.  
  8280.  or 
  8281.  
  8282.           [c:\] log /h on
  8283.  
  8284.  Entering LOG or LOG /H with text writes a message to the log file, even if 
  8285.  logging  is set OFF.  This allows you to enter headers in the log file: 
  8286.  
  8287.           [c:\] log "Started work on the database system"
  8288.  
  8289.  The LOG file format looks like this: 
  8290.  
  8291.           [mm-dd-yy  hh:mm:ss]  command
  8292.  
  8293.  The LOG /H output can be used as the basis for writing batch files. Start LOG 
  8294.  /H, then execute the commands that you want the batch file to execute.  When 
  8295.  you are finished, turn LOG /H off.  The resulting file can be turned into a 
  8296.  batch file that performs the same commands with little or no editing. 
  8297.  
  8298.  You can have both a regular log (with time and date stamping) and a history 
  8299.  log (without the time stamps) enabled simultaneously. 
  8300.  
  8301.  Options 
  8302.  
  8303.     /H:     (History log) This option turns on (or off) the history log, which 
  8304.             saves commands without the time and date stamp.  For example, to 
  8305.             turn on history logging and write to the file C:\LOG\HLOG: 
  8306.  
  8307.                                 [c:\]  log /h /w c:\log\hlog
  8308.  
  8309.     /W:     (Write) This switch specifies a different filename for the LOG or 
  8310.             LOG /H output.  It also automatically performs a LOG ON command. 
  8311.             For example, to turn logging on and write the log to C:\LOG\LOGFILE 
  8312.             : 
  8313.  
  8314.                                 [c:\] log /w c:\log\logfile
  8315.  
  8316.             Once you select a new file name with the LOG /W or LOG /H/W 
  8317.             command, LOG will use that file until you issue another LOG /W or 
  8318.             LOG /H/W command, or until you reboot your computer.  Turning LOG 
  8319.             or LOG /H off or on does not change the file name.  You can set the 
  8320.             default log file names when 4OS2 starts with the LogName and 
  8321.             HistLogName directives in the .INI file. 
  8322.  
  8323.  
  8324. ΓòÉΓòÉΓòÉ 14.48. MD - Create a subdirectory ΓòÉΓòÉΓòÉ
  8325.  
  8326.  Purpose:    Create a subdirectory. 
  8327.  
  8328.  Format:     MD [/S] pathname... 
  8329.                 or 
  8330.              MKDIR [/S] pathname... 
  8331.  
  8332.              pathname :  The name of one or more directories to create. 
  8333.  
  8334.              /S(ubdirectories) 
  8335.  
  8336.  See also:  RD. 
  8337.  
  8338.  Usage 
  8339.  
  8340.  MD and MKDIR are synonyms.  You can use either one. 
  8341.  
  8342.  MD creates a subdirectory anywhere in the directory tree.  To create a 
  8343.  subdirectory from the root, start the pathname with a backslash [\].  For 
  8344.  example, this command creates a subdirectory called MYDIR in the root 
  8345.  directory: 
  8346.  
  8347.           [c:\] md \mydir
  8348.  
  8349.  If no path is given, the new subdirectory is created in the current directory. 
  8350.  This example creates a subdirectory called DIRTWO in the current directory: 
  8351.  
  8352.           [c:\mydir] md dirtwo
  8353.  
  8354.  To create a directory from the parent of the current directory (that is, to 
  8355.  create a sibling of the current directory), start the pathname with two 
  8356.  periods and a backslash [..\]. 
  8357.  
  8358.  Option 
  8359.  
  8360.     /S:     (Subdirectories) MD creates one directory at a time unless you use 
  8361.             the /S option.  If you need to create the directory 
  8362.             C:\ONE\TWO\THREE and none of the named directories exist, you can 
  8363.             use /S to have MD create all of the necessary subdirectories for 
  8364.             you in a single command: 
  8365.  
  8366.                                 [c:\] md /s \one\two\three
  8367.  
  8368.  
  8369. ΓòÉΓòÉΓòÉ 14.49. MEMORY - Display memory statistics ΓòÉΓòÉΓòÉ
  8370.  
  8371.  Purpose:    Display the amount and status of system RAM. 
  8372.  
  8373.  Format:     MEMORY 
  8374.  
  8375.  Usage 
  8376.  
  8377.  MEMORY lists the total physical and resident RAM in your system, the largest 
  8378.  free block of RAM, the total size of your swap file, the total and free 
  8379.  environment and alias space, and the total history space.  (The first two RAM 
  8380.  size values are displayed by 4OS2/32, but not by 4OS2/16.) 
  8381.  
  8382.  
  8383. ΓòÉΓòÉΓòÉ 14.50. MOVE - Move files ΓòÉΓòÉΓòÉ
  8384.  
  8385.  Purpose:    Move files to a new directory and drive. 
  8386.  
  8387.  Format:     MOVE  [/A:[[-]rhsda] /C /D /F /H /M /N /P /Q /R /S /T /U /V] 
  8388.              source...  destination 
  8389.  
  8390.              source :  A file or list of files to move. 
  8391.              destination :  The new location for the files. 
  8392.  
  8393.              /A:(ttribute select)            /P(rompt) 
  8394.              /C(hanged)                      /Q(uiet) 
  8395.              /D(irectory)                    /R(eplace) 
  8396.              /F(orce delete)                 /S(ubdirectory tree) 
  8397.              /H(idden and system)            /T(otal) 
  8398.              /M(odified files)               /U(pdate) 
  8399.              /N(othing)                      /V(erify) 
  8400.  
  8401.  See also:  COPY and RENAME. 
  8402.  
  8403.  File Selection 
  8404.  
  8405.  Supports extended wildcards, ranges, multiple file names, and include lists. 
  8406.  Date, time, or size ranges anywhere on the line apply to all source files. 
  8407.  
  8408.  Usage 
  8409.  
  8410.  The MOVE command moves one or more files from one directory to another, 
  8411.  whether the directories are on the same drive or not.  It has the same effect 
  8412.  as copying the files to a new location and then deleting the originals.  Like 
  8413.  COPY and RENAME, MOVE works with single files, multiple files, and sets of 
  8414.  files specified with an include list. 
  8415.  
  8416.  The simplest MOVE command moves a single source file to a new location and, 
  8417.  optionally, gives it a new name.  These two examples both move one file from 
  8418.  drive C: to the root directory on drive A: 
  8419.  
  8420.           [c:\] move myfile.dat a:\
  8421.           [c:\] move myfile.dat a:\savefile.dat
  8422.  
  8423.  In both cases, MYFILE.DAT is removed from drive C: after it has been copied to 
  8424.  drive A:.  If a file called MYFILE.DAT in the first example, or SAVEFILE.DAT 
  8425.  in the second example, already existed on drive A:, it would be overwritten. 
  8426.  (This demonstrates the difference between MOVE and RENAME.  MOVE will move 
  8427.  files between drives and will overwrite the destination file if it exists; 
  8428.  RENAME will not.) 
  8429.  
  8430.  If you MOVE multiple files, the destination must be a directory name.  MOVE 
  8431.  will move each file into the destination directory with its original name (if 
  8432.  the target is not a directory, MOVE will display an error message and exit): 
  8433.  
  8434.           [c:\] move *.wks *.txt c:\finance\myfiles
  8435.  
  8436.  You cannot move a file to a character device like the printer, or to itself. 
  8437.  
  8438.  When you move files to another directory, if you add a backslash [\] to the 
  8439.  end of the destination name MOVE will display an error message if the name 
  8440.  does not refer to an existing directory. You can use this feature to keep MOVE 
  8441.  from treating a mistyped destination directory name as a file name, and 
  8442.  attempting to move all source files to that name.  The /D option performs the 
  8443.  same function but will also prompt to see if you want to create the 
  8444.  destination directory if it doesn't exist. 
  8445.  
  8446.  Be careful when you use MOVE with the SELECT command.  If you SELECT multiple 
  8447.  files and the target is not a directory (for example, because of a 
  8448.  misspelling), MOVE will assume it is a file name.  In this case each file will 
  8449.  be moved in turn to the target file, overwriting the previous file, and then 
  8450.  the original will be erased before the next file is moved.  At the end of the 
  8451.  command, all of the original files will have been erased and only the last 
  8452.  file will exist as the target file.  You can avoid this problem by using 
  8453.  square brackets with SELECT instead of parentheses (be sure that you don't 
  8454.  allow the command line to get too long -- watch the character count in the 
  8455.  upper left corner while you're selecting files).  MOVE will then receive one 
  8456.  list of files to move instead of a series of individual filenames, and it will 
  8457.  detect the error and halt.  You can also add a backslash [\] to the end of the 
  8458.  destination name to ensure that it is the name of a subdirectory (see above). 
  8459.  
  8460.  MOVE first attempts to rename the file(s), which is the fastest way to move 
  8461.  files between subdirectories on the same drive.  If that fails (the 
  8462.  destination is on a different drive or already exists), MOVE will copy the 
  8463.  file(s) and then delete the originals. 
  8464.  
  8465.  If MOVE must physically copy the files and delete the originals, rather than 
  8466.  renaming them (see above), then some disk space may be freed on the source 
  8467.  drive.  The free space may be the result of moving the files to another drive, 
  8468.  or of overwriting a larger destination file with a smaller source file.  MOVE 
  8469.  displays the amount of disk space recovered unless the /Q option is used (see 
  8470.  below).  It does so by comparing the amount of free disk space before and 
  8471.  after the MOVE command is executed.  However, this amount may be incorrect if 
  8472.  you are using a deletion tracking system which stores deleted files in a 
  8473.  hidden directory, or if, under a multitasking system, another program performs 
  8474.  a file operation while the MOVE command is executed. 
  8475.  
  8476.  When physically copying files, MOVE preserves the hidden, system, and 
  8477.  read-only attributes of the source files, and sets the archive attribute of 
  8478.  the destination files.  However, if the files can be renamed, and no copying 
  8479.  is required, then the source file attributes are not changed. 
  8480.  
  8481.  Options 
  8482.  
  8483.     /A:     (Attribute select) Select only those files that have the specified 
  8484.             attribute(s) set.  Preceding the attribute character with a hyphen 
  8485.             [-] will select files that do not have that attribute set.  The 
  8486.             attributes are: 
  8487.  
  8488.                  R  Read-only 
  8489.                  H  Hidden 
  8490.                  S  System 
  8491.                  D  Subdirectory 
  8492.                  A  Archive 
  8493.  
  8494.             If no attributes are listed at all (e.g., MOVE /A: ...), MOVE will 
  8495.             select all files and subdirectories including hidden and system 
  8496.             files.  If attributes are combined, all the specified attributes 
  8497.             must match for a file to be selected. For example, /A:RHS will 
  8498.             select only those files with all three attributes set. 
  8499.  
  8500.     /C:     (Changed files) Move files only if the destination file exists and 
  8501.             is older than the source (see also /U).  This option is useful for 
  8502.             updating the files in one directory from those in another without 
  8503.             moving any newly-created files. 
  8504.  
  8505.     /D:     (Directory) Requires that the destination be a directory.  If the 
  8506.             destination does not exist, MOVE will prompt to see if you want to 
  8507.             create it. If the destination exists as a file, MOVE will fail with 
  8508.             an "Access denied" error.  Use this option to avoid having MOVE 
  8509.             accidentally interpret your destination name as a file name when 
  8510.             it's really a mistyped directory name. 
  8511.  
  8512.     /F:     (Force delete) This option only works in the 32-bit version of 
  8513.             4OS2.  It forces deletion of the source file without saving it to 
  8514.             the DELDIR directory (if DELDIR is not in use, /F has no effect). 
  8515.  
  8516.     /H:     (Hidden) Move all files, including hidden and system files. 
  8517.  
  8518.     /M:     (Modified files) Move only files that have the archive bit set. The 
  8519.             archive bit will remain set after the MOVE; to clear it use ATTRIB. 
  8520.  
  8521.     /N:     (Nothing) Do everything except actually move the file(s). This 
  8522.             option is most useful for testing what a complex MOVE command will 
  8523.             do. 
  8524.  
  8525.     /P:     (Prompt) Prompt the user to confirm each move.  Your options at the 
  8526.             prompt are explained in detail under Page and File Prompts. 
  8527.  
  8528.     /Q:     (Quiet) Don't display filenames, the total number of files moved, 
  8529.             or the amount of disk space recovered, if any.  This option is most 
  8530.             often used in batch files. See also /T. 
  8531.  
  8532.     /R:     (Replace) Prompt for a Y or N response before overwriting an 
  8533.             existing destination file. 
  8534.  
  8535.     /S:     (Subdirectories) Move an entire subdirectory tree to another 
  8536.             location.  MOVE will attempt to create the destination directories 
  8537.             if they don't exist, and will remove empty subdirectories after the 
  8538.             move. When /D is used with /S, you will be prompted if the first 
  8539.             destination directory does not exist, but subdirectories below that 
  8540.             will be created automatically by MOVE.  If you attempt to use /S to 
  8541.             move a subdirectory tree into part of itself, MOVE will display an 
  8542.             error message and halt. 
  8543.  
  8544.     /T:     (Total) Don't display filenames as they are moved, but display the 
  8545.             total number of files deleted and the amount of free disk space 
  8546.             recovered, if any. 
  8547.  
  8548.     /U:     (Update) Move each source file only if it is newer than a matching 
  8549.             destination file or if a matching destination file does not exist 
  8550.             (also see /C).  This option is useful for moving new or changed 
  8551.             files from one directory to another. 
  8552.  
  8553.     /V:     (Verify) Verify each disk write.  This is the same as executing the 
  8554.             VERIFY ON command, but is only active during the MOVE.  /V does not 
  8555.             read back the file and compare its contents with what was written; 
  8556.             it only verifies that the data written to disk is physically 
  8557.             readable. 
  8558.  
  8559.  
  8560. ΓòÉΓòÉΓòÉ 14.51. ON - Handle Ctrl-Break and errors in batch files ΓòÉΓòÉΓòÉ
  8561.  
  8562.  Purpose:    Execute a command in a batch file when a specific condition 
  8563.              occurs. 
  8564.  
  8565.  Format:     ON BREAK [command ] 
  8566.                 or 
  8567.              ON ERROR [command ] 
  8568.  
  8569.  Usage 
  8570.  
  8571.  ON can only by used in batch files. 
  8572.  
  8573.  ON sets a "watchdog" that remains in effect for the duration of the current 
  8574.  batch file.  Whenever a BREAK or ERROR condition occurs after ON has been 
  8575.  executed, the command is automatically executed. 
  8576.  
  8577.  ON BREAK will execute its command if the user presses Ctrl- C or Ctrl-Break. 
  8578.  
  8579.  ON ERROR will execute its command after any command processor or operating 
  8580.  system error (including critical errors). That is, ON ERROR will detect errors 
  8581.  such as a disk write error, and 4OS2 errors such as a COPY command that fails 
  8582.  to copy any files, or the use of an unacceptable command option. 
  8583.  
  8584.  ON BREAK and ON ERROR are independent of each other.  You can use either one, 
  8585.  or both, in any batch file. 
  8586.  
  8587.  Each time ON BREAK or ON ERROR is used, it defines a new command to be 
  8588.  executed for a break or error, and any old command is discarded.  If you use 
  8589.  ON BREAK or ON ERROR with no following command, that type of error handling is 
  8590.  disabled. Error handling is also automatically disabled when the batch file 
  8591.  exits. 
  8592.  
  8593.  ON BREAK and ON ERROR only affect the current batch file.  If you CALL another 
  8594.  batch file, the first batch file's error handling is suspended, and the CALLed 
  8595.  file must define its own error handling. When control returns to the first 
  8596.  batch file, its error handling is reactivated. 
  8597.  
  8598.  The command can be any command that can be used on a batch file line by 
  8599.  itself.  Frequently, it is a GOTO or GOSUB command.  For example, the 
  8600.  following fragment traps any user attempt to end the batch file by pressing 
  8601.  Ctrl-C or Ctrl-Break.  It scolds the user for trying to end the batch file and 
  8602.  then continues displaying the numbers from 1 to 1000: 
  8603.  
  8604.           on break gosub gotabreak
  8605.           do i = 1 to 1000
  8606.              echo %i
  8607.           enddo
  8608.           quit
  8609.           :gotabreak
  8610.           echo Hey!  Stop that!!
  8611.           return
  8612.  
  8613.  You can use a command group as the command if you want to execute multiple 
  8614.  commands, for example: 
  8615.  
  8616.           on break (echo Oops, got a break! & quit)
  8617.  
  8618.  ON BREAK and ON ERROR always assume that you want to continue executing the 
  8619.  batch file.  After the command is executed, control automatically returns to 
  8620.  the next command in the batch file (the command after the one that was 
  8621.  interrupted by the break or error).  The only way to avoid continuing the 
  8622.  batch file after a break or error is for the command to transfer control to 
  8623.  another point with GOTO, end the batch file with QUIT or CANCEL, or start 
  8624.  another batch file (without CALLing it). 
  8625.  
  8626.  When handling an error condition with ON ERROR, you may find it useful to use 
  8627.  internal variables, particularly %_? and %_SYSERR, to help determine the cause 
  8628.  of the error. 
  8629.  
  8630.  Caution:  If a break or error occurs while the command specified in ON BREAK 
  8631.  or ON ERROR is executing, the command will be restarted. This means you must 
  8632.  use caution to avoid or handle any possible errors in the commands invoked by 
  8633.  ON ERROR, since such errors can cause an infinite loop. 
  8634.  
  8635.  
  8636. ΓòÉΓòÉΓòÉ 14.52. PATH - Set the executable file search path ΓòÉΓòÉΓòÉ
  8637.  
  8638.  Purpose:    Display or alter the list of directories that 4OS2 will search for 
  8639.              executable files, batch files, and files with executable 
  8640.              extensions that are not in the current directory. 
  8641.  
  8642.  Format:     PATH [directory [;directory...]] 
  8643.  
  8644.              directory :  The full name of a directory to include in the path 
  8645.              setting. 
  8646.  
  8647.  See also:  ESET and SET. 
  8648.  
  8649.  Usage 
  8650.  
  8651.  When 4OS2 is asked to execute an external command (a .COM, .EXE, .BTM, .BAT, 
  8652.  or .CMD file or executable extension), it first looks for the file in the 
  8653.  current directory. If it fails to find an executable file there, it then 
  8654.  searches each of the directories specified in the PATH setting. 
  8655.  
  8656.  For example, after the following PATH command, 4OS2 will search for an 
  8657.  executable file in four directories:  the current directory, then the root 
  8658.  directory on drive C, then the DOS subdirectory on C, and then the UTIL 
  8659.  subdirectory on C: 
  8660.  
  8661.           [c:\] path c:\;c:\dos;c:\util
  8662.  
  8663.  The list of directories to search can be set or viewed with the PATH command. 
  8664.  The list is stored as an environment string, and can also be set or viewed 
  8665.  with SET, and edited with ESET. 
  8666.  
  8667.  Directory names in the path must be separated by semicolons [;].  Each 
  8668.  directory name is shifted to upper case to maintain compatibility with 
  8669.  programs which can only recognize upper case directory names in the path.  If 
  8670.  you modify your path with the SET or ESET command, you may include directory 
  8671.  names in lower case.  These may cause trouble with some programs, which assume 
  8672.  that all path entries have been shifted to upper case. 
  8673.  
  8674.  If you enter PATH with no parameters, the current path is displayed: 
  8675.  
  8676.           [c:\] path
  8677.           PATH=C:\;C:\DOS;C:\UTIL
  8678.  
  8679.  Entering PATH and a semicolon clears the search path so that only the current 
  8680.  directory is searched for executable files (this is the default at system 
  8681.  startup). 
  8682.  
  8683.  Some applications also use the PATH to search for their data files. 
  8684.  
  8685.  If you include an explicit file extension on a command name (for example, 
  8686.  WP.EXE ), the search will find files with that name and extension in the 
  8687.  current directory and every directory in the path. It will not locate other 
  8688.  executable files with the same base name. 
  8689.  
  8690.  If you have an entry in the path which consists of a single period [.], the 
  8691.  current directory will not be searched first, but instead will be searched 
  8692.  when 4OS2 reaches the "." in the path. This allows you to delay the search of 
  8693.  the current directory for executable files and files with executable 
  8694.  extensions.  In rare cases, this feature may not be compatible with 
  8695.  applications which use the path to find their files; if you experience a 
  8696.  problem, you will have to remove the "." from the path while using any such 
  8697.  application. 
  8698.  
  8699.  To create a path longer than the command-line length limit, use PATH 
  8700.  repeatedly to append additional directories to the path: 
  8701.  
  8702.           path [first list of directories]
  8703.           path %path;[second list of directories]
  8704.           ...
  8705.  
  8706.  You cannot use this method to extend the path beyond 2042 characters (the 
  8707.  internal buffer limit, with room for "PATH ").  It is usually more efficient 
  8708.  to use aliases to load application programs than to create a long PATH.  See 
  8709.  ALIAS for details. 
  8710.  
  8711.  If you specify an invalid directory in the path, it will be skipped and the 
  8712.  search will continue with the next directory in the path. 
  8713.  
  8714.  
  8715. ΓòÉΓòÉΓòÉ 14.53. PAUSE - Suspend batch file or alias execution ΓòÉΓòÉΓòÉ
  8716.  
  8717.  Purpose:    Suspend batch file or alias execution. 
  8718.  
  8719.  Format:     PAUSE [text ] 
  8720.  
  8721.              text :  The message to be displayed as a user prompt. 
  8722.  
  8723.  Usage 
  8724.  
  8725.  A PAUSE command will suspend execution of a batch file or alias, giving you 
  8726.  the opportunity to change disks, turn on the printer, etc. 
  8727.  
  8728.  PAUSE waits for any key to be pressed and then continues execution. You can 
  8729.  specify the text that PAUSE displays while it waits for a keystroke, or let 
  8730.  4OS2 use the default message: 
  8731.  
  8732.           Press any key when ready...
  8733.  
  8734.  For example, the following batch file fragment prompts the user before erasing 
  8735.  files: 
  8736.  
  8737.           pause Press Ctrl-C to abort, any other key to erase all .LST files
  8738.           erase *.lst
  8739.  
  8740.  If you press Ctrl-C or Ctrl-Break while PAUSE is waiting for a key, execution 
  8741.  of an alias will be terminated, and execution of a batch file will be 
  8742.  suspended while you are asked whether to cancel the batch job.  In a batch 
  8743.  file you can handle Ctrl-C and Ctrl-Break yourself with the ON BREAK command. 
  8744.  
  8745.  
  8746. ΓòÉΓòÉΓòÉ 14.54. POPD - Restore the disk drive and directory ΓòÉΓòÉΓòÉ
  8747.  
  8748.  Purpose:    Return to the disk drive and directory at the top of the directory 
  8749.              stack.. 
  8750.  
  8751.  Format:     POPD [*] 
  8752.  
  8753.  See also:  DIRS and PUSHD. 
  8754.  
  8755.  Usage 
  8756.  
  8757.  Each time you use the PUSHD command, it saves the current disk drive and 
  8758.  directory on the internal directory stack.  POPD restores the last drive and 
  8759.  directory that was saved with PUSHD and removes that entry from the stack. 
  8760.  You can use these commands together to change directories, perform some work, 
  8761.  and return to the starting drive and directory. 
  8762.  
  8763.  Directory changes made with POPD are recorded for display in the directory 
  8764.  history window. 
  8765.  
  8766.  This example saves and changes the current disk drive and directory with 
  8767.  PUSHD, and then restores it.  The current directory is shown in the prompt: 
  8768.  
  8769.           [c:\] pushd d:\database\test
  8770.           [d:\database\test] popd
  8771.           [c:\]
  8772.  
  8773.  You can use the DIRS command to see the complete list of saved drives and 
  8774.  directories (the directory stack). 
  8775.  
  8776.  The POPD command followed by an asterisk [*] clears the directory stack 
  8777.  without changing the current drive and directory. 
  8778.  
  8779.  If the directory on the top of the stack is not on the current drive, POPD 
  8780.  will switch to the drive and directory on the top of the stack without 
  8781.  changing the default directory on the current drive. 
  8782.  
  8783.  
  8784. ΓòÉΓòÉΓòÉ 14.55. PROMPT - Change the command-line prompt ΓòÉΓòÉΓòÉ
  8785.  
  8786.  Purpose:    Change the command-line prompt. 
  8787.  
  8788.  Format:     PROMPT [text ] 
  8789.  
  8790.              text :  Text to be used as the new command-line prompt. 
  8791.  
  8792.  Usage 
  8793.  
  8794.  You can change and customize the command-line prompt at any time. The prompt 
  8795.  can include normal text, and system information such as the current drive and 
  8796.  directory, the time and date, and the amount of memory available.  You can 
  8797.  create an informal "Hello, Bob!" prompt or an official-looking prompt full of 
  8798.  impressive information. The prompt text can contain special commands in the 
  8799.  form $?, where ? is one of the characters listed below: 
  8800.  
  8801.         b     The vertical bar character [|]. 
  8802.         c     The open parenthesis [(]. 
  8803.         d     Current date, in the format:  Fri  1-06-95 (the month, day, and 
  8804.               year are formatted according to your current country settings). 
  8805.         D     Current date, in the format:  Fri  Jan 6, 1995. 
  8806.         e     The ASCII ESC character (decimal 27). 
  8807.         f     The close parenthesis [)]. 
  8808.         g     The > character. 
  8809.         h     Backspace over the previous character. 
  8810.         i     Display the OS/2 prompt header line, which reminds you of how to 
  8811.               return to the OS/2 desktop, or get help. 
  8812.         l     The < character. 
  8813.         m     Time in hours and minutes using 24-hour format:  16:07 
  8814.         M     Time in hours and minutes using the default country format and 
  8815.               retaining "a" or "p", e.g. 4:07p. 
  8816.         n     Current drive letter. 
  8817.         p     Current directory on drive d: (including drive letter), in lower 
  8818.               case. 
  8819.         P     Current directory on drive d: (including drive letter), in upper 
  8820.               case. 
  8821.         q     The = character. 
  8822.         r     The numeric exit code of the last external command. 
  8823.         s     The space character. 
  8824.         t     Current 24-hour time, in the format hh:mm:ss. 
  8825.         T     Current 12-hour time, in the format hh:mm:ss[a|p]. 
  8826.         v     Operating system version number, in the format 3.10. 
  8827.         xd:   Current directory on drive d:, in lower case (uses the actual 
  8828.               case of the directory name as stored on the disk for HPFS 
  8829.               drives). 
  8830.         Xd:   Current directory on drive d:, in upper case. 
  8831.         z     Current shell nesting level; the primary command processor is 
  8832.               shell 0. 
  8833.         $     The $ character. 
  8834.         _     CR/LF (go to beginning of a new line). 
  8835.  
  8836.  For example, to set the prompt to the current date and time, with a ">" at the 
  8837.  end: 
  8838.  
  8839.           [c:\] prompt $d $t $g
  8840.           Fri  Dec 2, 1994 10:29:19 >
  8841.  
  8842.  To set the prompt to the current date and time, followed by the current drive 
  8843.  and directory in upper case on the next line, with a ">" at the end: 
  8844.  
  8845.           [c:\] prompt $d $t$_$P$g
  8846.           Fri  Dec 2, 1994 10:29:19
  8847.           [c:\]
  8848.  
  8849.  The 4OS2 prompt can be set in CONFIG.SYS (see below), and the prompt for any 
  8850.  command processor can be set in 4START, or in any batch file that runs when 
  8851.  4OS2 starts. 
  8852.  
  8853.  The 4OS2 default prompt is [$n] (drive name in square brackets) on floppy 
  8854.  drives, and [$p] (current drive and directory in square brackets) on all other 
  8855.  drives.  When OS/2 is installed, it inserts a SET PROMPT statement in 
  8856.  CONFIG.SYS to set the prompt to $i[$p].  This prompt will override the 4OS2 
  8857.  defaults.  The $i adds a header line to the default prompt to remind you of 
  8858.  certain OS/2 keystrokes.  You must delete this statement if you want to use 
  8859.  the default prompt. 
  8860.  
  8861.  If you enter PROMPT with no arguments, the prompt will be reset to its default 
  8862.  value.  The PROMPT command sets the environment variable PROMPT, so to view 
  8863.  the current prompt setting use the command: 
  8864.  
  8865.           [c:\] set prompt
  8866.  
  8867.  (If the prompt is not set at all, the PROMPT environment variable will not be 
  8868.  used, in which case the SET command above will give a "Not in environment" 
  8869.  error.) 
  8870.  
  8871.  Along with literal text, special characters, and ANSI sequences you can 
  8872.  include the text of any environment variable, internal variable, or variable 
  8873.  function in a prompt.  For example, if you want to include the size of the 
  8874.  largest free memory block in the command prompt, plus the current drive and 
  8875.  directory, you could use this command: 
  8876.  
  8877.           [c:\] prompt (%%@dosmem[K]K) $p$g
  8878.           (601K) [c:\data]
  8879.  
  8880.  Notice that the @DOSMEM function is shown with two leading percent signs [%]. 
  8881.  If you used only one percent sign, the @DOSMEM function would be expanded once 
  8882.  when the PROMPT command was executed, instead of every time the prompt is 
  8883.  displayed.  As a result, the amount of memory would never change from the 
  8884.  value it had when you entered the PROMPT command.  You can also use back 
  8885.  quotes to delay expanding the variable function until the prompt is displayed: 
  8886.  
  8887.           [c:\] prompt `(%@dosmem[K]K) $p$g`
  8888.  
  8889.  You can include ANSI escape sequences in the PROMPT text.  See ANSI for 
  8890.  complete details on ANSI commands.  This example uses ANSI sequences to set a 
  8891.  prompt that displays the shell level, date, time and path in color on the top 
  8892.  line of the screen (enter the command as one line): 
  8893.  
  8894.           [c:\] prompt $e[s$e[1;1f$e[41;1;37m$e[K[$z] $d
  8895.                 Time: $t$h$h$h  Path: $p$e[u$e[0;32m$n$g
  8896.  
  8897.  You may find it helpful to define a different prompt in secondary shells, 
  8898.  perhaps including $z in the prompt to display the shell level.  To do so, 
  8899.  place a PROMPT command in your 4START file and use IF or IFF statements to set 
  8900.  the appropriate prompt for different shells. 
  8901.  
  8902.  
  8903. ΓòÉΓòÉΓòÉ 14.56. PUSHD - Save the disk drive and directory ΓòÉΓòÉΓòÉ
  8904.  
  8905.  Purpose:    Save the current disk drive and directory, optionally changing to 
  8906.              a new drive and directory. 
  8907.  
  8908.  Format:     PUSHD [pathname ] 
  8909.  
  8910.              pathname :  The name of the new default drive and directory. 
  8911.  
  8912.  See also:  DIRS, POPD and the CDPATH environment variable. 
  8913.  
  8914.  Usage 
  8915.  
  8916.  PUSHD saves the current drive and directory on a "last in, first out" 
  8917.  directory stack.  The POPD command returns to the last drive and directory 
  8918.  that was saved by PUSHD.  You can use these commands together to change 
  8919.  directories, perform some work, and return to the starting drive and 
  8920.  directory.  The DIRS command displays the contents of the directory stack. 
  8921.  
  8922.  To save the current drive and directory, without changing directories, use the 
  8923.  PUSHD command by itself, with no pathname. 
  8924.  
  8925.  If a pathname is specified as part of the PUSHD command, the current drive and 
  8926.  directory are saved and PUSHD changes to the specified drive and directory. 
  8927.  If the pathname includes a drive letter, PUSHD changes to the specified 
  8928.  directory on the new drive without changing the current directory on the 
  8929.  original drive. 
  8930.  
  8931.  This example saves the current directory and changes to C:\WORDP\MEMOS, then 
  8932.  returns to the original directory: 
  8933.  
  8934.           [c:\] pushd \wordp\memos
  8935.           [c:\wordp\memos] popd
  8936.           [c:\]
  8937.  
  8938.  Directory changes made with PUSHD are recorded for display in the directory 
  8939.  history window. 
  8940.  
  8941.  The directory stack can hold up to 255 characters, or about 10 to 20 entries 
  8942.  (depending on the length of the names).  If you exceed this limit, the oldest 
  8943.  entry is removed before adding a new entry. 
  8944.  
  8945.  If PUSHD can't change directly to the specified directory, it will look for 
  8946.  the CDPATH variable; see CDPATH for details. 
  8947.  
  8948.  
  8949. ΓòÉΓòÉΓòÉ 14.57. QUIT - Terminate a batch file ΓòÉΓòÉΓòÉ
  8950.  
  8951.  Purpose:    Terminate the current batch file. 
  8952.  
  8953.  Format:     QUIT [value ] 
  8954.  
  8955.              value :  The exit code from 0 to 255 to return to 4OS2 or to the 
  8956.              previous batch file. 
  8957.  
  8958.  See also:  CANCEL. 
  8959.  
  8960.  Usage 
  8961.  
  8962.  QUIT provides a simple way to exit a batch file before reaching the end of the 
  8963.  file.  If you QUIT a batch file called from another batch file, you will be 
  8964.  returned to the previous file at the line following the original CALL. 
  8965.  
  8966.  QUIT only ends the current batch file.  To end all batch file processing, use 
  8967.  the CANCEL command. 
  8968.  
  8969.  If you specify a value, QUIT will set the ERRORLEVEL or exit code (see the IF 
  8970.  command, and the %? variable) to that value. 
  8971.  
  8972.  You can also use QUIT to terminate an alias.  If you QUIT an alias while 
  8973.  inside a batch file, QUIT will end both the alias and the batch file and 
  8974.  return you to the command prompt or to the calling batch file. 
  8975.  
  8976.  
  8977. ΓòÉΓòÉΓòÉ 14.58. RD - Remove subdirectories ΓòÉΓòÉΓòÉ
  8978.  
  8979.  Purpose:    Remove one or more subdirectories. 
  8980.  
  8981.  Format:     RD pathname... 
  8982.                 or 
  8983.              RMDIR pathname... 
  8984.  
  8985.              pathname :  The name of a subdirectory to remove. 
  8986.  
  8987.  See also:  MD. 
  8988.  
  8989.  File Selection 
  8990.  
  8991.  Supports extended wildcards, ranges, multiple file names, and include lists. 
  8992.  
  8993.  Usage 
  8994.  
  8995.  RD and RMDIR are synonyms.  You can use either one. 
  8996.  
  8997.  RD removes directories from the directory tree.  For example, to remove the 
  8998.  subdirectory MEMOS from the subdirectory WP, you can use this command: 
  8999.  
  9000.           [c:\] rd \wp\memos
  9001.  
  9002.  Before using RD, you must delete all files and subdirectories (and their 
  9003.  files) in the pathname you want to remove.  Remember to remove hidden and 
  9004.  read-only files as well as normal files (you can use DEL /Z to delete hidden 
  9005.  and read-only files). 
  9006.  
  9007.  You can use wildcards in the pathname. 
  9008.  
  9009.  You cannot remove the root directory, the current directory (.), any directory 
  9010.  above the current directory in the directory tree, or any directory in use by 
  9011.  another process in a multitasking system. 
  9012.  
  9013.  
  9014. ΓòÉΓòÉΓòÉ 14.59. REBOOT - Reboot the system ΓòÉΓòÉΓòÉ
  9015.  
  9016.  Purpose:    Do a system reboot. 
  9017.  
  9018.  Format:     REBOOT [/C /S /V] 
  9019.  
  9020.              /S(hutdown)                     /V(erify) 
  9021.  
  9022.  Usage 
  9023.  
  9024.  REBOOT will completely restart your computer.  It normally performs a warm 
  9025.  reboot, which is comparable to pressing Ctrl-Alt-Delete. A reboot is necessary 
  9026.  to activate any changes to your CONFIG.SYS file. 
  9027.  
  9028.  The following example prompts you to verify the reboot, then does a warm boot: 
  9029.  
  9030.           [c:\] reboot /v
  9031.  
  9032.  REBOOT defaults to performing a warm boot, with no prompting. 
  9033.  
  9034.  REBOOT flushes the disk buffers, resets the drives, and waits one second 
  9035.  before rebooting, to allow disk caching programs to finish writing any cached 
  9036.  data.  4OS2 issues the proper commands to shut down OS/2 before rebooting. 
  9037.  
  9038.  REBOOT uses the DOS.SYS device driver to reboot your system.  DOS.SYS is 
  9039.  loaded via a DEVICE= statement in your CONFIG.SYS file.  If DOS.SYS is not 
  9040.  loaded, REBOOT will not work. 
  9041.  
  9042.  Options 
  9043.  
  9044.     /S:     (Shutdown) Shut down the system, but do not reboot.  This option is 
  9045.             equivalent to clicking the "Shutdown" choice on the OS/2 2.x 
  9046.             Workplace Shell popup menu. 
  9047.  
  9048.     /V:     (Verify) Prompt for confirmation (Y or N) before rebooting or 
  9049.             taking the action specified by other REBOOT options. 
  9050.  
  9051.  
  9052. ΓòÉΓòÉΓòÉ 14.60. REM - Put a comment in a batch file ΓòÉΓòÉΓòÉ
  9053.  
  9054.  Purpose:    Put a comment in a batch file. 
  9055.  
  9056.  Format:     REM [comment ] 
  9057.  
  9058.              comment :  The text to include in the batch file. 
  9059.  
  9060.  Usage 
  9061.  
  9062.  The REM command lets you place a remark or comment in a batch file. Batch file 
  9063.  comments are useful for documenting the purpose of a batch file and the 
  9064.  procedures you have used. 
  9065.  
  9066.  REM must be followed by a space or tab character and then your comment. 
  9067.  Comments can be up to 1023 characters long.  4OS2 will normally ignore 
  9068.  everything on the line after the REM command, including quote characters, 
  9069.  redirection symbols, and other commands (see below for the exception to this 
  9070.  rule). 
  9071.  
  9072.  If ECHO is ON, the comment is displayed.  Otherwise, it is ignored. If ECHO is 
  9073.  ON and you don't want to display the line, preface the REM command with an at 
  9074.  sign [@]. 
  9075.  
  9076.  You can use REM to create a zero-byte file if you use a redirection symbol 
  9077.  after the REM command.  No text is permitted between the REM command and the 
  9078.  redirection symbol.  For example, to create the zero-byte file C:\FOO : 
  9079.  
  9080.           [c:\] rem > foo
  9081.  
  9082.  (This capability is included for compatibility with CMD.EXE.  A simpler method 
  9083.  for creating a zero-byte file with 4OS2 is to enter  >filename as a command, 
  9084.  with no actual command before the [>] redirection character.) 
  9085.  
  9086.  
  9087. ΓòÉΓòÉΓòÉ 14.61. REN - Rename files or subdirectories ΓòÉΓòÉΓòÉ
  9088.  
  9089.  Purpose:    Rename files or subdirectories. 
  9090.  
  9091.  Format:     REN [/A:[[-]rhsda] /N /P /Q /S /T] old_name... new_name 
  9092.                 or 
  9093.              RENAME [/A:[[-]rhsda] /N /P /Q /S /T] old_name... new_name 
  9094.  
  9095.              old_name :  Original name of the file(s) or subdirectory. 
  9096.              new_name :  New name to use, or new path on the same drive. 
  9097.  
  9098.              /A:(ttribute select)            /Q(uiet) 
  9099.              /N(othing)                      /S(ubdirectory) 
  9100.              /P(rompt)                       /T(otal) 
  9101.  
  9102.  See also:  COPY and MOVE. 
  9103.  
  9104.  File Selection 
  9105.  
  9106.  Supports extended wildcards, ranges, multiple file names, and include lists. 
  9107.  
  9108.  Usage 
  9109.  
  9110.  REN and RENAME are synonyms.  You may use either one. 
  9111.  
  9112.  REN lets you change the name of a file or a subdirectory, or move one or more 
  9113.  files to a new subdirectory on the same drive.  (If you want to move files to 
  9114.  a different drive, use MOVE.) 
  9115.  
  9116.  In its simplest form, you simply give REN the old_name of an existing file or 
  9117.  subdirectory and then a new_name.  The new_name must not already exist -- you 
  9118.  can't give two files the same name (unless they are in different directories). 
  9119.  The first example renames the file MEMO.TXT to MEM.TXT.  The second example 
  9120.  changes the name of the \WORD directory to \WP : 
  9121.  
  9122.           [c:\] rename memo.txt mem.txt
  9123.           [c:\] rename \word \wp
  9124.  
  9125.  You can also use REN to rename a group of files that you specify with 
  9126.  wildcards, as multiple files, or in an include list.  When you do, the 
  9127.  new_name must use one or more wildcards to show what part of each filename to 
  9128.  change.  Both of the next two examples change the extensions of multiple files 
  9129.  to .SAV : 
  9130.  
  9131.           [c:\] ren config.sys autoexec.bat 4start.btm *.sav
  9132.           [c:\] ren *.txt *.sav
  9133.  
  9134.  REN can move files to a different subdirectory on the same drive. When it is 
  9135.  used for this purpose, REN requires one or more filenames for the old_name and 
  9136.  a directory name for the new_name : 
  9137.  
  9138.           [c:\] ren memo.txt \wp\memos\
  9139.           [c:\] ren oct.dat nov.dat \data\save\
  9140.  
  9141.  The final backslash in the last two examples is optional.  If you use it, you 
  9142.  force REN to recognize the last argument as the name of a directory, not a 
  9143.  file.  The advantage of this approach is that if you accidentally mistype the 
  9144.  directory name, REN will report an error instead of renaming your files in a 
  9145.  way that you didn't intend. 
  9146.  
  9147.  Finally, REN can move files to a new directory and change their name at the 
  9148.  same time if you specify both a path and file name for new_name.  In this 
  9149.  example, the files are renamed with an extension of .SAV as they are moved to 
  9150.  a new directory: 
  9151.  
  9152.           [c:\] ren *.dat \data\save\*.sav
  9153.  
  9154.  When new_name refers to a file or files (rather than a directory), the file(s) 
  9155.  must not already exist.  Also, you cannot rename a subdirectory to a new 
  9156.  location on the directory tree. 
  9157.  
  9158.  REN does not change a file's attributes.  The new_name file(s) will have the 
  9159.  same attributes as old_name. 
  9160.  
  9161.  Options 
  9162.  
  9163.     /A:     (Attribute select) Select only those files that have the specified 
  9164.             attribute(s) set.  Preceding the attribute character with a hyphen 
  9165.             [-] will select files that do not have that attribute set.  The 
  9166.             attributes are: 
  9167.  
  9168.                  R  Read-only 
  9169.                  H  Hidden 
  9170.                  S  System 
  9171.                  D  Subdirectory 
  9172.                  A  Archive 
  9173.  
  9174.             If no attributes are listed at all (e.g., REN /A: ...), REN will 
  9175.             select all files and subdirectories including hidden and system 
  9176.             files.  If attributes are combined, all the specified attributes 
  9177.             must match for a file to be selected. For example, /A:RHS will 
  9178.             select only those files with all three attributes set. 
  9179.  
  9180.     /N:     (Nothing) Do everything except actually rename the file(s). This 
  9181.             option is useful for testing what a REN command will actually do. 
  9182.  
  9183.     /P:     (Prompt) Prompt the user to confirm each rename operation. Your 
  9184.             options at the prompt are explained in detail under Page and File 
  9185.             Prompts. 
  9186.  
  9187.     /Q:     (Quiet) Don't display filenames  or the number of files renamed. 
  9188.             This option is most often used in batch files.  See also /T. 
  9189.  
  9190.     /S:     (Subdirectory) Normally, you can rename a subdirectory only if you 
  9191.             do not use any wildcards in the new_name.  This prevents 
  9192.             subdirectories from being renamed inadvertently when a group of 
  9193.             files is being renamed with wildcards.  /S will let you rename a 
  9194.             subdirectory even when you use wildcards. 
  9195.  
  9196.     /T:     (Total) Don't display filenames as they are renamed, but report the 
  9197.             number of files renamed.  See also /Q. 
  9198.  
  9199.  
  9200. ΓòÉΓòÉΓòÉ 14.62. RETURN - Return from a subroutine in a batch file ΓòÉΓòÉΓòÉ
  9201.  
  9202.  Purpose:    Return from a GOSUB (subroutine) in a batch file. 
  9203.  
  9204.  Format:     RETURN 
  9205.  
  9206.  See also:  GOSUB. 
  9207.  
  9208.  Usage 
  9209.  
  9210.  4OS2 allows subroutines in batch files. 
  9211.  
  9212.  A subroutine begins with a label (a colon followed by a word) and ends with a 
  9213.  RETURN command. 
  9214.  
  9215.  The subroutine is invoked with a GOSUB command from another part of the batch 
  9216.  file.  When a RETURN command is encountered the subroutine terminates, and 
  9217.  execution of the batch file continues on the line following the original 
  9218.  GOSUB. 
  9219.  
  9220.  The following batch file fragment calls a subroutine which displays the files 
  9221.  in the current directory: 
  9222.  
  9223.           echo Calling a subroutine
  9224.           gosub subr1
  9225.           echo Returned from the subroutine
  9226.           quit
  9227.  
  9228.           :subr1
  9229.           dir /a/w
  9230.           return
  9231.  
  9232.  
  9233. ΓòÉΓòÉΓòÉ 14.63. SCREEN - Position the cursor and display text ΓòÉΓòÉΓòÉ
  9234.  
  9235.  Purpose:    Position the cursor on the screen and optionally display a 
  9236.              message. 
  9237.  
  9238.  Format:     SCREEN row column [text ] 
  9239.  
  9240.              row :  The new row location for the cursor. 
  9241.              column :  The new column location for the cursor. 
  9242.              text :  Optional text to display at the new cursor location. 
  9243.  
  9244.  See also:  ECHO, SCRPUT, TEXT, and VSCRPUT. 
  9245.  
  9246.  Usage 
  9247.  
  9248.  SCREEN allows you to create attractive screen displays in batch files.  You 
  9249.  use it to specify where a message will appear on the screen.  You can use 
  9250.  SCREEN to create menu displays, logos, etc. The following batch file fragment 
  9251.  displays a menu: 
  9252.  
  9253.           @echo off
  9254.           cls
  9255.           screen 3 10  Select a number from 1 to 4:
  9256.           screen 6 20  1 - Word Processing
  9257.           ...
  9258.  
  9259.  SCREEN does not change the screen colors.  To display text in specific colors, 
  9260.  use SCRPUT or VSCRPUT.  SCREEN always leaves the cursor at the end of the 
  9261.  displayed text. 
  9262.  
  9263.  The row and column values are zero-based, so on a standard 25 line by 80 
  9264.  column display, valid rows are 0 - 24 and valid columns are 0 - 79.  You can 
  9265.  also specify the row and column as offsets from the current cursor position. 
  9266.  Begin the value with a plus sign [+] to move the cursor down the specified 
  9267.  number of rows or to the right the specified number of columns, or with a 
  9268.  minus sign [-] to move the cursor up or to the left.  This example prints a 
  9269.  string 3 lines above the current position, in absolute column 10: 
  9270.  
  9271.           screen -3 10 Hello, World!
  9272.  
  9273.  SCREEN checks for a valid row and column, and displays a "Usage" error message 
  9274.  if either value is out of range. 
  9275.  
  9276.  
  9277. ΓòÉΓòÉΓòÉ 14.64. SCRPUT - Display text in color ΓòÉΓòÉΓòÉ
  9278.  
  9279.  Purpose:    Position text on the screen and display it in color. 
  9280.  
  9281.  Format:     SCRPUT row col [BRIght] [BLInk] fg ON [BRIght] bg text 
  9282.  
  9283.              row :  Starting row 
  9284.              col :  Starting column 
  9285.              fg :  Foreground character color 
  9286.              bg :  Background character color 
  9287.              text :  The text to display 
  9288.  
  9289.  See also:  CLS, ECHO, SCREEN, TEXT, and VSCRPUT. 
  9290.  
  9291.  Usage 
  9292.  
  9293.  SCRPUT allows you to create attractive screen displays in batch files.  You 
  9294.  use it to specify where a message will appear on the screen and what colors 
  9295.  will be used to display the message text. You can use SCRPUT to create menu 
  9296.  displays, logos, etc. 
  9297.  
  9298.  SCRPUT works like SCREEN, but allows you to specify the display colors.  It 
  9299.  writes directly to the screen and does not require ANSI support.  It always 
  9300.  leaves the cursor in its current position.  See Colors and Color Names for 
  9301.  details about colors and notes on the use of bright background colors. 
  9302.  
  9303.  The row and column are zero-based, so on a standard 25 line by 80 column 
  9304.  display, valid rows are 0 - 24 and valid columns are 0 - 79.  You can also 
  9305.  specify the row and column as offsets from the current cursor position.  Begin 
  9306.  the value with a plus sign [+] to move down the specified number of rows or to 
  9307.  the right the specified number of columns, or with a minus sign [-] to move up 
  9308.  or to the left. 
  9309.  
  9310.  The following batch file fragment displays part of a menu, in color: 
  9311.  
  9312.           cls white on blue
  9313.           scrput 6 20 bri red on blu 1 - Word Processing
  9314.           scrput 7 20 bri yel on blu 2 - Spreadsheet
  9315.           ...
  9316.  
  9317.  
  9318. ΓòÉΓòÉΓòÉ 14.65. SELECT - Select files for a command ΓòÉΓòÉΓòÉ
  9319.  
  9320.  Purpose:    Interactively select files for a command. 
  9321.  
  9322.  Format:     SELECT [/A[:][-][rhsda] /D /E /H /I"text" /O[:][-]adeginrsu /Z] 
  9323.              [command ] ... (files...)... 
  9324.  
  9325.              command :  The command to execute with the selected files. 
  9326.              files :  The files from which to select.  File names may be 
  9327.              enclosed in either parentheses or square brackets.  The difference 
  9328.              is explained below. 
  9329.  
  9330.              /A(ttribute select)             /I (match descriptions) 
  9331.              /D(isable color coding)         /O(rder) 
  9332.              /E (use upper case)             /Z (use FAT format) 
  9333.              /H(ide dots) 
  9334.  
  9335.  File Selection 
  9336.  
  9337.  Supports extended wildcards, ranges, multiple file names, and include lists. 
  9338.  Date, time, or size ranges must appear immediately after the SELECT keyword. 
  9339.  
  9340.  Usage 
  9341.  
  9342.  SELECT allows you to select files for internal and external commands by using 
  9343.  a full-screen "point and shoot" display.  You can have SELECT execute a 
  9344.  command once for each file you select, or have it create a list of files for a 
  9345.  command to work with.  The command can be an internal command, an alias, an 
  9346.  external command, or a batch file. 
  9347.  
  9348.  If you use parentheses around the files, SELECT executes the command once for 
  9349.  each file you have selected.  During each execution, one of the selected files 
  9350.  is passed to the command as an argument.  If you use square brackets around 
  9351.  files, the SELECTed files are combined into a single list, separated by 
  9352.  spaces.  The command is then executed once with the entire list presented as 
  9353.  its command-line arguments. 
  9354.  
  9355.  SELECT uses the cursor up, cursor down, PgUp, and PgDn keys to scroll through 
  9356.  the file list.  Use the + key or the spacebar to select a file (or unselect a 
  9357.  marked file), and the - key to unselect a file.  The * key will reverse all of 
  9358.  the current marks (excluding subdirectories), and the / key will unmark 
  9359.  everything.  After marking the files, press Enter to execute the command. 
  9360.  
  9361.  Press the L key to view the current highlighted file with LIST.  When you exit 
  9362.  from LIST, the SELECT screen will be restored. 
  9363.  
  9364.  You can select a single file by moving the scroll bar to the filename and 
  9365.  pressing Enter without marking any other files. 
  9366.  
  9367.  To skip the files listed in the current display and go on to the next file 
  9368.  specification inside the parentheses or brackets (if any), press the Esc key. 
  9369.  To cancel the current SELECT command entirely, press Ctrl-C or Ctrl-Break. 
  9370.  
  9371.  In the simplest form of SELECT, you merely specify the command and then the 
  9372.  list of files from which you will make your selection(s). For example: 
  9373.  
  9374.           [c:\] select copy (*.com *.exe) a:\
  9375.  
  9376.  will let you select from among the .COM and .EXE files on the current drive. 
  9377.  It will then invoke the COPY command to copy each file you select to drive A:. 
  9378.  You will be able to select first from a list of all .COM files in the current 
  9379.  directory, and then from a list of all .EXE files. 
  9380.  
  9381.  If you want to select from a list of all the .COM and .EXE files mixed 
  9382.  together, create an include list inside the parentheses by inserting a 
  9383.  semicolon: 
  9384.  
  9385.           [c:\] select copy (*.com;*.exe) a:\
  9386.  
  9387.  Finally, if you want the SELECT command to send a single list of files to 
  9388.  COPY, instead of invoking COPY once for each file you select, put the file 
  9389.  names in square brackets instead of parentheses: 
  9390.  
  9391.           [c:\] select copy [*.com;*.exe] a:\
  9392.  
  9393.  If you use brackets, you have to be sure that the resulting command (the word 
  9394.  COPY, the list of files, and the destination drive in this example) is no more 
  9395.  than 1,023 characters long.  The current line length is displayed by SELECT 
  9396.  while you are marking files to help you to conform to this limit. 
  9397.  
  9398.  The parentheses or brackets enclosing the file name(s) can appear anywhere 
  9399.  within the command; SELECT assumes that the first set of parentheses or 
  9400.  brackets it finds is the one containing the list of files from which you wish 
  9401.  to make your selection. 
  9402.  
  9403.  The list of files from which you wish to select can be further refined by 
  9404.  using date, time, and size ranges.  The range must be placed immediately after 
  9405.  the word SELECT.  If the command is an internal command that supports ranges, 
  9406.  an independent range can also be used in the command itself. 
  9407.  
  9408.  If you don't specify a command, the selected filename(s) will become the 
  9409.  command.  For example, this command defines an alias called UTILS that selects 
  9410.  from the executable files in the directory C:\UTIL, and then executes them in 
  9411.  the order marked: 
  9412.  
  9413.           [c:\] alias utils select (c:\util\*.com;*.exe;*.btm;*.bat)
  9414.  
  9415.  If you want to use filename completion to enter the filenames inside the 
  9416.  parentheses, type a space after the opening parenthesis.  Otherwise the 
  9417.  command-line editor will treat the open parenthesis as the first character of 
  9418.  the filename. 
  9419.  
  9420.  You can set the default colors used by SELECT with the SelectColors and 
  9421.  SelectStatBarColors directives in the .INI file.  If SelectColors is not used, 
  9422.  the SELECT display will use the current default colors.  If 
  9423.  SelectStatBarColors is not used, the status bar will use the reverse of the 
  9424.  SELECT display colors. 
  9425.  
  9426.  You can display the filenames in color by setting the COLORDIR environment 
  9427.  variable or using the ColorDir directive in your .INI file.  See Color-Coded 
  9428.  Directories for details.  To disable directory color coding within SELECT, use 
  9429.  the /D option. 
  9430.  
  9431.  When displaying descriptions, SELECT adds a right arrow at the end of the line 
  9432.  if the description is too long to fit on the screen.  This symbol will alert 
  9433.  you to the existence of additional description text.  You can use the left and 
  9434.  right arrow keys to scroll the screen horizontally and view the additional 
  9435.  text. 
  9436.  
  9437.  With the /I option, you can select files based on their descriptions.  SELECT 
  9438.  will display files if their description matches the text after the /I switch. 
  9439.  The search is not case sensitive.  You can use wildcards and extended wild 
  9440.  cards as part of the text. 
  9441.  
  9442.  When sorting file names and extensions for the SELECT display, 4OS2 normally 
  9443.  assumes that sequences of digits should be sorted numerically (for example, 
  9444.  the file DRAW2 would come before DRAW03 because 2 is numerically smaller than 
  9445.  03), rather than strictly alphabetically (where DRAW2 would come second 
  9446.  because "2" comes after "0").  You can defeat this behavior and force a strict 
  9447.  alphabetic sort with the /O:a option. 
  9448.  
  9449.  Options 
  9450.  
  9451.     /A:     (Attribute select)  Display only those files that have the 
  9452.             specified attribute set.  Preceding the attribute character with a 
  9453.             minus [-] will display files that do not have that attribute set. 
  9454.             Attributes can also be combined.  The attributes are: 
  9455.  
  9456.               R  Read-only 
  9457.               H  Hidden 
  9458.               S  System 
  9459.               D  Subdirectory 
  9460.               A  Archive 
  9461.  
  9462.             If no attributes are listed at all (e.g., SELECT /A ...), SELECT 
  9463.             will display all files and subdirectories including hidden and 
  9464.             system files. If attributes are combined, all the specified 
  9465.             attributes must match for a file to be included in the listing. 
  9466.             For example, /A:RHS will display only those files with all three 
  9467.             attributes set. 
  9468.  
  9469.     /D:     (Disable color coding)  Temporarily turn off directory color coding 
  9470.             within SELECT. 
  9471.  
  9472.     /E      (use upper case)  Display filenames in the traditional upper case 
  9473.             format; also see SETDOS /U and the UpperCase  directive in the .INI 
  9474.             file. 
  9475.  
  9476.     /H      (Hide dots)  Suppress the display of the "." and ".." directories 
  9477.  
  9478.     /I      (match descriptions)  Display filenames by matching text in their 
  9479.             descriptions.  The text can include wild cards and extended 
  9480.             wildcards.  The search text must be enclosed in quotation marks. 
  9481.             /I will be ignored if /C or /O:c is also used. 
  9482.  
  9483.     /O:     (Order)  Set the sort order for the files.  The order can be any 
  9484.             combination of the following options: 
  9485.  
  9486.               -  Reverse the sort order for the next option 
  9487.               a  Sort in ASCII order, not numerically, when there are digits in 
  9488.             the name 
  9489.               d  Sort by date and time (oldest first); for HPFS drives also see 
  9490.             /T 
  9491.               e  Sort by extension 
  9492.               g  Group subdirectories first, then files 
  9493.               i  Sort by file description 
  9494.               n  Sort by filename (this is the default) 
  9495.               r  Reverse the sort order for all options 
  9496.               s  Sort by size 
  9497.               u  Unsorted 
  9498.  
  9499.     /Z:     Display HPFS filenames in FAT format.  Long names will be truncated 
  9500.             to 12 characters.  If the name is longer than 12 characters, it 
  9501.             will be followed by a right arrow to show that one or more 
  9502.             characters have been truncated. 
  9503.  
  9504.  
  9505. ΓòÉΓòÉΓòÉ 14.66. SET - Create or modify environment variables ΓòÉΓòÉΓòÉ
  9506.  
  9507.  Purpose:    Display, create, modify, or delete environment variables. 
  9508.  
  9509.  Format:     SET [/P /R filename...] [name [=][value ]] 
  9510.  
  9511.              filename :  The name of a file containing variable definitions. 
  9512.              name :  The name of the environment variable to define or modify. 
  9513.              value :  The new value for the variable. 
  9514.  
  9515.              /P(ause)                        /R(ead from file) 
  9516.  
  9517.  See also:  ESET and UNSET. 
  9518.  
  9519.  Usage 
  9520.  
  9521.  Every program and command inherits an environment, which is a list of variable 
  9522.  names, each of which is followed by an equal sign and some text.  Many 
  9523.  programs use entries in the environment to modify their own actions. 
  9524.  
  9525.  If you simply type the SET command with no options or arguments, it will 
  9526.  display all the names and values currently stored in the environment. 
  9527.  Typically, you will see an entry called COMSPEC, an entry called PATH, an 
  9528.  entry called CMDLINE, and whatever other environment variables you and your 
  9529.  programs have established: 
  9530.  
  9531.           [c:\] set
  9532.           COMSPEC=C:\4OS2\$OS2.EXE
  9533.           PATH=C:\;C:\OS2;C:\OS2\SYSTEM;C:\UTIL
  9534.           CMDLINE=C:\4OS2\4START.CMD
  9535.  
  9536.  To add a variable to the environment, type SET, a space, the variable name, an 
  9537.  equal sign, and the text: 
  9538.  
  9539.           [c:\] set mine=c:\finance\myfiles
  9540.  
  9541.  The variable name is converted to upper case by 4OS2.  The text after the 
  9542.  equal sign will be left just as you entered it.  If the variable already 
  9543.  exists, its value will be replaced with the new text that you entered. 
  9544.  
  9545.  Normally you should not put a space on either side of the equal sign.  A space 
  9546.  before the equal sign will become part of the name ; a space after the equal 
  9547.  sign will become part of the value. 
  9548.  
  9549.  If you use SET to create a variable with the same name as one of the 4OS2 
  9550.  internal variables, you will disable the internal variable.  If you later 
  9551.  execute a batch file or alias that depends on that internal variable, it may 
  9552.  not operate correctly. 
  9553.  
  9554.  To display the contents of a single variable, type SET plus the variable name: 
  9555.  
  9556.           [c:\] set mine
  9557.  
  9558.  You can edit environment variables with the ESET command.  To remove variables 
  9559.  from the environment, use UNSET, or type SET plus a variable name and an equal 
  9560.  sign: 
  9561.  
  9562.           [c:\] set mine=
  9563.  
  9564.  The variable name is limited to a maximum of 80 characters. The name and value 
  9565.  together cannot be longer than 1,023 characters. 
  9566.  
  9567.  In 4OS2 the size of the environment is set automatically, and increased as 
  9568.  necessary as you add variables. 
  9569.  
  9570.  Options 
  9571.  
  9572.     /P:     (Pause) Wait for a key to be pressed after each screen page before 
  9573.             continuing the display.  Your options at the prompt are explained 
  9574.             in detail under Page and File Prompts. 
  9575.  
  9576.     /R:     (Read) Read environment variables from a file.  This is much faster 
  9577.             than loading variables from a batch file with multiple SET 
  9578.             commands.  Each entry in the file must fit within the 1,023-byte 
  9579.             command-line length limit for 4OS2:  The file is in the same format 
  9580.             as the SET display, so SET /R can accept as input a file generated 
  9581.             by redirecting SET output.  For example, the following commands 
  9582.             will save the environment variables to a file, and then reload them 
  9583.             from that file: 
  9584.  
  9585.                                 set > varlist
  9586.                                 set /r varlist
  9587.  
  9588.             You can load variables from multiple files by listing the filenames 
  9589.             individually after the /R. You can add comments to a variable file 
  9590.             by starting the comment line with a colon [:]. 
  9591.  
  9592.             If you are creating a SET /R file by hand, and need to create an 
  9593.             entry that spans multiple lines in the file, you can do so by 
  9594.             terminating each line, except the last, with an escape character. 
  9595.             However, you cannot use this method to exceed the command-line 
  9596.             length limit. 
  9597.  
  9598.  
  9599. ΓòÉΓòÉΓòÉ 14.67. SETDOS - Set the 4OS2 configuration ΓòÉΓòÉΓòÉ
  9600.  
  9601.  Purpose:    Display or set the 4OS2 configuration. 
  9602.  
  9603.  Format:     SETDOS [/B? /C? /D /E? /Fn.n /I+|- command /L? /M? /N? /P? /R? 
  9604.              /S?:? /U? /V? /X[+|-]n /Y?] 
  9605.  
  9606.              /B(right background)            /N(o clobber) 
  9607.              /C(ompound)                     /P(arameter character) 
  9608.              /D(escriptions)                 /R(ows) 
  9609.              /E(scape character)             /S(hape of cursor) 
  9610.              /F(ormat for @EVAL)             /U(pper case) 
  9611.              /I(nternal commands)            /V(erbose) 
  9612.              /L(ine)                         /X (expansion, special characters) 
  9613.              /M(ode for editing)             /Y (single step) 
  9614.  
  9615.  Usage 
  9616.  
  9617.  SETDOS allows you to customize certain aspects of 4OS2 to suit your personal 
  9618.  tastes or the configuration of your system.  Each of these options is 
  9619.  described below. 
  9620.  
  9621.  You can display the value of all SETDOS options by entering the SETDOS command 
  9622.  with no parameters. 
  9623.  
  9624.  Most of the SETDOS options can be initialized when 4OS2 executes the 
  9625.  configuration directives in the .INI file. The name of the corresponding 
  9626.  directive is listed with each option below; if none is listed, that option 
  9627.  cannot be set from the .INI file.  You can also define the SETDOS options in 
  9628.  your AUTOEXEC.BAT, 4START, or other startup file (see Automatic Batch Files), 
  9629.  in aliases, or at the command line. 
  9630.  
  9631.  Secondary shells automatically inherit most configuration settings currently 
  9632.  in effect in the previous shell.  If values have been changed by SETDOS since 
  9633.  4OS2 started, the new values will be passed to the secondary shell. 
  9634.  
  9635.  SETDOS /I settings are not inherited by secondary shells.  If you want to use 
  9636.  SETDOS /I- to disable commands in all shells, place the SETDOS command(s) in 
  9637.  your 4START file, which is executed when any shell starts. 
  9638.  
  9639.  Options 
  9640.  
  9641.     /B:     (Bright background) The BRIGHTBG option determines whether 4OS2 
  9642.             configures your video adapter for blinking text (/B0, the default) 
  9643.             or bright background colors (/B1). /B2 will prevent 4OS2 from 
  9644.             adjusting the bright / blink status. See Colors and Color Names for 
  9645.             a detailed discussion of this option.  Also see the BrightBG 
  9646.             directive. 
  9647.  
  9648.     /C:     (Compound character) The COMPOUND option sets the character used 
  9649.             for separating multiple commands on the same line.  The default is 
  9650.             the ampersand [&]. You cannot use any of the redirection characters 
  9651.             (| > <), or the blank, tab, comma, or equal sign as the command 
  9652.             separator.  This example changes the COMPOUND character to a tilde 
  9653.             [~]: 
  9654.  
  9655.                                 [c:\] setdos /c~
  9656.  
  9657.             If you want to share batch files or aliases between 4DOS and 4OS2 
  9658.             or 4DOS/NT, see the %+ variable, which retrieves the current 
  9659.             command separator, and 4DOS, 4OS2, and 4DOS/NT Compatibility for 
  9660.             details on using compatible command separators for all the products 
  9661.             you use.  Also see the CommandSep directive. 
  9662.  
  9663.     /D:     (Descriptions) The DESCRIPTIONS option controls whether file 
  9664.             processing commands like COPY, DEL, MOVE, and REN process file 
  9665.             descriptions along with the files they belong to.  /D1 turns 
  9666.             description processing on, which is the default.  /D0 turns 
  9667.             description processing off.  Also see the Descriptions directive. 
  9668.  
  9669.     /E:     (Escape character) The ESCAPE option sets the character used to 
  9670.             suppress the normal meaning of the following character.  Any 
  9671.             character following the escape character will be passed unmodified 
  9672.             to the command.  The default escape character is a caret [^]. You 
  9673.             cannot use any of the redirection characters (| > <) or the blank, 
  9674.             tab, comma, or equal sign as the escape character. Certain 
  9675.             characters (b, c, e, f, n, r, s, and t) have special meanings when 
  9676.             immediately preceded by the escape character. 
  9677.  
  9678.             If you want to share batch files or aliases between 4DOS and 4OS2 
  9679.             or 4DOS/NT, see the %= variable, which retrieves the current escape 
  9680.             character, and 4DOS, 4OS2, and 4DOS/NT Compatibility for details on 
  9681.             using compatible escape characters for all the products you use. 
  9682.             Also see the EscapeChar directive. 
  9683.  
  9684.     /F:     (Format for @EVAL) The FORMAT option lets you set default decimal 
  9685.             precision for the @EVAL variable function. The maximum precision is 
  9686.             16 digits to the left of the decimal point and 8 digits to the 
  9687.             right of the decimal point.  By default, the minimum precision to 
  9688.             the right of the decimal point is 0.  The general form of this 
  9689.             option is /Fx.y, where x sets the minimum number of digits to the 
  9690.             right of the decimal place and y sets the maximum number of digits. 
  9691.             Both values can range from 0 to 8; if x is greater than x, it is 
  9692.             ignored.  You can specify either or both values, for example /F2.5, 
  9693.             /F2, and /F.5 are all valid entries. 
  9694.  
  9695.             See @EVAL if you want to set the precision for a single 
  9696.             computation. 
  9697.  
  9698.             Also see the EvalMax and EvalMin directives. 
  9699.     /I:     (Internal) The INTERNAL option allows you to disable or enable 
  9700.             internal commands.  To disable a command, precede the command name 
  9701.             with a minus [-].  To re-enable a command, precede it with a plus 
  9702.             [+]. For example, to disable the internal LIST command to force 
  9703.             4OS2 to use an external command: 
  9704.  
  9705.                                 [c:\] setdos /i-list
  9706.  
  9707.     /L:     (Line) The LINE option controls how 4OS2 gets its input from the 
  9708.             command line.  /L0 tells 4OS2 to use character input (the default). 
  9709.             /L1 tells it to use line input (like CMD.EXE ).  /L1 will disable 
  9710.             command-line editing, history recall, filename completion, and the 
  9711.             directory history window, and will reduce the 4OS2 input length 
  9712.             limit from 1023 characters to 255 characters.  It should only be 
  9713.             used if it is needed for compatibility with a specific program.  If 
  9714.             you have a program that requires line input, you can use the 
  9715.             following line in an alias or batch file to change the line input 
  9716.             option just for that single program (change the command separator 
  9717.             to an ampersand [&] for 4OS2): 
  9718.  
  9719.                                 setdos /L1 & program %& & setdos /L0
  9720.  
  9721.             See README.DOC for information on programs which require this 
  9722.             option.  Also see the LineInput directive. 
  9723.  
  9724.     /M:     (Mode) The MODE option controls the initial line editing mode.  To 
  9725.             start in overstrike mode at the beginning of each command line, use 
  9726.             /M0 (the default).  To start in insert mode, use /M1.  Also see the 
  9727.             EditMode directive. 
  9728.  
  9729.     /N:     (No clobber) The NOCLOBBER option controls output redirection). 
  9730.             /N0 means existing files will be overwritten by output redirection 
  9731.             (with >) and that appending (with >>) does not require the file to 
  9732.             exist already.  This is the default.  /N1 means existing files may 
  9733.             not be overwritten by output redirection, and that when appending 
  9734.             the output file must exist.  A /N1 setting can be overridden with 
  9735.             the [!] character.  If you use /N1, you may have problems with a 
  9736.             few unusual programs that shell out to run a command with 
  9737.             redirection, and expect to be able to overwrite an existing file. 
  9738.             Also see the NoClobber directive. 
  9739.  
  9740.     /P:     (Parameter character) This option sets the character used after a 
  9741.             percent sign to specify all or all remaining command-line arguments 
  9742.             in a batch file or alias (e.g., %& or %n&; . The default is the 
  9743.             dollar sign [$]. 
  9744.  
  9745.             If you want to share batch files or aliases between 4DOS and 4OS2 
  9746.             or 4DOS/NT, see 4DOS, 4OS2, and 4DOS/NT Compatibility for details 
  9747.             on selecting compatible parameter characters for all the products 
  9748.             you use.  Also see the ParameterChar directive. 
  9749.  
  9750.     /R:     (Rows) The ROWS option sets the number of screen rows used by the 
  9751.             video display.  Normally 4OS2 detects the screen size, but if you 
  9752.             have a non-standard display you may need to set it explicitly. 
  9753.             This option does not affect screen scrolling (which is controlled 
  9754.             by your video driver).  It is used only for LIST, SELECT, the paged 
  9755.             output options (i.e., TYPE /P), and error checking in the screen 
  9756.             output commands.  Also see the ScreenRows directive. 
  9757.  
  9758.     /S:     (Shape) The SHAPE option sets the cursor shape.  The format is 
  9759.             /So:i where o is the cursor size for overstrike mode, i the cursor 
  9760.             size for insert mode.  The size is entered as a percentage of the 
  9761.             total character height.  The default values are 10:100 (an 
  9762.             underscore cursor for overstrike mode, and a block cursor for 
  9763.             insert mode).  Because of the way video drivers remap the cursor 
  9764.             shape, you may not get a smooth progression in the cursor size from 
  9765.             0% - 100%.  To disable the cursor, enter /S0:0.  If either value is 
  9766.             -1, 4OS2 will not attempt to modify the cursor shape at all.  You 
  9767.             can use this feature to give another program full control of the 
  9768.             cursor shape. Also see the CursorOver and CursorIns directives. 
  9769.  
  9770.     /U:     (Upper) The UPPER option controls the default case (upper or lower) 
  9771.             for file and directory names displayed by internal commands like 
  9772.             COPY and DIR.  /U0 displays file names in lower case (the default). 
  9773.             /U1 displays file names in the traditional upper case.  The /U 
  9774.             setting is ignored for HPFS filenames.  HPFS names are always 
  9775.             displayed in the case in which they are stored. Also see the 
  9776.             UpperCase directive. 
  9777.  
  9778.     /V:     (Verbose) The VERBOSE option controls the default for command 
  9779.             echoing in batch files.  /V0 disables echoing of batch file 
  9780.             commands unless ECHO is explicitly set ON.  /V1, the default 
  9781.             setting, enables echoing of batch file commands unless ECHO is 
  9782.             explicitly set OFF.  Also see the BatchEcho directive. 
  9783.  
  9784.             /V2 forces echoing of all batch file commands, even if ECHO is set 
  9785.             OFF or the line begins with an "@".  This allows you to turn 
  9786.             echoing on for a batch file without editing the batch file and 
  9787.             removing the ECHO OFF command(s) within it.  /V2 is intended for 
  9788.             debugging, and can be set with SETDOS, but not with the BatchEcho 
  9789.             directive in 4OS2.INI. 
  9790.  
  9791.     /X[+|-]n(eXpansion and special characters): This option enables and 
  9792.             disables alias and environment variable expansion, and controls 
  9793.             whether special characters have their usual meaning or are treated 
  9794.             as text.  It is most often used in batch files to process text 
  9795.             strings which may contain special characters. 
  9796.  
  9797.             The features enabled or disabled by /X are numbered.  All features 
  9798.             are enabled when 4OS2 starts, and you can re-enable all features at 
  9799.             any time by using /X0.  To disable a particular feature, use /X-n, 
  9800.             where n is the feature number from the list below.  To re-enable 
  9801.             the feature, use /X+n.  To enable or disable multiple individual 
  9802.             features, list their numbers in sequence after the + or - (e.g. /X- 
  9803.             345 to disable features 3, 4, and 5). 
  9804.  
  9805.             The features are: 
  9806.  
  9807.               1  All alias expansion. 
  9808.               2  Nested alias expansion only. 
  9809.               3  All variable expansion (environment variables and batch and 
  9810.             alias parameters) 
  9811.               4  Nested variable expansion only. 
  9812.               5  Multiple commands, conditional commands, and piping 
  9813.               6  Redirection 
  9814.               7  Quoting (double quotes and back quotes) and square brackets 
  9815.               8  Escape character. 
  9816.  
  9817.             If nested alias expansion is disabled, the first alias of a command 
  9818.             is expanded but any aliases it invokes are not expanded.  If nested 
  9819.             variable expansion is disabled, each variable is expanded once, but 
  9820.             variables containing the names of other variables are not expanded 
  9821.             further. 
  9822.  
  9823.             For example, to disable all features except alias expansion while 
  9824.             you are processing a text file containing special characters: 
  9825.  
  9826.                                 setdos /x-35678
  9827.                                 ... [perform text processing here]
  9828.                                 setdos /x0
  9829.  
  9830.     /Y:     (Single step) /Y1 enables single-stepping through a batch file. 
  9831.             Each command is displayed on the screen along with a Y/N/R (yes / 
  9832.             no / remainder) prompt.  Press Y to execute the command, N to omit 
  9833.             the command and go on to the next, or R or Esc to execute the 
  9834.             remainder of the batch file (up to the next SETDOS /Y1 command). 
  9835.             You may also press Ctrl-C or Ctrl-Break toterminate the batch file. 
  9836.  
  9837.             Batch file single stepping is disabled each time 4OS2 returns to 
  9838.             the command prompt. This means you cannot enter the SETDOS /Y1 
  9839.             command at the prompt, press Enter, and start a batch file in 
  9840.             single step mode at the next prompt.  However you can enable single 
  9841.             step operation and run a batch file from the prompt if you enter 
  9842.             both commands on one line. For example, this command runs 
  9843.             FILECOMP.CMD with single step enabled: 
  9844.  
  9845.                                 [c:\] setdos /y1 & filecomp.cmd
  9846.  
  9847.  
  9848. ΓòÉΓòÉΓòÉ 14.68. SETLOCAL - Save the environment ΓòÉΓòÉΓòÉ
  9849.  
  9850.  Purpose:    Save a copy of the current disk drive, directory, environment, and 
  9851.              alias list. 
  9852.  
  9853.  Format:     SETLOCAL 
  9854.  
  9855.  See also:  ENDLOCAL. 
  9856.  
  9857.  Usage 
  9858.  
  9859.  SETLOCAL is used in batch files to save the default disk drive and directory, 
  9860.  the environment, and the alias list to a reserved block of memory.  You can 
  9861.  then change their values and later restore the original values with the 
  9862.  ENDLOCAL command. 
  9863.  
  9864.  For example, this batch file fragment saves everything, removes all aliases so 
  9865.  that user aliases will not affect batch file commands, changes the disk and 
  9866.  directory, modifies a variable, runs a program, and then restores the original 
  9867.  values: 
  9868.  
  9869.           setlocal
  9870.           unalias *
  9871.           cdd d:\test
  9872.           set path=c:\;c:\dos;c:\util
  9873.           rem run some program here
  9874.           endlocal
  9875.  
  9876.  SETLOCAL and ENDLOCAL are not nestable within a batch file. However, you can 
  9877.  have multiple SETLOCAL / ENDLOCAL pairs within a batch file, and nested batch 
  9878.  files can each have their own SETLOCAL / ENDLOCAL.  You cannot use SETLOCAL in 
  9879.  an alias or at the command line. 
  9880.  
  9881.  An ENDLOCAL is performed automatically at the end of a batch file if you 
  9882.  forget to do so.  If you invoke one batch file from another without using 
  9883.  CALL, the first batch file is terminated, and an automatic ENDLOCAL is 
  9884.  performed.  The second batch file inherits the drive, directory, aliases, and 
  9885.  environment variables as they were prior to any unterminated SETLOCAL. 
  9886.  
  9887.  
  9888. ΓòÉΓòÉΓòÉ 14.69. SHIFT - Shift batch file parameters ΓòÉΓòÉΓòÉ
  9889.  
  9890.  Purpose:    Allows the use of more than 127 parameters in a batch file. 
  9891.  
  9892.  Format:     SHIFT [n ] 
  9893.  
  9894.              n :  Number of positions to shift. 
  9895.  
  9896.  Usage 
  9897.  
  9898.  SHIFT is provided for compatibility with older batch files, where it was used 
  9899.  to access more than 10 parameters.  4OS2 supports 128 parameters (%0 to %127), 
  9900.  so you may not need to use SHIFT for batch files running exclusively under JP 
  9901.  Software command processors. 
  9902.  
  9903.  SHIFT moves each of the batch file parameters n positions to the left.  The 
  9904.  default value for n is 1.  SHIFT 1 moves the parameter in %1 to position %0, 
  9905.  the parameter in %2 becomes %1, etc.  You can reverse a SHIFT by giving a 
  9906.  negative value for n (i.e., after SHIFT -1, the former %0 is restored, %0 
  9907.  becomes %1, %1 becomes %2, etc.). 
  9908.  
  9909.  SHIFT also affects the parameters %n$. (command-line tail) and %# (number of 
  9910.  command arguments). 
  9911.  
  9912.  
  9913. ΓòÉΓòÉΓòÉ 14.70. START - Start a program in another session ΓòÉΓòÉΓòÉ
  9914.  
  9915.  Purpose:    Start a program in another session or window. 
  9916.  
  9917.  Format:     START ["program title "] [/B[G] /C /DOS[=optfile ] /F[G] /FS /I 
  9918.              /ICON=iconfile /INV /K /L /LA /LH /MAX /MIN /N /PGM progname /PM 
  9919.              /POS=row,col,width,height /WAIT /WIN /WIN3[=optfile ] 
  9920.              /WIN3S[=optfile ]] [command ] 
  9921.  
  9922.              program title :  Title to appear on title bar. 
  9923.              optfile :  Option settings file. 
  9924.              iconfile :  Name of icon (.ICO ) file. 
  9925.              progname :  Program name (not the session name). 
  9926.              path :  Startup directory. 
  9927.              command :  Command to be executed. 
  9928.  
  9929.              /B[G] (background session)      /LH (local history list) 
  9930.              /C(lose when done)              /MAX(imized) 
  9931.              /DOS (DOS session)              /MIN(imized) 
  9932.              /F[G] (foreground session)      /N(o 4OS2.EXE ) 
  9933.              /FS (full screen)               /PGM (program name) 
  9934.              /I(nherit environment)          /PM (PM application) 
  9935.              /ICON (.ICO file)               /POS(ition of window) 
  9936.              /INV(isible)                    /WAIT (for session to finish) 
  9937.              /K(eep when done)               /WIN(dowed session) 
  9938.              /L(ocal lists)                  /WIN3 (Windows enhanced mode) 
  9939.              /LA (local aliases)             /WIN3S (Windows standard mode) 
  9940.              /LD (local dir history) 
  9941.  
  9942.  See also:  DETACH. 
  9943.  
  9944.  Usage 
  9945.  
  9946.  START is used to begin a new OS/2 session, and optionally run a program in 
  9947.  that session.  If you use START with no parameters, it will begin a new 
  9948.  command-line session.  If you add a command, START will begin a new session or 
  9949.  window and execute that command. 
  9950.  
  9951.  The program title, if it is included, will appear on the title bar, and on the 
  9952.  Presentation Manager task list (OS/2 version 1.x) or window list (OS/2 version 
  9953.  2.x).  The program title must be enclosed in quotation marks and cannot exceed 
  9954.  60 characters.  If the program title is omitted, the program name will be used 
  9955.  as the title. 
  9956.  
  9957.  START offers a large number of switches to control the session you start.  In 
  9958.  most cases you need only a few switches to accomplish what you want.  The list 
  9959.  below summarizes the most commonly used START options, and how you can use 
  9960.  them to control the way a session is started: 
  9961.  
  9962.         /MAX, /MIN, and /POS allow you to start a character-mode windowed 
  9963.         session in a maximized window, a minimized window, or a window with a 
  9964.         specified position and size.  The default is to let the operating 
  9965.         environment choose the position and size of the window. 
  9966.  
  9967.         /C allows you to close the session when the command is finished (the 
  9968.         default for DOS and OS/2 Presentation Manager sessions); /K allows you 
  9969.         to keep the session open and go to a prompt (the default for OS/2 
  9970.         character mode sessions). 
  9971.  
  9972.         /BG and /FG allow you to start the session in the background(does not 
  9973.         respond to keystrokes until selected) or foreground (responds to 
  9974.         keystrokes until deselected).  /FG is the default if /DOS, /FS, /WIN, 
  9975.         or /PM is used; otherwise, /BG is the default. 
  9976.  
  9977.         /FS and /WIN control whether a character-mode session is started in 
  9978.         full-screen or windowed mode.  The default is to start a session of the 
  9979.         same type as the current session, if the application can be run in such 
  9980.         a session. 
  9981.  
  9982.  START determines the application type automatically and starts the session in 
  9983.  the appropriate mode:  OS/2, Windows, DOS, full-screen, windowed, or 
  9984.  Presentation Manager. 
  9985.  
  9986.  START gives you some flexibility in determining the session mode. For example, 
  9987.  if the command is the name of a batch file (either a .BTM or .CMD file), you 
  9988.  can use the /FS or /WIN options to run the batch file as part of a new 4OS2 
  9989.  session in either full-screen or windowed mode. 
  9990.  
  9991.  However, you cannot start a session in a mode that is inappropriate for the 
  9992.  application type.  A DOS application cannot be run as part of a Presentation 
  9993.  Manager session, for example, even if you use the /PM switch.  Invalid or 
  9994.  conflicting options will be ignored. 4OS2 will always attempt to run the 
  9995.  command in the appropriate type of session. 
  9996.  
  9997.  If the program is a DOS application or .BAT file, 4OS2 will return an error 
  9998.  message in OS/2 version 1.x.  In OS/2 version 2.x, 4OS2 will start a new DOS 
  9999.  session to run the program or batch file. The DOS session will close itself 
  10000.  automatically as soon as the program or batch file ends, unless /K is used. 
  10001.  If you want the session to wait for a keystroke before it closes itself, you 
  10002.  can use the syntax: 
  10003.  
  10004.           [c:\] start /DOS command ^^ pause
  10005.  
  10006.  (Because the caret [^] is the default 4OS2 escape character, two carets must 
  10007.  be used in order to pass one on to 4DOS as a command separator.) 
  10008.  
  10009.  If you want to start a DOS command-line session in OS/2 version 2.x, you can 
  10010.  use the command: 
  10011.  
  10012.           [c:\] start /DOS
  10013.  
  10014.  You can specify settings for DOS and Windows sessions by using a settings 
  10015.  options file, and loading it with the /DOS=, /WIN3=, or /WIN3S= option.  This 
  10016.  allows you to start DOS and Windows sessions with specific settings without 
  10017.  creating a desktop object and modifying the settings manually.  Before using 
  10018.  this capability you should read the description of it under /DOS= (below) very 
  10019.  carefully, since errors in the settings file can occasionally hang your 
  10020.  system. 
  10021.  
  10022.  Options 
  10023.  
  10024.     /BG:        (BackGround session) The session is started as a background 
  10025.                 session.  /BG may be abbreviated to /B. 
  10026.  
  10027.     /C:         (Close) The session or window is closed when the application 
  10028.                 ends. 
  10029.  
  10030.     /DOS[=filename]:(DOS session) Start a DOS session under OS/2 version 2.x. 
  10031.                 This option is not available in OS/2 version 1.x, which doesn't 
  10032.                 allow multiple DOS sessions. 
  10033.  
  10034.                 If you include the =filename, OS/2 will load DOS settings from 
  10035.                 the specified file.  This option is available only in the 
  10036.                 32-bit version of 4OS2. 
  10037.  
  10038.                 Starting a session with specific DOS settings is an 
  10039.                 undocumented feature which was implemented within OS/2 with 
  10040.                 little error checking.  It is included in START because it 
  10041.                 substantially eases a complex task, but you must experiment 
  10042.                 carefully to ensure that the settings you select will work 
  10043.                 properly on the systems on which you plan to use them. 
  10044.                 Incorrect settings may be ignored, but they may also hang your 
  10045.                 session or stop the entire system.  Be sure your experiments 
  10046.                 are not conducted while critical tasks are in process. 
  10047.  
  10048.                 Each line in the file must have a name, an equal sign [=], and 
  10049.                 a value.  The names are those shown in OS/2's DOS Settings 
  10050.                 dialog box.  Do not use spaces on either side of the equal 
  10051.                 sign. 
  10052.  
  10053.                 The names in the DOS Settings dialog box will vary depending on 
  10054.                 the device drivers and other settings in your CONFIG.SYS file, 
  10055.                 though many are available on all systems.  You must ensure that 
  10056.                 the names you use are valid for the systems on which you use 
  10057.                 them.  For example, if you replace IBM's COM.SYS and VCOM.SYS 
  10058.                 with different communications drivers, the COM_ settings will 
  10059.                 probably not be valid for the new drivers.  If you have a 
  10060.                 settings file which contains settings defined by a particular 
  10061.                 driver, and use it on a system where the corresponding driver 
  10062.                 is not loaded, the results are undefined. 
  10063.  
  10064.                 The values in your settings file must be numeric for settings 
  10065.                 which show a numeric value under DOS Settings (e.g., 
  10066.                 DOS_FILES=30), and must be text strings for settings shown with 
  10067.                 a string (e.g., DOS_SHELL=C:\4DOS.COM C:\4DOS /P).  Strings 
  10068.                 should be entered without trailing blanks.  For values shown as 
  10069.                 multiple choice on the DOS Settings page you must specify a 
  10070.                 numeric value, typically "0" for Off and 1 for On (e.g., 
  10071.                 DOS_HIGH=1).  Items with choices other than Off and On may use 
  10072.                 different values, or may not work at all; experimentation is 
  10073.                 usually required to find out what works.  Attempting to use 
  10074.                 strings for choice items (e.g., DOS_HIGH=ON) will not work, and 
  10075.                 can hang your system.  This is due to the internal operation of 
  10076.                 OS/2, and is not a problem in 4OS2. 
  10077.  
  10078.                 A typical DOS settings file might look like this: 
  10079.  
  10080.                                         DOS_FILES=30
  10081.                                         DOS_HIGH=1
  10082.                                         DOS_SHELL=C:\4DOS\4DOS.COM C:\4DOS /P
  10083.                                         MOUSE_EXCLUSIVE_ACCESS=0
  10084.                                         VIDEO_FASTPASTE=1
  10085.  
  10086.                 You can include comments in a settings file by beginning any 
  10087.                 line with a colon [:]. 
  10088.  
  10089.     /FG:        (ForeGround session) Start the session as the foreground 
  10090.                 session.  /FG may be abbreviated to /F. 
  10091.  
  10092.     /FS:        (Full Screen) Start the session as a full-screen session. 
  10093.  
  10094.     /I:         (Inherit environment) Inherit the default environment specified 
  10095.                 in CONFIG.SYS, if any, rather than the current environment. 
  10096.  
  10097.     /ICON=filename:Use the specified icon file.  If you don't use /ICON, 4OS2 
  10098.                 will look for an .ICO file with the same file name and in the 
  10099.                 same directory as the program file.  Some versions of OS/2 may 
  10100.                 ignore this option and use the default icon for the session. 
  10101.                 If you encounter this problem, check whether an update to OS/2 
  10102.                 has been released which addresses it. 
  10103.  
  10104.     /INV:       (Invisible) Start the session or window as invisible.  No icon 
  10105.                 will appear and the session will only be accessible through the 
  10106.                 Task Manager or Window List. 
  10107.  
  10108.     /K:         (Keep session or window at end) The session or window continues 
  10109.                 after the application program ends.  Use the EXIT command to 
  10110.                 end the session. 
  10111.  
  10112.     /L:         (Local lists) Start 4OS2 with local alias, history, and 
  10113.                 directory history lists.  This option combines the effects of 
  10114.                 /LA, /LD, and /LH (below). 
  10115.  
  10116.     /LA:        (Local Alias list) Start 4OS2 with a local alias list.See ALIAS 
  10117.                 for information on local and global aliases. 
  10118.  
  10119.     /LD:        (Local Directory history) Start 4OS2 with a local directory 
  10120.                 history list.  See Local and Global Directory History for more 
  10121.                 information. 
  10122.  
  10123.     /LH:        (Local History list) Start 4OS2 with a local history list. See 
  10124.                 Command History and Recall for information on local and global 
  10125.                 history lists. 
  10126.  
  10127.     /MAX:       (Maximized) Start the session or window maximized. 
  10128.  
  10129.     /MIN:       (Minimized) Start the session or window minimized. 
  10130.  
  10131.     /N:         Under 4OS2, start an OS/2 program directly, without a command 
  10132.                 processor.  The command cannot be an internal command or batch 
  10133.                 file. This is the default for PM applications. 
  10134.  
  10135.     /PGM:       (Program name) The string following this option is the program 
  10136.                 name.  The first quoted string on the line will be used as the 
  10137.                 session and task list title, and not as the program name. 
  10138.  
  10139.     /PM:        (Presentation Manager) Start a program in the PM session. 
  10140.  
  10141.     /POS:       (Position) Start the window at the specified screen position. 
  10142.                 The syntax is /POS=row, col, width, height where the values are 
  10143.                 specified in pixels or pels.  Row and col refer to the position 
  10144.                 of the bottom left corner of the window relative to the bottom 
  10145.                 left corner of the screen. 
  10146.  
  10147.     /WAIT:      Wait for the new session or window to finish before continuing. 
  10148.                 Cannot be used with /WIN3 or /WIN3S. 
  10149.  
  10150.     /WIN:       (Windowed) Start the session in a window. 
  10151.  
  10152.     /WIN3[=filename]:(Windows enhanced mode) Run the program in an 
  10153.                 enhanced-mode Windows 3.x session.  The session will run 
  10154.                 seamless (on the OS/2 desktop).  To start a Windows application 
  10155.                 in full-screen mode, use /FS rather than /WIN3.  You can 
  10156.                 include an equal sign and the name of an options file to set 
  10157.                 options for the specific session and application (see /DOS= 
  10158.                 above for details).  The setting names in the file should be 
  10159.                 taken from those shown in OS/2's WIN-OS/2 Settings dialog box. 
  10160.                 Available only in the 32-bit version of 4OS2. 
  10161.  
  10162.     /WIN3S[=filename]:(Windows standard mode) Equivalent to /WIN3, but runs the 
  10163.                 program in standard mode rather than enhanced mode. Available 
  10164.                 only in 4OS2/32. 
  10165.  
  10166.  
  10167. ΓòÉΓòÉΓòÉ 14.71. TEE - "Tee" pipe fitting ΓòÉΓòÉΓòÉ
  10168.  
  10169.  Purpose:    Copy standard input to both standard output and a file. 
  10170.  
  10171.  Format:     TEE [/A] file... 
  10172.  
  10173.              file :  One or more files that will receive the "tee-d" output. 
  10174.  
  10175.              /A(ppend) 
  10176.  
  10177.  See also:  Y and the redirection options. 
  10178.  
  10179.  Usage 
  10180.  
  10181.  TEE is normally used to "split" the output of a program so that you can see it 
  10182.  on the display and also save it in a file.  It can also be used to capture 
  10183.  intermediate output before the data is altered by another program or command. 
  10184.  
  10185.  TEE gets its input from standard input (usually the piped output of another 
  10186.  command or program), and sends out two copies:  one goes to standard output, 
  10187.  the other to the file or files that you specify.  TEE is not likely to be 
  10188.  useful with programs which do not use standard output, because these programs 
  10189.  cannot send output through a pipe. 
  10190.  
  10191.  For example, to search the file DOC for any lines containing the string 
  10192.  "4OS2", make a copy of the matching lines in 4.DAT, sort the lines, and write 
  10193.  them to the output file 4O.DAT : 
  10194.  
  10195.           [c:\] find "4OS2" doc | tee 4.dat | sort > 4o.dat
  10196.  
  10197.  If you are typing at the keyboard to produce the input for TEE, you must enter 
  10198.  a Ctrl-Z to terminate the input. 
  10199.  
  10200.  When using TEE with a pipe under 4OS2, the programs on the two ends of the 
  10201.  pipe run simultaneously, not sequentially as in 4DOS. 
  10202.  
  10203.  See Piping for more information on pipes. 
  10204.  
  10205.  Option 
  10206.  
  10207.     /A:     (Append) Append the output to the file(s) rather than overwriting 
  10208.             them. 
  10209.  
  10210.  
  10211. ΓòÉΓòÉΓòÉ 14.72. TEXT - Display text in a batch file ΓòÉΓòÉΓòÉ
  10212.  
  10213.  Purpose:    Display a block of text in a batch file. 
  10214.  
  10215.  Format:     TEXT 
  10216.                 . 
  10217.                 . 
  10218.                 . 
  10219.              ENDTEXT 
  10220.  
  10221.  See also:  ECHO, SCREEN, SCRPUT, and VSCRPUT. 
  10222.  
  10223.  Usage 
  10224.  
  10225.  TEXT can only be used in batch files. 
  10226.  
  10227.  The TEXT command is useful for displaying menus or multi-line messages.  TEXT 
  10228.  will display all subsequent lines in the batch file until terminated by 
  10229.  ENDTEXT.  Both TEXT and ENDTEXT must be entered as the only command on the 
  10230.  line. 
  10231.  
  10232.  To redirect the entire block of text, use redirection on the TEXT command 
  10233.  itself, but not on the actual text lines or the ENDTEXT line.  No environment 
  10234.  variable expansion or other processing is performed on the lines between TEXT 
  10235.  and ENDTEXT; they are displayed exactly as they are stored in the batch file. 
  10236.  
  10237.  You can change screen colors by inserting ANSI escape sequences anywhere in 
  10238.  the text block.  You can also use a CLS or COLOR command to set the screen 
  10239.  color before executing the TEXT command. 
  10240.  
  10241.  The following batch file fragment displays a simple menu: 
  10242.  
  10243.           @echo off & cls
  10244.           screen 2 0
  10245.           text
  10246.           Enter one of the following:
  10247.              1 - Spreadsheet
  10248.              2 - Word Processing
  10249.              3 - Utilities
  10250.           endtext
  10251.  
  10252.  
  10253. ΓòÉΓòÉΓòÉ 14.73. TIME - Set the system time ΓòÉΓòÉΓòÉ
  10254.  
  10255.  Purpose:    Display or set the current system time. 
  10256.  
  10257.  Format:     TIME [hh [:mm [:ss ]]] [AM | PM] 
  10258.  
  10259.              hh :  The hour (0 - 23). 
  10260.              mm :  The minute (0 - 59). 
  10261.              ss :  The second (0 - 59). 
  10262.  
  10263.  See also:  CHCP and DATE. 
  10264.  
  10265.  Usage 
  10266.  
  10267.  If you don't enter any parameters, TIME will display the current system time 
  10268.  and prompt you for a new time.  Press Enter if you don't wish to change the 
  10269.  time; otherwise, enter the new time: 
  10270.  
  10271.           [c:\] time
  10272.           Thu  Dec 22, 1994  9:30:10
  10273.           New time (hh:mm:ss):
  10274.  
  10275.  TIME defaults to 24-hour format, but you can optionally enter the time in 
  10276.  12-hour format by appending "a", "am", "p", or "pm" to the time you enter. 
  10277.  
  10278.  For example, to enter the time as 9:30 am: 
  10279.  
  10280.           [c:\] time 9:30 am
  10281.  
  10282.  OS/2 adds the system time and date to the directory entry for every file you 
  10283.  create or modify.  If you keep both the time and date accurate, you will have 
  10284.  a record of when you last updated each file. 
  10285.  
  10286.  
  10287. ΓòÉΓòÉΓòÉ 14.74. TIMER - Start or stop a stopwatch ΓòÉΓòÉΓòÉ
  10288.  
  10289.  Purpose:    TIMER is a system stopwatch. 
  10290.  
  10291.  Format:     TIMER [ON] [/1 /2 /3 /S] 
  10292.  
  10293.              ON:  Force the stopwatch to restart 
  10294.  
  10295.              /1 (stopwatch #1)               /3 (stopwatch #3) 
  10296.              /2 (stopwatch #2)               /S(plit) 
  10297.  
  10298.  Usage 
  10299.  
  10300.  The TIMER command turns a system stopwatch on and off.  When you first run 
  10301.  TIMER, the stopwatch starts: 
  10302.  
  10303.           [c:\] timer
  10304.           Timer 1 on:  12:21:46
  10305.  
  10306.  When you run TIMER again, the stopwatch stops and the elapsed time is 
  10307.  displayed: 
  10308.  
  10309.           [c:\] timer
  10310.           Timer 1 off:  12:21:58   Elapsed time: 0:00:12.06
  10311.  
  10312.  There are three stopwatches available (1, 2, and 3) so you can time multiple 
  10313.  overlapping events.  By default, TIMER uses stopwatch #1. 
  10314.  
  10315.  The smallest interval TIMER can measure depends on the operating system you 
  10316.  are using, your hardware, and the interaction between the two.  However, it 
  10317.  should never be greater than .06 second.  The largest interval is 23 hours, 59 
  10318.  minutes, 59.99 seconds. 
  10319.  
  10320.  Options 
  10321.  
  10322.     /1:     Use timer #1 (the default). 
  10323.  
  10324.     /2:     Use timer #2. 
  10325.  
  10326.     /3:     Use timer #3. 
  10327.  
  10328.     /S:     (Split) Display a split time without stopping the timer.  To 
  10329.             display the current elapsed time but leave the timer running: 
  10330.  
  10331.                                 [c:\] timer /s
  10332.                                 Timer 1 elapsed: 0:06:40.63
  10333.  
  10334.     ON:     Start the timer regardless of its previous state (on or off). 
  10335.             Otherwise the TIMER command toggles the timer state (unless /S is 
  10336.             used). 
  10337.  
  10338.  
  10339. ΓòÉΓòÉΓòÉ 14.75. TYPE - Display file(s) ΓòÉΓòÉΓòÉ
  10340.  
  10341.  Purpose:    Display the contents of the specified file(s). 
  10342.  
  10343.  Format:     TYPE [/A:[[-]rhsda] /L /P] file... 
  10344.  
  10345.              file :  The file or list of files that you want to display. 
  10346.  
  10347.              /A:(ttribute select)            /P(ause) 
  10348.              /L(ine numbers) 
  10349.  
  10350.  See also:  LIST. 
  10351.  
  10352.  File Selection 
  10353.  
  10354.  Supports extended wildcards, ranges, multiple file names, and include lists. 
  10355.  
  10356.  Usage 
  10357.  
  10358.  The TYPE command displays a file.  It is normally only useful for displaying 
  10359.  ASCII text files.  Executable files (.COM and .EXE ) and many data files may 
  10360.  be unreadable when displayed with TYPE because they include non-alphanumeric 
  10361.  characters. 
  10362.  
  10363.  To display the files MEMO1 and MEMO2 : 
  10364.  
  10365.           [c:\] type /p memo1 memo2
  10366.  
  10367.  You can press Ctrl-S to pause TYPE's display and then any key to continue. 
  10368.  
  10369.  You will probably find LIST to be more useful for displaying files. However, 
  10370.  the TYPE /L command used with redirection is useful if you want to add line 
  10371.  numbers to a file. 
  10372.  
  10373.  Options 
  10374.  
  10375.     /A:     (Attribute select) Select only those files that have the specified 
  10376.             attribute(s) set.  Preceding the attribute character with a hyphen 
  10377.             [-] will select files that do not have that attribute set.  The 
  10378.             attributes are: 
  10379.  
  10380.                  R  Read-only 
  10381.                  H  Hidden 
  10382.                  S  System 
  10383.                  D  Subdirectory 
  10384.                  A  Archive 
  10385.  
  10386.             If no attributes are listed at all (e.g., TYPE /A: ...), TYPE will 
  10387.             select all files and subdirectories including hidden and system 
  10388.             files.  If attributes are combined, all the specified attributes 
  10389.             must match for a file to be selected. For example, /A:RHS will 
  10390.             select only those files with all three attributes set. 
  10391.  
  10392.     /L:     (Line numbers) Display a line number preceding each line of text. 
  10393.  
  10394.     /P:     (Pause) Prompt after displaying each page.  Your options at the 
  10395.             prompt are explained in detail under Page and File Prompts. 
  10396.  
  10397.  
  10398. ΓòÉΓòÉΓòÉ 14.76. UNALIAS - Remove aliases ΓòÉΓòÉΓòÉ
  10399.  
  10400.  Purpose:    Remove aliases from the alias list. 
  10401.  
  10402.  Format:     UNALIAS [/Q] alias... 
  10403.                 or 
  10404.              UNALIAS * 
  10405.  
  10406.              alias :  One or more aliases to remove from memory. 
  10407.  
  10408.              /Q(uiet) 
  10409.  
  10410.  See also:  ALIAS and ESET. 
  10411.  
  10412.  Usage 
  10413.  
  10414.  4OS2 maintains a list of the aliases that you have defined.  The UNALIAS 
  10415.  command will remove aliases from that list.  You can remove one or more 
  10416.  aliases by name, or you can delete the entire alias list by using the command 
  10417.  UNALIAS *. 
  10418.  
  10419.  For example, to remove the alias DDIR: 
  10420.  
  10421.           [c:\] unalias ddir
  10422.  
  10423.  To remove all the aliases: 
  10424.  
  10425.           [c:\] unalias *
  10426.  
  10427.  Options 
  10428.  
  10429.     /Q:     (Quiet) Prevents UNALIAS from displaying an error message if one or 
  10430.             more of the aliases does not exist.  This option is most useful in 
  10431.             batch files, for removing a group of aliases when some of the 
  10432.             aliases may not have been defined. 
  10433.  
  10434.  
  10435. ΓòÉΓòÉΓòÉ 14.77. UNSET - Remove environment variables ΓòÉΓòÉΓòÉ
  10436.  
  10437.  Purpose:    Remove variables from the environment. 
  10438.  
  10439.  Format:     UNSET  [/Q] name... 
  10440.                 or 
  10441.              UNSET * 
  10442.  
  10443.              name :  One or more variables to remove from the environment. 
  10444.  
  10445.              /Q(uiet) 
  10446.  
  10447.  See also:  ESET and SET. 
  10448.  
  10449.  Usage 
  10450.  
  10451.  UNSET removes one or more variables from the environment.  For example, to 
  10452.  remove the variable CMDLINE: 
  10453.  
  10454.           [c:\] unset cmdline
  10455.  
  10456.  If you use the command UNSET *, all of the environment variables will be 
  10457.  deleted: 
  10458.  
  10459.           [c:\] unset *
  10460.  
  10461.  UNSET is often used in conjunction with the SETLOCAL and ENDLOCAL commands in 
  10462.  order to clear the environment of variables that may cause problems for some 
  10463.  applications. 
  10464.  
  10465.  For more information on environment variables, see the SET command and the 
  10466.  general discussion of the environment. 
  10467.  
  10468.  Use caution when removing environment variables, and especially when using 
  10469.  UNSET *.  Many programs will not work properly without certain environment 
  10470.  variables; for example, 4OS2 uses PATH and DPATH. 
  10471.  
  10472.  Options 
  10473.  
  10474.     /Q:     (Quiet) Prevents UNSET from displaying an error message if one or 
  10475.             more of the variables does not exist.  This option is most useful 
  10476.             in batch files, for removing a group of variables when some of the 
  10477.             variables may not have been defined. 
  10478.  
  10479.  
  10480. ΓòÉΓòÉΓòÉ 14.78. VER - Display the 4OS2 and OS/2 version ΓòÉΓòÉΓòÉ
  10481.  
  10482.  Purpose:    Display the current command processor and operating system 
  10483.              versions. 
  10484.  
  10485.  Format:     VER [/R] 
  10486.  
  10487.              /R(evision level) 
  10488.  
  10489.  Usage 
  10490.  
  10491.  Version numbers consist of a one-digit major version number, a period, and a 
  10492.  one- or two-digit minor version number.  The VER command displays both version 
  10493.  numbers: 
  10494.  
  10495.           [c:\] ver
  10496.  
  10497.           4OS2/32 2.5   OS/2 Version is 2.1
  10498.  
  10499.  Option 
  10500.  
  10501.     /R:     (Revision level) Display the 4OS2 and OS/2 internal revision levels 
  10502.             (if any), plus your 4OS2 serial number and registered name. 
  10503.  
  10504.  
  10505. ΓòÉΓòÉΓòÉ 14.79. VERIFY - Enable or disable disk write verification ΓòÉΓòÉΓòÉ
  10506.  
  10507.  Purpose:    Enable or disable disk write verification or display the 
  10508.              verification state. 
  10509.  
  10510.  Format:     VERIFY [ON | OFF] 
  10511.  
  10512.  Usage 
  10513.  
  10514.  OS/2 maintains an internal verify flag.  When the flag is on, OS/2 attempts to 
  10515.  verify each disk write by making sure that the data written to the disk can be 
  10516.  read back successfully into the computer.  It does not compare the data 
  10517.  written with the data actually placed on disk. 
  10518.  
  10519.  If used without any parameters, VERIFY will display the state of the verify 
  10520.  flag: 
  10521.  
  10522.           [c:\] verify
  10523.           VERIFY is OFF
  10524.  
  10525.  VERIFY is off when the system boots up.  Once it is turned on with the VERIFY 
  10526.  ON command, it stays on until you use the VERIFY OFF command or until you 
  10527.  reboot. 
  10528.  
  10529.  Verification will slow your disk write operations slightly (the effect is not 
  10530.  usually noticeable). 
  10531.  
  10532.  
  10533. ΓòÉΓòÉΓòÉ 14.80. VOL - Display disk volume labels ΓòÉΓòÉΓòÉ
  10534.  
  10535.  Purpose:    Display disk volume label(s). 
  10536.  
  10537.  Format:     VOL [d :] ... 
  10538.  
  10539.              d:  The drive or drives to search for labels. 
  10540.  
  10541.  Usage 
  10542.  
  10543.  Each disk may have a volume label, created when the disk is formatted or with 
  10544.  the external LABEL command.  Also, every floppy disk formatted with DOS 
  10545.  version 4.0 or above, OS/2, or Windows NT has a volume serial number. 
  10546.  
  10547.  The VOL command will display the volume label and, if available, the volume 
  10548.  serial number of a disk volume.  If the disk doesn't have a volume label, VOL 
  10549.  will report that it is "unlabeled."  If you don't specify a drive, VOL 
  10550.  displays information about the current drive: 
  10551.  
  10552.           [c:\] vol
  10553.           Volume in drive C: is MYHARDDISK
  10554.  
  10555.  If available, the volume serial number will appear after the drive label or 
  10556.  name. 
  10557.  
  10558.  To display the disk labels for drives A and B: 
  10559.  
  10560.           [c:\] vol a: b:
  10561.           Volume in drive A: is unlabeled
  10562.           Volume in drive B: is BACKUP_2
  10563.  
  10564.  
  10565. ΓòÉΓòÉΓòÉ 14.81. VSCRPUT - Display text vertically and in color ΓòÉΓòÉΓòÉ
  10566.  
  10567.  Purpose:    Display text vertically in the specified color. 
  10568.  
  10569.  Format:     VSCRPUT  row col [BRIght] [BLInk] fg ON [BRIght] bg text 
  10570.  
  10571.              row :  Starting row number. 
  10572.              col :  Starting column number. 
  10573.              fg :  Foreground text color. 
  10574.              bg :  Background text color. 
  10575.              text :  The text to display. 
  10576.  
  10577.  See also:  SCRPUT. 
  10578.  
  10579.  Usage 
  10580.  
  10581.  VSCRPUT writes text vertically on the screen rather than horizontally.  Like 
  10582.  the SCRPUT command, it uses the colors you specify to write the text.  VSCRPUT 
  10583.  can be used for simple graphs and charts generated by batch files.  It always 
  10584.  leaves the cursor in its current position.  See Colors and Color Names for 
  10585.  details about colors and notes on the use of bright background colors. 
  10586.  
  10587.  The row and column are zero-based, so on a standard 25 line by 80 column 
  10588.  display, valid rows are 0 - 24 and valid columns are 0 - 79.  You can also 
  10589.  specify the row and column as offsets from the current cursor position.  Begin 
  10590.  the value with a plus sign [+] to move down the specified number of rows or to 
  10591.  the right the specified number of columns before displaying text, or with a 
  10592.  minus sign [-] to move up or to the left. 
  10593.  
  10594.  VSCRPUT checks for a valid row and column, and displays a "Usage" error 
  10595.  message if either value is out of range. 
  10596.  
  10597.  
  10598. ΓòÉΓòÉΓòÉ 14.82. WINDOW - Change the window state or title ΓòÉΓòÉΓòÉ
  10599.  
  10600.  Purpose:    Minimize or maximize the current window, restore the default 
  10601.              window size, or change the window title. 
  10602.  
  10603.  Format:     WINDOW [MIN | MAX | RESTORE | /POS=row,col,width,height | "title 
  10604.              "] 
  10605.  
  10606.              title :  A new title for the window. 
  10607.  
  10608.              /POS(ition) 
  10609.  
  10610.  Usage 
  10611.  
  10612.  WINDOW is used to control the appearance and title of the current window. 
  10613.  WINDOW MIN reduces the window to an icon, WINDOW MAX enlarges it to its 
  10614.  maximum size, and WINDOW RESTORE returns the window to its default size and 
  10615.  location on the desktop. 
  10616.  
  10617.  Only one WINDOW option can be used at a time.  To make multiple changes in the 
  10618.  window state (for example, to maximize the window and change its title) you 
  10619.  must issue the WINDOW command once for each change. 
  10620.  
  10621.  You can use the /POS option to set the location and size of the window on the 
  10622.  desktop.  The row and column values of the /POS option select the window's 
  10623.  origin while the width and height values determine its size. 
  10624.  
  10625.  If you specify a new title, the title text must be enclosed in double quotes. 
  10626.  The quotes will not appear as part of the actual title. 
  10627.  
  10628.  Only one WINDOW option can be used at a time.  To make multiple changes in the 
  10629.  window state (for example, to maximize the window and change its title) you 
  10630.  must issue the WINDOW command once for each change. 
  10631.  
  10632.  Option 
  10633.  
  10634.     /POS:   (Position) Set the window position and size on the screen.  The 
  10635.             syntax is /POS=row, col, width, height where the values are 
  10636.             specified in pixels or pels.  Row and col refer to the position of 
  10637.             the bottom left corner of the window relative to the bottom left 
  10638.             corner of the screen. 
  10639.  
  10640.  
  10641. ΓòÉΓòÉΓòÉ 14.83. Y - "Y" pipe fitting ΓòÉΓòÉΓòÉ
  10642.  
  10643.  Purpose:    Copy standard input to standard output, and then copy the 
  10644.              specified file(s) to standard output. 
  10645.  
  10646.  Format:     Y file ... 
  10647.  
  10648.              file :  The file or list of files to send to standard output. 
  10649.  
  10650.  See also:  TEE. 
  10651.  
  10652.  Usage 
  10653.  
  10654.  The Y command copies input from standard input (usually the keyboard) to 
  10655.  standard output (usually the screen).  Once the input ends, the named files 
  10656.  are appended to standard output. 
  10657.  
  10658.  For example, to get text from standard input, append the files MEMO1 and MEMO2 
  10659.  to it, and send the output to MEMOS : 
  10660.  
  10661.           [c:\] y memo1 memo2 > memos
  10662.  
  10663.  The Y command is most useful if you want to add redirected data to the 
  10664.  beginning of a file instead of appending it to the end.  For example, this 
  10665.  command copies the output of DIR, followed by the contents of  the file 
  10666.  DIREND, to the file DIRALL: 
  10667.  
  10668.           [c:\] dir | y dirend > dirall
  10669.  
  10670.  If you are typing at the keyboard to produce input text for Y, you must enter 
  10671.  a Ctrl-Z to terminate the input. 
  10672.  
  10673.  When using Y with a pipe you must take into account that the programs on the 
  10674.  two ends of the pipe run simultaneously, not sequentially. 
  10675.  
  10676.  See Piping for more information on pipes. 
  10677.  
  10678.  
  10679. ΓòÉΓòÉΓòÉ 15. Error Messages ΓòÉΓòÉΓòÉ
  10680.  
  10681. This section lists error messages generated by 4OS2, and includes a recommended 
  10682. course of action for most errors.  If you are unable to resolve the problem, 
  10683. look through your Introduction and Installation Guide for any additional 
  10684. troubleshooting recommendations, then contact JP Software for technical 
  10685. support. 
  10686.  
  10687. Error messages relating to files are generally reports of errors returned by 
  10688. OS/2.  You may find some of these messages (for example, "Access denied") vague 
  10689. enough that they are not always helpful.  4OS2 includes the file name in file 
  10690. error messages, but is often unable to determine a more accurate explanation of 
  10691. these errors.  The message shown is the best information available based on the 
  10692. error codes returned by OS/2. 
  10693.  
  10694. The following list includes all error messages, in alphabetical order: 
  10695.  
  10696. Access denied:  You tried to write to or erase a read-only file, rename a file 
  10697. or directory to an existing name, create a directory that already exists, 
  10698. remove a read-only directory or a directory with files or subdirectories still 
  10699. in it, or access a file in use by another program in a multitasking system. 
  10700.  
  10701. Alias loop:  An alias refers back to itself either directly or indirectly 
  10702. (i.e., a = b = a), or aliases are nested more than 16 deep.  Correct your alias 
  10703. list. 
  10704.  
  10705. Bad disk unit:  Generally caused by a disk drive hardware failure. 
  10706.  
  10707. Batch file missing:  4OS2 can't find the batch (.BTM or .CMD ) file it was 
  10708. running.  It was either deleted, renamed, moved, or the disk was changed. 
  10709. Correct the problem and rerun the file. 
  10710.  
  10711. Can't copy file to itself:  You cannot COPY or MOVE a file to itself.  4OS2 
  10712. performs full path and filename expansion before copying to ensure that files 
  10713. aren't inadvertently destroyed. 
  10714.  
  10715. Can't create:  4OS2 can't create the specified file.  The disk may be full or 
  10716. write protected, or the file already exists and is read-only, or the root 
  10717. directory is full. 
  10718.  
  10719. Can't delete:  4OS2 can't delete the specified file or directory.  The disk is 
  10720. probably write protected. 
  10721.  
  10722. Can't get directory:  4OS2 can't read the directory.  The disk drive is 
  10723. probably not ready. 
  10724.  
  10725. Can't make directory entry:  4OS2 can't create the filename in the directory. 
  10726. This is usually caused by a full root directory. Create a subdirectory and move 
  10727. some of the files to it. 
  10728.  
  10729. Can't open:  4OS2 can't open the specified file.  Either the file doesn't exist 
  10730. or the disk directory or File Allocation Table is damaged. 
  10731.  
  10732. Can't remove current directory:  You attempted to remove the current directory, 
  10733. which OS/2 does not allow.  Change to the parent directory and try again. 
  10734.  
  10735. Command line too long:  A single command exceeded 1023 characters, or the 
  10736. entire command line exceeded 2047 characters, during alias and variable 
  10737. expansion.  Reduce the complexity of the command or use a batch file.  Also 
  10738. check for an alias which refers back to itself either directly or indirectly. 
  10739.  
  10740. Command only valid in batch file:  You have tried to use a batch file command, 
  10741. like DO or GOSUB, from the command line or in an alias.  A few commands can 
  10742. only be used in batch files (see the individual commands for details). 
  10743.  
  10744. Contents lost before copy:  COPY was appending files, and found one of the 
  10745. source files is the same as the target.  That source file is skipped, and 
  10746. appending continues with the next file. 
  10747.  
  10748. Data error:  OS/2 can't read or write properly to the device. On a floppy 
  10749. drive, this error is usually caused by a defective floppy disk, dirty disk 
  10750. drive heads, or a misalignment between the heads on your drive and the drive on 
  10751. which the disk was created. On a hard drive, this error may indicate a drive 
  10752. that is too hot or too cold, or a hardware problem.  Retry the operation; if it 
  10753. fails again, correct the hardware or diskette problem. 
  10754.  
  10755. Directory stack empty:  POPD or DIRS can't find any entries in the directory 
  10756. stack. 
  10757.  
  10758. Disk is write protected:  The disk cannot be written to.  Check the disk and 
  10759. remove the write-protect tab or close the write- protect window if necessary. 
  10760.  
  10761. Drive not ready -- close door:  The floppy disk drive door is open.  Close the 
  10762. door and try again. 
  10763.  
  10764. Environment already saved:  You have already saved the environment with a 
  10765. previous SETLOCAL command.  You cannot nest SETLOCAL / ENDLOCAL pairs. 
  10766.  
  10767. Error in command-line directive:  You used the //iniline option to place an 
  10768. 4OS2.INI directive on the startup command line, but the directive is in error. 
  10769. A more specific error message follows. 
  10770.  
  10771. Error on line [nnnn] of [filename]:  There is an error in your 4OS2.INI file. 
  10772. The following message explains the error in more detail.  Correct the line in 
  10773. error and restart 4OS2 for your change to take effect. 
  10774.  
  10775. Error reading:  OS/2 experienced an I/O error when reading from a device.  This 
  10776. is usually caused by a bad disk, a device not ready, or a hardware error. 
  10777.  
  10778. Error writing:  OS/2 experienced an I/O error when writing to a device.  This 
  10779. is usually caused by a full disk, a bad disk, a device not ready, or a hardware 
  10780. error. 
  10781.  
  10782. Exceeded batch nesting limit:  You have attempted to nest batch files more than 
  10783. 10 levels deep. 
  10784.  
  10785. File Allocation Table bad:  OS/2  can't access the FAT on the specified disk. 
  10786. This can be caused by a bad disk, a hardware error, or an unusual software 
  10787. interaction. 
  10788.  
  10789. File exists:  The requested output file already exists, and 4OS2 won't 
  10790. overwrite it. 
  10791.  
  10792. File is empty:  You attempted to use an empty file in @SELECT.  Correct the 
  10793. file name or contents and try again. 
  10794.  
  10795. File not found:  4OS2 couldn't find the specified file.  Check the spelling and 
  10796. path name. 
  10797.  
  10798. General failure:  This is usually a hardware problem, particularly a disk drive 
  10799. failure or a device not properly connected to a serial or parallel port.  Try 
  10800. to correct the problem, or reboot and try again.  Also see Data error above; 
  10801. the problems described there can sometimes cause a general failure rather than 
  10802. a data error. 
  10803.  
  10804. Infinite COPY or MOVE loop:  You tried to COPY or MOVE a directory to one of 
  10805. its own subdirectories and used the /S switch, so the command would run 
  10806. forever.  Correct the command and try again. 
  10807.  
  10808. Insufficient disk space:  COPY or MOVE ran out of room on the destination 
  10809. drive.  Remove some files and retry the operation. 
  10810.  
  10811. Invalid character value:  You gave an invalid value for a character directive 
  10812. in the 4OS2.INI file. 
  10813.  
  10814. Invalid choice value:  You gave an invalid value for a "choice" directive (one 
  10815. that accepts a choice from a list, like "Yes" or "No") in the 4OS2.INI file. 
  10816.  
  10817. Invalid color:  You gave an invalid value for a color directive in the 4OS2.INI 
  10818. file. 
  10819.  
  10820. Invalid date:  An invalid date was entered.  Check the syntax and reenter. 
  10821.  
  10822. Invalid directive name:  4OS2 can't recognize the name of a directive in your 
  10823. 4OS2.INI file. 
  10824.  
  10825. Invalid drive:  A bad or non-existent disk drive was specified. 
  10826.  
  10827. Invalid key name:  You tried to make an invalid key substitution in the 
  10828. 4OS2.INI file, or you used an invalid key name in a keystroke alias or command. 
  10829. Correct the error and retry the operation. 
  10830.  
  10831. Invalid numeric value:  You gave an invalid value for a numeric directive in 
  10832. the 4OS2.INI file. 
  10833.  
  10834. Invalid parameter:  4OS2 didn't recognize a parameter.  Check the syntax and 
  10835. spelling of the command you entered. 
  10836.  
  10837. Invalid path:  The specified path does not exist.  Check the disk specification 
  10838. and/or spelling. 
  10839.  
  10840. Invalid path or file name:  You used an invalid path or filename in a directive 
  10841. in the 4OS2.INI file. 
  10842.  
  10843. Invalid time:  An invalid time was entered.  Check the syntax and reenter. 
  10844.  
  10845. Keystroke substitution table full:  4OS2 ran out of room to store keystroke 
  10846. substitutions entered in the 4OS2.INI file.  Reduce the number of key 
  10847. substitutions or contact JP Software for assistance. 
  10848.  
  10849. Label not found:  A GOTO or GOSUB referred to a non-existent label. Check your 
  10850. batch file. 
  10851.  
  10852. Missing ENDTEXT:  A TEXT command is missing a matching ENDTEXT.  Check the 
  10853. batch file. 
  10854.  
  10855. Missing GOSUB:  4OS2 cannot perform the RETURN command in a batch file.  You 
  10856. tried to do a RETURN without a GOSUB, or your batch file has been corrupted. 
  10857.  
  10858. Missing SETLOCAL:  An ENDLOCAL was used without a matching SETLOCAL. 
  10859.  
  10860. No aliases defined:  You tried to display aliases but no aliases have been 
  10861. defined. 
  10862.  
  10863. No closing quote:  4OS2 couldn't find a second matching back quote [`] or 
  10864. double-quote ["] on the command line. 
  10865.  
  10866. No expression:  The expression passed to the %@EVAL variable function is empty. 
  10867. Correct the expression and retry the operation. 
  10868.  
  10869. No room for INI file name:  4OS2 does not have enough space to pass the name of 
  10870. your 4OS2.INI file to secondary shells; see String area overflow for more 
  10871. details.  Any [Secondary] section in 4OS2.INI will be ignored in secondary 
  10872. shells until the problem is corrected and the system or session is restarted. 
  10873.  
  10874. Not a windowed session:  You tried to use the WINDOW command in a full-screen 
  10875. session.  WINDOW is valid only in windowed sessions. 
  10876.  
  10877. Not an alias:  The specified alias is not in the alias list. 
  10878.  
  10879. Not in environment:  The specified variable is not in the environment. 
  10880.  
  10881. Not ready:  The specified device can't be accessed. 
  10882.  
  10883. Not same device:  This error usually appears in RENAME.  You cannot rename a 
  10884. file to a different disk drive. 
  10885.  
  10886. Out of memory:  4OS2 or OS/2 had insufficient memory to execute the last 
  10887. command.  Try to free some memory by closing other sessions.  If the error 
  10888. persists, contact JP Software for assistance. 
  10889.  
  10890. Out of paper:  OS/2 detected an out-of-paper condition on one of the printers 
  10891. (LPT1, LPT2, or LPT3).  Check your printer and add paper if necessary. 
  10892.  
  10893. Overflow:  An arithmetic overflow occurred in the %@EVAL variable function. 
  10894. Check the values being passed to %@EVAL. %@EVAL can handle 16 digits to the 
  10895. left of the decimal point and 8 to the right. 
  10896.  
  10897. Read error:  OS/2 encountered a disk read error; usually caused by a bad or 
  10898. unformatted disk. 
  10899.  
  10900. Sector not found:  Disk error, usually caused by a bad or unformatted disk. 
  10901.  
  10902. Seek error:  OS/2 can't seek to the proper location on the disk.  This is 
  10903. generally caused by a bad disk or drive. 
  10904.  
  10905. Sharing violation:  You tried to access a file in use by another program in a 
  10906. multitasking system or on a network.  Wait for the file to become available, or 
  10907. change your method of operation so that another program does not have the file 
  10908. open while you are trying to use it. 
  10909.  
  10910. String area overflow:  4OS2 ran out of room to store the text from string 
  10911. directives in the 4OS2.INI file.  Reduce the complexity of the 4OS2.INI file or 
  10912. contact JP Software for assistance. 
  10913.  
  10914. Syntax error:  A command or variable function was entered in an improper 
  10915. format.  Check the syntax and correct the error. 
  10916.  
  10917. Too many open files:  OS/2 has run out of file handles. Try increasing the 
  10918. FILES setting in CONFIG.SYS. 
  10919.  
  10920. Unbalanced parentheses:  The number of left and right parentheses did not match 
  10921. in an expression passed to the %@EVAL variable function.  Correct the 
  10922. expression and retry the operation. 
  10923.  
  10924. Unknown command:  A command was entered that 4OS2 didn't recognize and couldn't 
  10925. find in the current search path.  Check the spelling or PATH specification. 
  10926. You can handle unknown commands with the UNKNOWN_CMD alias (see ALIAS). 
  10927.  
  10928. Variable loop:  A nested environment variable refers to itself, or variables 
  10929. are nested more than 16 deep.  Correct the error and retry the command. 
  10930.  
  10931. Write error:  OS/2 encountered a disk write error; usually caused by a bad or 
  10932. unformatted disk. 
  10933.  
  10934.  
  10935. ΓòÉΓòÉΓòÉ 16. Reference Tables ΓòÉΓòÉΓòÉ
  10936.  
  10937. The reference tables in this section are based on U.S. English conventions. 
  10938. Your system may differ if it is configured for a different country or language. 
  10939. See your operating system documentation for more information about country and 
  10940. language support. 
  10941.  
  10942. To represent the text you type, computers must translate each letter to and 
  10943. from a number.  The code used by all PC-compatible computers for this 
  10944. translation is called ASCII.  Function keys, cursor keys, and Alt keys generate 
  10945. scan codes indicating which key was pressed, but not ASCII codes. The tables in 
  10946. this section cover both kinds of codes. 
  10947.  
  10948. For more information, see: 
  10949.  
  10950.             ASCII Table 
  10951.             Key Codes and Scan Codes Table 
  10952.             Key Codes and Scan Codes Explanation 
  10953.             ANSI Commands 
  10954.  
  10955.  
  10956. ΓòÉΓòÉΓòÉ 16.1. ASCII Table ΓòÉΓòÉΓòÉ
  10957.  
  10958.                       Control Characters
  10959.  
  10960.     Dec  Hex  Chr  Nam  Ctl   Γöé   Dec  Hex  Chr  Nam  Ctl
  10961.     ---  ---  ---  ---  ---   Γöé   ---  ---  ---  ---  ---
  10962.     000   00       NUL   ^@   Γöé   016   10      DLE   ^P
  10963.     001   01      SOH   ^A   Γöé   017   11      DC1   ^Q
  10964.     002   02      STX   ^B   Γöé   018   12      DC2   ^R
  10965.     003   03      ETX   ^C   Γöé   019   13      DC3   ^S
  10966.     004   04      EOT   ^D   Γöé   020   14      DC4   ^T
  10967.     005   05      ENQ   ^E   Γöé   021   15      NAK   ^U
  10968.     006   06      ACK   ^F   Γöé   022   16      SYN   ^V
  10969.     007   07       BEL   ^G   Γöé   023   17      ETB   ^W
  10970.     008   08      BS    ^H   Γöé   024   18      CAN   ^X
  10971.     009   09       HT    ^I   Γöé   025   19      EM    ^Y
  10972.     010   0A       LF    ^J   Γöé   026   1A      SUB   ^Z
  10973.     011   0B       VT    ^K   Γöé   027   1B      ESC   ^[
  10974.     012   0C       FF    ^L   Γöé   028   1C      FS    ^\
  10975.     013   0D       CR    ^M   Γöé   029   1D      GS    ^]
  10976.     014   0E      SO    ^N   Γöé   030   1E      RS    ^^
  10977.     015   0F      SI    ^O   Γöé   031   1F      US    ^_
  10978.  
  10979.                   Punctuation, Digits, Upper Case
  10980.  
  10981.   Dec  Hex  Chr Γöé  Dec  Hex  Chr Γöé  Dec  Hex  Chr Γöé  Dec  Hex  Chr
  10982.   ---  ---  --- Γöé  ---  ---  --- Γöé  ---  ---  --- Γöé  ---  ---  ---
  10983.   032   20      Γöé  048   30   0  Γöé  064   40   @  Γöé  080   50   P
  10984.   033   21   !  Γöé  049   31   1  Γöé  065   41   A  Γöé  081   51   Q
  10985.   034   22   "  Γöé  050   32   2  Γöé  066   42   B  Γöé  082   52   R
  10986.   035   23   #  Γöé  051   33   3  Γöé  067   43   C  Γöé  083   53   S
  10987.   036   24   $  Γöé  052   34   4  Γöé  068   44   D  Γöé  084   54   T
  10988.   037   25   %  Γöé  053   35   5  Γöé  069   45   E  Γöé  085   55   U
  10989.   038   26   &  Γöé  054   36   6  Γöé  070   46   F  Γöé  086   56   V
  10990.   039   27   '  Γöé  055   37   7  Γöé  071   47   G  Γöé  087   57   W
  10991.   040   28   (  Γöé  056   38   8  Γöé  072   48   H  Γöé  088   58   X
  10992.   041   29   )  Γöé  057   39   9  Γöé  073   49   I  Γöé  089   59   Y
  10993.   042   2A   *  Γöé  058   3A   :  Γöé  074   4A   J  Γöé  090   5A   Z
  10994.   043   2B   +  Γöé  059   3B   ;  Γöé  075   4B   K  Γöé  091   5B   [
  10995.   044   2C   ,  Γöé  060   3C   <  Γöé  076   4C   L  Γöé  092   5C   \
  10996.   045   2D   -  Γöé  061   3D   =  Γöé  077   4D   M  Γöé  093   5D   ]
  10997.   046   2E   .  Γöé  062   3E   >  Γöé  078   4E   N  Γöé  094   5E   ^
  10998.   047   2F   /  Γöé  063   3F   ?  Γöé  079   4F   O  Γöé  095   5F   _
  10999.  
  11000.                    Lower Case, Miscellaneous
  11001.  
  11002.                  Dec  Hex  Chr Γöé  Dec  Hex  Chr
  11003.                  ---  ---  --- Γöé  ---  ---  ---
  11004.                  096   60   `  Γöé  112   70   p
  11005.                  097   61   a  Γöé  113   71   q
  11006.                  098   62   b  Γöé  114   72   r
  11007.                  099   63   c  Γöé  115   73   s
  11008.                  100   64   d  Γöé  116   74   t
  11009.                  101   65   e  Γöé  117   75   u
  11010.                  102   66   f  Γöé  118   76   v
  11011.                  103   67   g  Γöé  119   77   w
  11012.                  104   68   h  Γöé  120   78   x
  11013.                  105   69   i  Γöé  121   79   y
  11014.                  106   6A   j  Γöé  122   7A   z
  11015.                  107   6B   k  Γöé  123   7B   {
  11016.                  108   6C   l  Γöé  124   7C   |
  11017.                  109   6D   m  Γöé  125   7D   }
  11018.                  110   6E   n  Γöé  126   7E   ~
  11019.                  111   6F   o  Γöé  127   7F   
  11020.  
  11021.                 International; Graphics Characters 1
  11022.  
  11023.   Dec  Hex  Chr Γöé  Dec  Hex  Chr Γöé  Dec  Hex  Chr Γöé  Dec  Hex  Chr
  11024.   ---  ---  --- Γöé  ---  ---  --- Γöé  ---  ---  --- Γöé  ---  ---  ---
  11025.   128   80   ╨É  Γöé  144   90   ╨á  Γöé  160   A0   ╨░  Γöé  176   B0   Γûæ
  11026.   129   81   ╨æ  Γöé  145   91   ╨í  Γöé  161   A1   ╨▒  Γöé  177   B1   ΓûÆ
  11027.   130   82   ╨Æ  Γöé  146   92   ╨ó  Γöé  162   A2   ╨▓  Γöé  178   B2   Γûô
  11028.   131   83   ╨ô  Γöé  147   93   ╨ú  Γöé  163   A3   ╨│  Γöé  179   B3   Γöé
  11029.   132   84   ╨ö  Γöé  148   94   ╨ñ  Γöé  164   A4   ╨┤  Γöé  180   B4   Γöñ
  11030.   133   85   ╨ò  Γöé  149   95   ╨Ñ  Γöé  165   A5   ╨╡  Γöé  181   B5   Γòí
  11031.   134   86   ╨û  Γöé  150   96   ╨ª  Γöé  166   A6   ╨╢  Γöé  182   B6   Γòó
  11032.   135   87   ╨ù  Γöé  151   97   ╨º  Γöé  167   A7   ╨╖  Γöé  183   B7   Γòû
  11033.   136   88   ╨ÿ  Γöé  152   98   ╨¿  Γöé  168   A8   ╨╕  Γöé  184   B8   Γòò
  11034.   137   89   ╨Ö  Γöé  153   99   ╨⌐  Γöé  169   A9   ╨╣  Γöé  185   B9   Γòú
  11035.   138   8A   ╨Ü  Γöé  154   9A   ╨¬  Γöé  170   AA   ╨║  Γöé  186   BA   Γòæ
  11036.   139   8B   ╨¢  Γöé  155   9B   ╨½  Γöé  171   AB   ╨╗  Γöé  187   BB   Γòù
  11037.   140   8C   ╨£  Γöé  156   9C   ╨¼  Γöé  172   AC   ╨╝  Γöé  188   BC   Γò¥
  11038.   141   8D   ╨¥  Γöé  157   9D   ╨¡  Γöé  173   AD   ╨╜  Γöé  189   BD   Γò£
  11039.   142   8E   ╨₧  Γöé  158   9E   ╨«  Γöé  174   AE   ╨╛  Γöé  190   BE   Γò¢
  11040.   143   8F   ╨ƒ  Γöé  159   9F   ╨»  Γöé  175   AF   ╨┐  Γöé  191   BF   ΓöÉ
  11041.  
  11042.                   Graphics Characters 2; Symbols
  11043.  
  11044.   Dec  Hex  Chr Γöé  Dec  Hex  Chr Γöé  Dec  Hex  Chr Γöé  Dec  Hex  Chr
  11045.   ---  ---  --- Γöé  ---  ---  --- Γöé  ---  ---  --- Γöé  ---  ---  ---
  11046.   192   C0   Γöö  Γöé  208   D0   Γò¿  Γöé  224   E0   ╤Ç  Γöé  240   F0   ╨ü
  11047.   193   C1   Γö┤  Γöé  209   D1   Γòñ  Γöé  225   E1   ╤ü  Γöé  241   F1   ╤æ
  11048.   194   C2   Γö¼  Γöé  210   D2   ΓòÑ  Γöé  226   E2   ╤é  Γöé  242   F2   ╨ä
  11049.   195   C3   Γö£  Γöé  211   D3   ΓòÖ  Γöé  227   E3   ╤â  Γöé  243   F3   ╤ö
  11050.   196   C4   ΓöÇ  Γöé  212   D4   Γòÿ  Γöé  228   E4   ╤ä  Γöé  244   F4   ╨ç
  11051.   197   C5   Γö╝  Γöé  213   D5   ΓòÆ  Γöé  229   E5   ╤à  Γöé  245   F5   ╤ù
  11052.   198   C6   Γò₧  Γöé  214   D6   Γòô  Γöé  230   E6   ╤å  Γöé  246   F6   ╨Ä
  11053.   199   C7   Γòƒ  Γöé  215   D7   Γò½  Γöé  231   E7   ╤ç  Γöé  247   F7   ╤₧
  11054.   200   C8   ΓòÜ  Γöé  216   D8   Γò¬  Γöé  232   E8   ╤ê  Γöé  248   F8   ┬░
  11055.   201   C9   Γòö  Γöé  217   D9   Γöÿ  Γöé  233   E9   ╤ë  Γöé  249   F9   ΓêÖ
  11056.   202   CA   Γò⌐  Γöé  218   DA   Γöî  Γöé  234   EA   ╤è  Γöé  250   FA   ┬╖
  11057.   203   CB   Γòª  Γöé  219   DB   Γûê  Γöé  235   EB   ╤ï  Γöé  251   FB   ΓêÜ
  11058.   204   CC   Γòá  Γöé  220   DC   Γûä  Γöé  236   EC   ╤î  Γöé  252   FC   Γäû
  11059.   205   CD   ΓòÉ  Γöé  221   DD   Γûî  Γöé  237   ED   ╤ì  Γöé  253   FD   ┬ñ
  11060.   206   CE   Γò¼  Γöé  222   DE   ΓûÉ  Γöé  238   EE   ╤Ä  Γöé  254   FE   Γûá
  11061.   207   CF   Γòº  Γöé  223   DF   ΓûÇ  Γöé  239   EF   ╤Å  Γöé  255   FF
  11062.  
  11063.  
  11064. ΓòÉΓòÉΓòÉ 16.2. Key Codes and Scan Codes Table ΓòÉΓòÉΓòÉ
  11065.  
  11066. (For more details on key codes and scan codes, see the Key Codes and Scan Codes 
  11067. Explanation.) 
  11068.  
  11069. Key names prefaced by np are on the numeric keypad.  Those prefaced by cp are 
  11070. on the cursor keypad between the main typing keys and the number keypad.  The 
  11071. numeric keypad values are valid if Num Lock is turned off.  If you need to 
  11072. specify a number key from the numeric keypad, use the scan code shown for the 
  11073. keypad and the ASCII code shown for the corresponding typewriter key.  For 
  11074. example, the keypad "7" has a scan code of 71 (the np Home scan code) and an 
  11075. ASCII code of 54 (the ASCII code for "7"). 
  11076.  
  11077. The chart is blank for key combinations that do not have scan codes or ASCII 
  11078. codes, like Ctrl-1 or Alt-PgUp. 
  11079.  
  11080.  
  11081.                         Top Two Keyboard Rows
  11082.  
  11083.                              Shift  Shift  Ctrl   Ctrl   Alt
  11084.                Scan   ASCII  Scan   ASCII  Scan   ASCII  Scan
  11085.      Key       Code   Code   Code   Code   Code   Code   Code
  11086.  
  11087.      Esc       1      27     1      27     1      27     1
  11088.      1  !      2      49     2      33                   120
  11089.      2  @      3      50     3      64     3      0      121
  11090.      3  #      4      51     4      35                   122
  11091.      4  $      5      52     5      36                   123
  11092.      5  %      6      53     6      37                   124
  11093.      6  ^      7      54     7      94     7      30     125
  11094.      7  &      8      55     8      38                   126
  11095.      8  *      9      56     9      42                   127
  11096.      9  (      10     57     10     40                   128
  11097.      0  )      11     48     11     41                   129
  11098.      -  _      12     45     12     95     12     31     130
  11099.      =  +      13     61     13     43                   131
  11100.      Backspace 14     8      14     8      14     127    14
  11101.      Tab       15     9      15     0      148    0      165
  11102.      Q         16     113    16     81     16     17     16
  11103.      W         17     119    17     87     17     23     17
  11104.      E         18     101    18     69     18     5      18
  11105.      R         19     114    19     82     19     18     19
  11106.      T         20     116    20     84     20     20     20
  11107.      Y         21     121    21     89     21     25     21
  11108.      U         22     117    22     85     22     21     22
  11109.      I         23     105    23     73     23     9      23
  11110.      O         24     111    24     79     24     15     24
  11111.      P         25     112    25     80     25     16     25
  11112.      [  {      26     91     26     123    26     27     26
  11113.      ]  }      27     93     27     125    27     29     27
  11114.      Enter     28     13     28     13     28     10     28
  11115.  
  11116.  
  11117.                        Bottom Two Keyboard Rows
  11118.  
  11119.                              Shift  Shift  Ctrl   Ctrl   Alt
  11120.                Scan   ASCII  Scan   ASCII  Scan   ASCII  Scan
  11121.      Key       Code   Code   Code   Code   Code   Code   Code
  11122.  
  11123.     A          30     97     30     65     30     1      30
  11124.     S          31     115    31     83     31     19     31
  11125.     D          32     100    32     68     32     4      32
  11126.     F          33     102    33     70     33     6      33
  11127.     G          34     103    34     71     34     7      34
  11128.     H          35     104    35     72     35     8      35
  11129.     J          36     106    36     74     36     10     36
  11130.     K          37     107    37     75     37     11     37
  11131.     L          38     108    38     76     38     12     38
  11132.     ; :        39     59     39     58                   39
  11133.     '  "       40     39     40     34                   40
  11134.     `  ~       41     96     41     126                  41
  11135.     \  |       43     92     43     124    43     28     43
  11136.     Z          44     122    44     90     44     26     44
  11137.     X          45     120    45     88     45     24     45
  11138.     C          46     99     46     67     46     3      46
  11139.     V          47     118    47     86     47     22     47
  11140.     B          48     98     48     66     48     2      48
  11141.     N          49     110    49     78     49     14     49
  11142.     M          50     109    50     77     50     13     50
  11143.     ,  <       51     44     51     60                   51
  11144.     .  >       52     46     52     62                   52
  11145.     /  ?       53     47     53     63                   53
  11146.     Space      57     32     57     32     57     32     57
  11147.  
  11148.  
  11149.                       Key Pads and Function Keys
  11150.  
  11151.                              Shift  Shift  Ctrl   Ctrl   Alt
  11152.                Scan   ASCII  Scan   ASCII  Scan   ASCII  Scan
  11153.      Key       Code   Code   Code   Code   Code   Code   Code
  11154.  
  11155.  
  11156.      F1        59     0      84     0      94     0      104
  11157.      F2        60     0      85     0      95     0      105
  11158.      F3        61     0      86     0      96     0      106
  11159.      F4        62     0      87     0      97     0      107
  11160.      F5        63     0      88     0      98     0      108
  11161.      F6        64     0      89     0      99     0      109
  11162.      F7        65     0      90     0      100    0      110
  11163.      F8        66     0      91     0      101    0      111
  11164.      F9        67     0      92     0      102    0      112
  11165.      F10       68     0      93     0      103    0      113
  11166.      F11       133    0      135    0      137    0      139
  11167.      F12       134    0      136    0      138    0      140
  11168.      np *      55     42     55     42     150    0      55
  11169.      np Home   71     0      71     55     119    0
  11170.      cp Home   71     224    71     224    119    224    151
  11171.      np Up     72     0      72     56     141    0
  11172.      cp Up     72     224    72     224    141    224    152
  11173.      np PgUp   73     0      73     57     132    0
  11174.      cp PgUp   73     224    73     224    132    224    153
  11175.      np Minus  74     45     74     45     142    0      74
  11176.      np Left   75     0      75     52     115    0
  11177.      cp Left   75     224    75     224    115    224    155
  11178.      np 5      76     0      76     53     143    0
  11179.      np Right  77     0      77     54     116    0
  11180.      cp Right  77     224    77     224    116    224    157
  11181.      np Plus   78     43     78     43     144    0      78
  11182.      np End    79     0      79     49     117    0
  11183.      cp End    79     224    79     224    117    224    159
  11184.      np Down   80     0      80     50     145    0
  11185.      cp Down   80     224    80     224    145    224    160
  11186.      np PgDn   81     0      81     51     118    0
  11187.      cp PgDn   81     224    81     224    118    224    161
  11188.      np Ins    82     0      82     48     146    0
  11189.      cp Ins    82     224    82     224    146    224    162
  11190.      np Del    83     0      83     46     147    0
  11191.      cp Del    83     224    83     224    147    224    163
  11192.      np /      224    47     224    47     149    0      164
  11193.      np Enter  224    13     224    13     224    10     166
  11194.  
  11195.  
  11196. ΓòÉΓòÉΓòÉ 16.3. Key Codes and Scan Codes Explanation ΓòÉΓòÉΓòÉ
  11197.  
  11198. (This section explains how key codes and scan codes work.  For a reference 
  11199. chart, see the Key Codes and Scan Codes Table.) 
  11200.  
  11201. When you press a single key or a key combination, OS/2 translates your 
  11202. keystroke into two numbers: a scan code, representing the actual key that was 
  11203. pressed, and an ASCII code, representing the ASCII value for that key.  OS/2 
  11204. returns these numbers the next time a program requests keyboard input.  This 
  11205. section explains how key codes work; for information on using them with 4OS2 
  11206. see the 4OS2.INI file key mapping directives, keystroke aliases, and INKEY. 
  11207.  
  11208. Most 4OS2 commands that use the numeric key codes listed here also use key 
  11209. names, which are usually more convenient to use than the numeric codes.  See 
  11210. Keys and Key Names for more information on key names. 
  11211.  
  11212. As PCs have evolved, the structure of keyboard codes has evolved somewhat 
  11213. haphazardly with them, resulting in a bewildering array of possible key codes. 
  11214. We'll give you a basic explanation of how key codes work.  For a more in-depth 
  11215. discussion, refer to a BIOS or PC hardware reference manual. 
  11216.  
  11217. The nuances of how your keyboard behaves depends on the keyboard manufacturer, 
  11218. the computer manufacturer who provides the built-in BIOS, and your operating 
  11219. system.  As a result, we can't guarantee the accuracy of the information in the 
  11220. tables for every system, but the discussion and reference table should be 
  11221. accurate for most systems.  Our discussion is based on the 101-key "enhanced" 
  11222. keyboard commonly used on 286, 386, 486, and Pentium computers, but virtually 
  11223. all of it is applicable to the 84-key keyboards on older systems.  The primary 
  11224. difference is that older keyboards lack a separate cursor pad and only have 10 
  11225. function keys. 
  11226.  
  11227. All keys have a scan code, but not all have an ASCII code.  For example, 
  11228. function keys and cursor keys are not part of the ASCII character set and have 
  11229. no ASCII value, but they do have a scan code.  Some keys have more than one 
  11230. ASCII code.  The A, for example, has ASCII code 97 (lower case "a") if you 
  11231. press it by itself.  If you press it along with Shift, the ASCII code changes 
  11232. to 65 (upper case "A").  If you press Ctrl and A the ASCII code changes to 1. 
  11233. In all these cases, the scan code (30) is unchanged because you are pressing 
  11234. the same physical key. 
  11235.  
  11236. Things are different if you press Alt-A.  Alt keystrokes have no ASCII code, so 
  11237. OS/2 returns an ASCII code of 0, along with the A key's scan code of 30.  This 
  11238. allows a program to detect all the possible variations of A, based on the 
  11239. combination of ASCII code and scan code. 
  11240.  
  11241. Some keys generate more than one scan code depending on whether Shift, Ctrl, or 
  11242. Alt is pressed.  This allows a program to differentiate between two different 
  11243. keystrokes on the same key, neither of which has a corresponding ASCII value. 
  11244. For example, F1 has no ASCII value so it returns an ASCII code of 0, and the F1 
  11245. scan code of 59.  Shift-F1 also returns an ASCII code 0; if it also returned a 
  11246. scan code of 59, a program couldn't distinguish it from F1.  The operating 
  11247. system translates scan codes for keys like Shift-F1 (and Ctrl-F1 and Alt-F1) so 
  11248. that each variation returns a different scan code along with an ASCII code of 
  11249. 0. 
  11250.  
  11251. On the 101-key keyboard there's one more variation:  non-ASCII keys on the 
  11252. cursor keypad (such as up-arrow) return the same scan code as the corresponding 
  11253. key on the numeric keypad, for compatibility reasons.  If they also returned an 
  11254. ASCII code of 0, a program couldn't tell which key was pressed.  Therefore, 
  11255. these keys return an ASCII code of 224 rather than 0.  This means that older 
  11256. programs, which only look for an ASCII 0 to indicate a non-ASCII keystroke like 
  11257. up-arrow, may not detect these cursor pad keys properly. 
  11258.  
  11259. The number of different codes returned by any given key varies from one (for 
  11260. the spacebar) to four, depending on the key, the design of your keyboard, and 
  11261. the operating system.  Some keys, like Alt, Ctrl, and Shift by themselves or in 
  11262. combination with each other, plus Print Screen, SysReq, Scroll Lock, Pause, 
  11263. Break, Num Lock, and Caps Lock keys, do not have any code representations at 
  11264. all.  The same is true of keystrokes with more than one modifying key, like 
  11265. Ctrl-Shift-A. The operating system may perform special actions automatically 
  11266. when you press these keys (for example, it switches into Caps Lock mode when 
  11267. you press Caps Lock), but it does not report the keystrokes to whatever program 
  11268. is running.  Programs which detect such keystrokes access the keyboard hardware 
  11269. directly, a subject which is beyond the scope of this manual. 
  11270.  
  11271.  
  11272. ΓòÉΓòÉΓòÉ 16.4. ANSI ΓòÉΓòÉΓòÉ
  11273.  
  11274. This section is a quick-reference to commonly-used ANSI commands. 
  11275.  
  11276. An ANSI command string consists of three parts: 
  11277.  
  11278.         ESC[                The ASCII character ESC, followed by a left 
  11279.                             bracket.  These two characters must be present in 
  11280.                             all ANSI strings. 
  11281.         parameters          Optional parameters for the command.  If there are 
  11282.                             multiple parameters they are separated by 
  11283.                             semicolons. 
  11284.         cmd                 A single-letter command.  The case of the letter IS 
  11285.                             meaningful. 
  11286.  
  11287.  For example, to position the cursor to row 7, column 12 the ANSI command is: 
  11288.  
  11289.           ESC[7;12H
  11290.  
  11291.  To transmit ANSI commands to the screen with 4OS2, you should use the ECHO 
  11292.  command.  The ESC character can be generated by inserting it into the string 
  11293.  directly (if you are putting the string in a batch file and your editor will 
  11294.  insert such a character), or by using 4OS2's internal "escape" character 
  11295.  (caret, [^]) followed by a lower-case "e".  For example, the sequence shown 
  11296.  above could be transmitted from a batch file with either of these commands 
  11297.  (the first uses an ESC character directly; the second uses ^e): 
  11298.  
  11299.           echo 2H
  11300.           echo ^e[7;12H
  11301.  
  11302.  You can also include ANSI commands in your prompt, using $e to transmit the 
  11303.  ESC character.  You can NOT use PROMPT to transmit ANSI commands to the screen 
  11304.  from a batch file (see PROMPT). 
  11305.  
  11306.  Commands 
  11307.  
  11308.         ESC[rowsA               Cursor up 
  11309.         ESC[rowsB               Cursor down 
  11310.         ESC[colsC               Cursor right 
  11311.         ESC[colsD               Cursor left 
  11312.         ESC[row;colH            Set cursor position (top left is row 1, column 
  11313.                                 1) 
  11314.         ESC[2J                  Clear screen 
  11315.         ESC[K                   Clear from cursor to end of line 
  11316.         ESC[row;colf            Set cursor position, same as "H" command 
  11317.         ESC[attr;attr;...m      Set display attributes; see table of attribute 
  11318.                                 values below 
  11319.         ESC[s                   Save cursor position (may not be nested) 
  11320.         ESC[u                   Restore cursor position after a save 
  11321.  
  11322.  Display Attributes 
  11323.  
  11324.         0           All attributes off (normal white on black) 
  11325.         1           High intensity (bold) 
  11326.         2           Normal intensity 
  11327.         4           Underline (usually effective only on monochrome displays) 
  11328.         5           Blinking 
  11329.         7           Reverse Video 
  11330.         8           Invisible 
  11331.         30-37       Set the foreground color: 
  11332.                       30=Black  31=Red    32=Green  33=Yellow 
  11333.                       34=Blue   35=Magenta  36=Cyan   37=White 
  11334.         40-47       Set the background color, same values as above but 
  11335.                     substitute 40 for 30 etc. 
  11336.  
  11337.  Settings are cumulative, so (for example) to set bright red foreground set all 
  11338.  attributes off, then set red, then bold, use: 
  11339.  
  11340.           echo ^e[0;31;1m
  11341.  
  11342.  Examples 
  11343.  
  11344.  Clear the display attributes, then set the display to bright cyan on blue, and 
  11345.  clear the screen: 
  11346.  
  11347.           echo ^e[0;44;36;1m^e[2J
  11348.  
  11349.  Set up a prompt which saves the cursor position, displays the 4DOS shell 
  11350.  level, date, and time on the top line in bright white on magenta, and then 
  11351.  restores the cursor position and sets the color to bright cyan on blue, and 
  11352.  displays the standard prompt: 
  11353.  
  11354.           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
  11355.  
  11356.  
  11357. ΓòÉΓòÉΓòÉ 17. Support ΓòÉΓòÉΓòÉ
  11358.  
  11359. You can contact JP Software at any of the following addresses.  Our normal 
  11360. business hours are 9:00 AM to 5:00 PM weekdays, eastern US time. 
  11361.  
  11362. By mail: 
  11363.  
  11364.         JP Software Inc. 
  11365.         P.O. Box 1470 
  11366.         East Arlington, MA 02174 
  11367.         USA 
  11368.  
  11369.  By telephone / fax: 
  11370.  
  11371.         Voice           (617) 646-3975 
  11372.         Fax             (617) 646-0904 
  11373.         Order Line      (800) 368-8777 (orders only, USA only) 
  11374.  
  11375.  Electronically: 
  11376.  
  11377.         CompuServe      Customer Service 75020,244 
  11378.                         Technical Support, GO JPSOFT or GO PCVENB (section 10), 
  11379.                         User ID 75300,1215 
  11380.         Internet        Customer Service 75020.244@compuserve.com 
  11381.                         Technical Support 75300.1215@compuserve.com 
  11382.         BBS Support     Via Channel 1 BBS, Boston, 617-354-5776 at 2,400 - 
  11383.                         14,400 baud, no parity, 8 data bits, 1 stop bit. 
  11384.  
  11385.  Technical support is available via public electronic support conferences, 
  11386.  private electronic mail, telephone, fax, and mail. 
  11387.  
  11388.  Often the best way to contact us for support is in one of the following public 
  11389.  electronic support conferences.  The numbers in parentheses indicate the usual 
  11390.  delay, in business days, to receive a reply to a message. 
  11391.  
  11392.  CompuServe / ZiffNet:  Primary support is via the JP Software section of the 
  11393.  CompuServe PCVENB forum (GO JPSOFT or GO PCVENB, section 10, "JP Software") (1 
  11394.  day). 
  11395.  
  11396.  Bulletin Boards:  Primary support is via the Channel 1 BBS, Boston, MA (1 - 3 
  11397.  days; see above for access details).  Messages may be left in any of the 
  11398.  "4DOS" conferences; check the online list for exact conference numbers. 
  11399.  Support is also available from many local BBSes via the "4DOS" conferences on 
  11400.  the RIME, ILink, SmartNet, and FidoNet BBS Networks (3-5 days). 
  11401.  
  11402.  Before contacting us for support, please check the manuals and other 
  11403.  documentation for answers to your question.  If you can't find what you need, 
  11404.  try the Index.  If you're having trouble getting 4OS2 to run properly, either 
  11405.  alone or with your particular hardware or software, see the Introduction and 
  11406.  Installation Guide, and the APPNOTES.DOC file.  Also look through the 
  11407.  README.DOC and UPDATxxx.DOC files, as they may contain updates to the manual 
  11408.  or other important information ("xxx" is the version number). 
  11409.  
  11410.  If you do need to contact us for support, it helps if you can give us some 
  11411.  basic information: 
  11412.  
  11413.     *   What exactly did you do?  A concise description of what steps you must 
  11414.         take to make the problem appear is much more useful than a long 
  11415.         analysis of what might be happening. 
  11416.  
  11417.     *   What went wrong?  At what point did the failure occur?  If you saw an 
  11418.         error message or other important or unusual information on the screen, 
  11419.         what exactly did it say? 
  11420.  
  11421.     *   Briefly, what techniques did you use to try to resolve the problem? 
  11422.         What results did you get? 
  11423.  
  11424.     *   What computer and operating system version are you using? 
  11425.  
  11426.     *   Are you running a network?  If so, which one, and which version? 
  11427.  
  11428.     *   What are the contents of any startup files you use (such as CONFIG.SYS, 
  11429.         4START, 4EXIT, and 4OS2.INI ), any batch files they call, and any alias 
  11430.         or environment variable files they load? 
  11431.  
  11432.     *   Can you repeat the problem or does it occur randomly?  If it's random, 
  11433.         does it seem related to the programs you're using when the problem 
  11434.         occurs? 
  11435.