hokey@plus5.UUCP (10/07/86)
I propose the MDC adopt the Global Transfer Format suggested by Fuzzy in his proposal dated 3 November 1978 (pages 5-12), with changes described below. This document was reprinted as Attachment 4 in the minutes of MDC #29. As Fuzzy states in his 2 page letter dated 25 October 1978 (the first portion of Attachment 4 noted above), there are serious problems with "simple" global transfer utilities. People have objected to the "obscure" format produced by this proposal. Please remember that a human will rarely need to examine this information, and a public-domain routine has already been published which reads these formats. (This routine is listed in Attachment 4 as noted above.) It is also a straightforward process to produce these formats. One problem not addressed by Fuzzy's proposal is the case in which an implementation permits READ termination by multiple sequences. Another problem is the assumtion that this utility should only be used to transport "portable" globals, those in which the subscripts are ASCII graphics. While the solution to the problem of alternate EOLs can be applied to the subscript problem, I will not propose that we do so at this time. The change is as follows: put each *gdatum* in the form of a canonic mumps *expr*, instead of leaving it as ASCII date. Using a modified version of the example given on page 11 of the 03Nov78 document: Execution of the following MUMPS code: K ^X S ^X("ZERO")=0 S ^X(1)="FIRST"_$C(10)_"SECOND"_$C(27)_"LAST" S ^X(1,0)="" K ^(0) S ^X(7,2)="LEVEL-TWO" S ^X(7,3,4)="LEVEL-THREE" could, among other things, produce an "invisible pointer" at ^X(1). Also note that ^X(1) has a datum associated with it, and that the datum contains two control characters, each of which might terminate a READ. The following is an example of a dump of all nodes in ^X at or above the second subscript level. Note this means there could be an invisible pointer at ^X(7,3). *gdsync* (beginning of *gdump*, *gdatom*, *gblock*, and *gdfulr*) 1 *eol* (*gblock*: there is 1 leading *gsub*) X *eol* (level 0 subscript) ZERO *eol* (beginning of *gdnkdr*, level 1 subscript) 0 *eol* (datum) 1 *eol* (level 1 subscript) "FIRST"_$C(10)_"SECOND"_$C(27)_"LAST" *eol* (datum) *gdspcl* 0 *eol* (beginning of *gdnkdr*, node has "invisible pointer") 1 *eol* (level 1 subscript) *eol* (datum for "invisible pointer" is the empty string) *gdsync* (beginning of *gblock* and *gdfulr*) 2 *eol* (*gblock*: there are 2 leading *gsubs*) X *eol* (level 0 subscript) 7 *eol* (level 1 subscript) 2 *eol* (beginning of *gdnkdr*, level 2 subscript) "LEVEL-TWO" *eol* (datum) *gdspcl* 0 *eol* (beginning of *gdnkdr*, node has "invisible pointer") 3 *eol* (level 2 subscript) *eol* (datum for "invisible pointer" is the empty string) *gdsync* (beginning of *gdendr*) -1 *eol* (indicates this is a *gdendr* and not a *gdfulr*) *eor* *eol* (end of *gdatom*) *eor* *eol* (end of *gdump*) When using a "canonic *expr*" as the datum, we must change the restore routine as well. Instead of saying: S @REF=DTM we now say: S @(REF_"="_DTM) Additionally, there is no longer a need to use *gdsnode* to signify the number of embedded *eol*s in the datum. However, with the additional overhead imposed by the "canonic *expr*", it is now possible to have a datum which exceeds the portable string length limit. We can solve this problem by using a *gdsnode* of the form: *gdspcl* 1 *eol* to indicate a "continuation" of any datum. A partial example follows: *gdsync* (beginning of *gdump*, *gdatom*, *gblock*, and *gdfulr*) 1 *eol* (*gblock*: there is 1 leading *gsub*) X *eol* (level 0 subscript) 0 *eol* (beginning of *gdnkdr*, level 1 subscript) "A" *eol* (datum) *gdspcl* 1 *eol* (continuation of datum) 0 *eol* (level 1 subscript) "B" *eol* (datum) *gdspcl* 1 *eol* (continuation of datum) 0 *eol* (level 1 subscript) "C" *eol* (datum) *gdsync* (beginning of *gdendr*) -1 *eol* (indicates this is a *gdendr* and not a *gdfulr*) *eor* *eol* (end of *gdatom*) *eor* *eol* (end of *gdump*) which, if restored, would result in ^X(0) containing the string "ABC". Hokey