home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / cpminfo / stat.txt < prev    next >
Text File  |  1994-07-13  |  6KB  |  131 lines

  1. STAT COMMAND
  2. by Stanley M. Gee, PUGSKUG, August 1987
  3.  
  4. (What STAT does and how to use it)
  5.  
  6. STAT is shorthand for Statistics.  The STAT command is a
  7. transient command that must exist as a file on the disc that you
  8. are using.  Most people use the STAT command for displaying the
  9. size of the remaining space on the disc that they are writing to.
  10.  
  11. For example: A>STAT<CR> The computer responds with
  12. A:R/W,SPACE:100K, B:R/W,SPACE: 191K.  Unfortunately this command
  13. is used only for the preceding example.  There are many more uses
  14. for this command.
  15.  
  16. Specifically STAT can change device assignments, display all
  17. potential device assignments, assign attributes to files, display
  18. disc attributes, display user numbers and display system file
  19. attributes.
  20.  
  21. There are many enhancements to this command specifically STAT44
  22. and D, which is available from our library.  However this article
  23. is limited to the standard version of STAT.  
  24.  
  25. The STAT command when used for displaying attributes and space
  26. left on the disc for writing should be used as follows, At system
  27. level prompt A> type "STAT<CR>".  This will return a message "A:
  28. R/W, SPACE: nK".  The A: is the drive identification, R/W means
  29. Read and Write capability and Space is the amount of space left
  30. on the disc for writing in K bytes (K is abbreviation for 1000)
  31. the n is the amount of K bytes.  The STAT of the second drive is
  32. also returned if it is initialized.  The response will be the
  33. same as for the prime drive except for the drive or disc
  34. identification.  The STAT command won't return the status of the
  35. second drive after a warm boot.  You can either initialize the
  36. second drive or type in "STAT B:<DCR>".
  37.  
  38. The STAT command when used for specific files is as follows,
  39. "STAT Filename.Ext<CR>".  The response to this command is in the
  40. following format, "RECS, BYTES, EX, ACC, D:FILENAME.TYP".  RECS
  41. is the number of records the file uses, BYTES is the amount of
  42. bytes used in thousands, EX is the number of extents occupied by
  43. the file, ACC is the file attribute read write etc., and
  44. D:FILENAME.TYPE is the disc drive identification, filename and
  45. TYPE is the ext of the filename.
  46.  
  47. Ambiguous filenames may be used with the STAT Command.  For
  48. example, at A>, typing "STAT B:*.MSS<CR>" will return the status
  49. of all MSS files on drive B.  To list the status of the entire
  50. disc type "STAT *.*<CR>".
  51.  
  52. To set file attributes, the correct syntax is "STAT FILENAME.EXT
  53. $ATTRIBUTE" where attribute is R/O (read only), R/W (read write),
  54. SYS (system - hides the file from the dir command) and DIR
  55. (cancels the SYS attributed).  For example, to make a file "read
  56. only" type "STAT Filename.Ext $R/O" or to make an entire disc
  57. "read only" type "A>STAT B: = R/O".
  58.  
  59. As mentioned previously the STAT Command can be used to provide
  60. information on the logical and physical devices on our computer.
  61.  
  62. A logical device is a general function of the computer.  A
  63. physical device is a specific piece of equipment chosen to
  64. perform that function.  Basically there are four logical devices. 
  65. CON:  (console), RDR:  (paper tape reader), PUN:  (paper tape
  66. punch) and LST:  (listing device).
  67.  
  68. There are twelve physical devices possible.  They are CRT: 
  69. (cathode ray tube - fast console display)  TTY:  (teletypewriter
  70. - slow console display) UC1:  (user defined console) BAT:  (batch
  71. processor)  PTR:  (paper tape reader)  PTP:  (paper tape punch)
  72. UR1:  (user reader #1) UR2:  (user reader #2) UP1:  (user punch
  73. #1) UP2: (user punch #2) LPT:  (line printer) and UL1:  (user
  74. list device).
  75.  
  76. Sixteen physical to logical devices assignments are permitted. 
  77. CON:  may be performed by TTY:, CRT:, BAT:, or UC1:.  RDR:  may
  78. be performed by TTY:, PTR:, UR1:, or UR2:.  PUN:  may be
  79. performed by TTY:, PTP:, UP1:, or UP2:.  LST:  may be performed
  80. by TTY:, CRT:, LPT:, OR UL1:.
  81.  
  82. To find the default device assignments, type "STAT DEV:<CR>". 
  83. The computer responds with
  84.  
  85.   CON:  is CRT:
  86.   RDR:  is TTY:
  87.   PUN:  is TTY:
  88.   LST:  is LPT:
  89.  
  90. Note that the left hand column is the logical device and the
  91. right hand column is the current physical device assigned to it.
  92.  
  93. To find the possible assignments of physical to logical devices
  94. and see an abbreviated STAT command line summary type "STAT
  95. VAL:<CR>".
  96.  
  97. The correct form for device assignment using STAT is, "STAT log: 
  98. = dev:, ....".  More than one device assignment can be made on
  99. this command by separating the assignments with commas.
  100.  
  101. An example STAT LST:=LPT:,PUN:=UR1<CR>.  Certain protocols must
  102. be observed.  The CON: device must be an input/output device that
  103. can send or receive data.  The RDR:  must be able to send data
  104. and the LST:  device must be able to receive data.
  105.  
  106. If you have two printers, i.e. a daisy wheel and a dot matrix
  107. printer you could assign LPT:  to the daisy wheel printer and
  108. UL1:  to the dot matrix printer.  This would allow you to shift
  109. printers without physically unplugging and plugging the other
  110. printer in its place which becomes a real drag after a while, not
  111. to mention the possibility of damage to the connectors. 
  112.  
  113. To display the current user number and to list user numbers for
  114. user files, type "STAT USR:<CR>".  The computer responds with
  115. "ACTIVE USER:  0" and "ACTIVE FILES:  0  1 2".  Active files 1 &
  116. 2 would be present only if User command was used.
  117.  
  118. To display the stat of the current disc or alternate disc type
  119. "STAT [B:]DSK:<CR>".  The computer will respond with the
  120. following: (drive specified on alternate drive only).
  121.  
  122.      A:  DRIVE CHARACTERISTICS
  123.   1560:  128 BYTE RECORD CAPACITY
  124.    195:  KILOBYTE DRIVE CAPACITY
  125.     64:  32 BYTE DIRECTORY ENTRIES
  126.     64:  CHECKED DIRECTORY ENTRIES
  127.    128:  RECORDS/EXTENT
  128.      8:  RECORDS/BLOCK
  129.     40:  SECTORS/TRACK
  130.      1:  RESERVE TRACKS
  131.