home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / jsage / znode3 / novados / 0-pub.doc next >
Encoding:
Text File  |  1994-09-02  |  11.1 KB  |  183 lines

  1. THE $-PUB FEATURE OF NOVADOS
  2. ============================
  3.  
  4. $-Pub is a feature of NovaDOS which enables the declaration of a public file 
  5. by  naming convention.  It addresses problems created by later  versions  of 
  6. ZCPR  in accessing the $$$.SUB file and enables the definition of a "dialog" 
  7. file as distinct from a tool or a data file.  I shall begin with some  back-
  8. ground  information  and  proceed  to a definition and  discussion  of  this 
  9. feature in NovaDOS.
  10.  
  11. The  design  of  the CP/M operating system provides for  a  segmentation  of 
  12. information  on  disk  into files which are categorized  for  organizational 
  13. purposes into "user areas". The original intent of the user area concept was 
  14. to  provide each "user" with his or her own work area which would  be  sepa-
  15. rated  and secure from the work areas of other users.  The concept of  "user 
  16. areas"  as  secure workspaces for different operators has largely fallen  by 
  17. the  wayside  and we now commonly refer to user areas  in  combination  with 
  18. drive letters as "directory areas", or simply "directories". A map of direc-
  19. tory  areas comprises a two dimensional grid (as opposed to a branching tree 
  20. for  MS-DOS) and it within this framework that CP/M programs read and  write 
  21. to disk files.
  22.  
  23. From  a  functional point of view,  CP/M files are divided  into  two  broad 
  24. categories as tools and data.  As originally designed, CP/M made no distinc-
  25. tion  between the two,  a situation somewhat analagous to keeping your  pens 
  26. and your telephone in file folders in your file cabinet.  Access of tools to 
  27. data  was originally confined to other directory areas having the same  user 
  28. area  number.  This limitation required that one log into the directory con-
  29. taining  a  desired tool or it's data files before using the  tool.  As  the 
  30. "user  area" concept became obsolete and versions of ZCPR and tools  written 
  31. to take advantage of it began to proliferate,  it became possible to  access 
  32. data quite easily across directory area boundaries in all directions and the 
  33. concepts  of  path  and public files came into being.  Both  of  these  were 
  34. intended  to  generalize access to software tools within a system by  making 
  35. them easily available from numerous directory areas containing diverse data. 
  36. The tools, then, came "out of the file cabinet" (while still retaining their 
  37. old CP/M user numbers) while data files generally remained segregated within 
  38. the directory area grid. 
  39.  
  40. This generalization further enhanced of the power of the computer to combine 
  41. tools  contained within a variety of directory areas to perform complex jobs 
  42. using a common set of data files. As the ability of tools work cooperatively 
  43. in  a common task increases,  the need for some way to allow these tools  to 
  44. communicate  with one another likewise increaces,  and thus a third form  of 
  45. information emerges which we may call dialog which is neither tool nor data. 
  46. A  variety  of methods have been developed to enable the passing  of  dialog 
  47. between  tools  using both disk files and  memory  storage.  ZCPR3  utilizes 
  48. external  File  Control Blocks,  a message buffer and other data  structures 
  49. which remain in memory and can be accessed by a variety of tools needing the 
  50. information  which they contain,  providing these tools are designed to take 
  51. advantage  of these data structures.  As yet,  no generalized and  generally 
  52. accepted method of passing dialog between tools has emerged within the  CP/M 
  53. development community. 
  54.  
  55. The SUBMIT facility,  which has been  around since the beginning of CP/M, is 
  56. a means of bringing various tools into concert under the command of a script 
  57. processor which orchestrates a series of operations. If the tools themselves 
  58. could not engage in dialog, at least they had a superior handler which could 
  59. direct them.  Unlike EX, ZEX and other similar batch processors, SUBMIT uses 
  60. a  disk file to contain it's dialog (or rather monologue) information  which 
  61. is passed on to the tools under it's control. Under CP/M and early ZCPR this 
  62. dialog  file,  universally  named $$$.SUB was always created by  the  script 
  63. processor on the A drive in the user area currently being used for work, and 
  64. since  files  of  any sort were not generally accessible  across  user  area 
  65. boundaries,  the  entire  job mandated by the script processor had  to  take 
  66. place within the same user area. 
  67.  
  68. As  software  developers became less concerned with  the  internal  security 
  69. features of the user area structure, this became a severe limitation, and in 
  70. an  attempt  to  solve  the problem,  the authors of ZCPR  vs.  3.3  made  a 
  71. discontinuous break with the CP/M standard and declared that henceforth  the 
  72. $$$.SUB  file  would be constrained by operating system requirements  to  be 
  73. created  and to reside in directory A0:  and that the system would locate it 
  74. and process it from within that directory regardless of the location of  the 
  75. tools and data currently in use. This enabled batch processing to take place 
  76. freely across user area boundaries, however the break with the CP/M standard 
  77. involved  left  a  number of excellent tools out on a bit of  a  limb.  Most 
  78. notable  among  these is Ashton-Tate's venerable dBase II  which  effects  a 
  79. chain  to  another  tool by creating a $$$.SUB file for  processing  by  the 
  80. Command Processor.  This file, in keeping with the old CP/M standard, always 
  81. exists  in the user area in which current work is taking place.  Other tools 
  82. (including  the Command Processor) which expect to find the $$$.SUB file  in 
  83. user  0  will fail to locate it and processing will  be  interrupted.  Other 
  84. tools  capable of aborting a  job by erasing  the $$$.SUB file  or which may
  85. merely make decisions based on its presence will encounter the same problem. 
  86.  
  87. There are several points at which this problem can be addressed. In order of 
  88. preference they are:
  89.  
  90. 1.  In  the tool itself.  Tools such as the new SUBMIT for ZCPR observe  the 
  91.     new standard exclusively.  Unfortunately dBase II, as well as some newer 
  92.     programs,  still conform to the old standard and some provision must  be 
  93.     made for these excellent tools.  Patching is possible in some cases, but 
  94.     frequently involves indeterminate risks.
  95.     
  96. 2.  In the DOS.  Identification of the $$$.SUB may take place in the DOS and 
  97.     passed  on to the Command Processor,  which may initiate  the  necessary 
  98.     search for the file. This is still time consuming if the location of the 
  99.     $$$.SUB  file is not provided fairly precisely to the Command Processor.  
  100.     Alternatively, the $$$.SUB file may be of such a nature that the context 
  101.     sensitivity  of the system with respect to it is limited and thus is  is 
  102.     easy to locate by other tools.   This is the nature of the $-Pub feature 
  103.     of NovaDOS which declares the $$$.SUB file to be public,  i.e.  indepen-
  104.     dent of user area boundaries.
  105.  
  106. 3.  In the Command Processor. Jay Sage, the author of ZCPR33 has made avail-
  107.     able alternative versions of his excellent ZCPR34 for use with dBase II. 
  108.     While this solves the problem for dBase and older programs which observe 
  109.     the  old  standard,  it involves the changing of operating  systems  for 
  110.     different  jobs which,  even under NZ-COM's excellent system management, 
  111.     is expensive in time.     
  112.  
  113. The NovaDOS Solution
  114. ====================
  115.  
  116. NovaDOS  implements the $-Pub feature,  as mentioned above,  which is  quite 
  117. simple  in its concept.  All files whose file names begin with the character 
  118. '$' are made accessible to file open,  write,  read and erase requests  from 
  119. tools,  including  the Command Processor,  FROM WITHIN ANY USER AREA on  the 
  120. current  disk.  This  neatly  solves the problem of where the  $$$.SUB  file 
  121. should reside since,  as a public file,  it essentially belongs to ALL  user 
  122. areas. 
  123.  
  124. A  very important bonus emerges from this feature which is in many ways  far 
  125. more  important than the solution of the $$$.SUB problem (which has  largely 
  126. been  rendered moot by the development of powerful batch processors such  as 
  127. ZEX).  The  $-Pub  feature of NovaDOS may be seen as a means of  defining  a 
  128. "dialog file" which can be used to pass information between CP/M tools, both 
  129. old  and  new,  in much the same manner as a UNIX pipe.  This is  a  concept 
  130. largely lacking from CP/M design considerations in the past.
  131.  
  132. The idea of public files has been around for some time in recognition of the 
  133. fact  that tools frequntly need to be available to the system from  a  large 
  134. number of directory areas.  Public files have heretofore been defined in one 
  135. of two ways.
  136.  
  137. 1.  By setting an attribute bit in the directory entry for the file
  138.  
  139. 2.  By declaring an entire directory area to be public
  140.  
  141. Both of these methods involve the use of special utilities or systems calls. 
  142. The $-Pub feature of NovaDOS,  however,  allows a file to be declared public 
  143. BY  NAMING  IT  SO,  and is thus available to any tool which is  capable  of 
  144. reading  or writing to a file having a selectable  filename.  This  includes 
  145. most  programs  doing file i/o,  both old and new.  If it is assumed that  a 
  146. system  must have a lower context sensitivity with respect to  dialog  files 
  147. than  with  respect  to data and tool files then $-Pub is a pointer  in  the 
  148. right direction in this regard.
  149.  
  150. One  may,  for instance,  extract an address from a database in  a  database 
  151. directory area,  use it in a letter in a word processing directory area, use 
  152. it  to create an envelope in yet another user area and put it into a corres-
  153. pondence log in a fourth directory area. The address may be named $ADRS.TXT, 
  154. and  under $-Pub is available to tools operating within any directory  area. 
  155. There is no necessity to move, rename or copy the file.
  156.  
  157. Summary
  158. =======
  159.  
  160. I  suggest that the $-Pub feature of NovaDOS shows the way toward development 
  161. of a dialog system whereby software tools of  various  sorts  may  correspond 
  162. freely  with  one another.  Ideally, access to dialog files should be totally 
  163. free from constraints of context sensitivity, which means that the DOS should 
  164. maintain  a  search path across drive boundaries for those files which are so 
  165. defined.  In a DOS such as NovaDOS or ZSDOS which already maintains a  search 
  166. path,  this  would  require the maintenance of an additional path.  Given the 
  167. level of code optimization and featureitis currently prevalent  in  the  com- 
  168. mercial  CP/M  DOS  development  community  and  the  limitations on features 
  169. imposed by the current 3.5K limit, such a basic concept as  DOS  support  for 
  170. dialog  files  may  take  some time to take root.  I would urge developers of 
  171. future DOS's, however, to give some thought to  the  matters  raised  herein.  
  172. NovaDOS  has enjoyed some small degree of popularity with ZCPR33 and 34 users 
  173. largely because the introduction of a simple form of dialog file has solved a 
  174. minor  but  recalcitrant  problem with the $$$.SUB file.  Further thought and 
  175. development along these lines would seem to be in order.
  176.  
  177.  
  178. Lindsay Haisley
  179. 14206 Spreading Oaks
  180. Leander, TX  78641
  181. (512) 259-1190  vox
  182. (512) 444-8691  Z-Node 77
  183.