Minor updates to the unit test routines to fix tiny bugs
Unit Tests for new features of FIND^DIC and LIST^DIC in MSC Fileman. Includes test data as Inits
George fixed a tiny bug in DIWE that made WP fields editable even if marked as uneditable. It also affected auditing, where the audit for WP was not honored.
Various bugs fixed by George Timson.

NO.: 14601                              VERSION: 22.2
  TAG: CHKSUB+5                         ROUTINE NAME OR GLOBAL REF: DICATTDM
  REPORTER: SAM HABIEL                  DATE CHANGED: JAN 16,2013
  PROGRAMMER: GEORGE TIMSON
  CHANGE: Maximum permitted length of node is now dynamically calculated from ^D
D("STRING_LIMIT")                       DOCUMENTATION NEEDED: YES
  DOCUMENTATION NOTES: NOTE THE PRESENCE OF THIS NEW FEATURE
  NEW VERSION: <22.2>
 LONG DESCRIPTION:
 Before:
 >       I $G(DICATTLN),$$MAX(DICATTLN,X)>250 Q "Too much to store at the
 '"_X_"' subscript"

 After:
 <  I $G(DICATTLN),$$MAX(DICATTLN,X)>($G(^DD("STRING_LIMIT"),255)-5) Q
 "Too much to store at the '"_X_"' subscript"
 DETAILED TESTING INSTRUCTIONS:
 Set ^DD("STRING_LIMIT") to a value larger than 255.

 In Modify File Attributes, Keep making fields in the zero node until you
 reach 250 characters. You should be able to exceed that.

Type <Enter> to continue or '^' to exit:

NO.: 14602                              VERSION: 22.2
  TAG: 4                                ROUTINE NAME OR GLOBAL REF: DICATT6
  REPORTER: SAM HABIEL                  DATE CHANGED: JAN 16,2013
  PROGRAMMER: GEORGE TIMSON
  CHANGE: Maximum permitted length of a free text field is now dynamically calcu
lated from ^DD("STRING_LIMIT")          DOCUMENTATION NEEDED: YES
  DOCUMENTATION NOTES: Note presence of this feature.
  NEW VERSION: <22.2>
 LONG DESCRIPTION:
 Before:
 > 4     K DG,DE,M S L=250,P=$P($P($P(^DD(A,DA,0),U,4),";",2),"E",2) I P S
 M=$P(P,",",2) I M S L=M-P+1

 After:
 < 4 K DG,DE,M S
 L=$G(^DD("STRING_LIMIT"),255)-5,P=$P($P($P(^DD(A,DA,0),U,4),";",2),"E",2)
 I P S M=$P(P,",",2) I M S L=M-P+1
 DETAILED TESTING INSTRUCTIONS:
 This only applies to the roll and scroll mode of Modify File Attributes.

 Set ^DD("STRING_LIMIT") to a value larger than 255.

 On the roll and scroll mode, create a field that is larger than 255
 characters long. Now you should be able to.

NO.: 14603                              VERSION: 22.2
  TAG: 2+2ff                            ROUTINE NAME OR GLOBAL REF: DIAU
  REPORTER: SAM HABIEL                  DATE CHANGED: JAN 16,2013
  PROGRAMMER: GEORGE TIMSON
  CHANGE: Select AUDIT file will not display the last user selected file if the
file has no audit activity              DOCUMENTATION NEEDED: NO
  NEW VERSION: <22.2>
 LONG DESCRIPTION:
 Before:
 >       D R1^DICRW S DIC("S")=DIC("S")_" I
 $D(^DIA(+Y,""D"",DIAUSR))",DIC=1,DIC(0)="QAEI",DIC("A")="Select AUDITED
 File: ",DIC("B")=$G(^DISV(DUZ,"^DIC(")) D ^DIC K DIC

 After:
 <  D R1^DICRW ;Creates a DIC("S") that screens out files user has no
 access to
 <  S DIC("S")=DIC("S")_" I
 $D(^DIA(+Y,""D"",DIAUSR))",DIC=1,DIC(0)="QAEI",DIC("A")="Select AUDITED
 File: "
 <  S Y=$G(^DISV(DUZ,"^DIC(")) I Y X DIC("S") I  S DIC("B")=Y
 <  D ^DIC K DIC
 DETAILED TESTING INSTRUCTIONS:
 Anywhere in Fileman, select any file that does not have auditing on it.
 You don't need to do anything after that.

 Go to OTHER > AUDITING > MONITOR A USER.

 You should not be displayed your last selected file.
NO.: 14604                              VERSION: 22.2
  TAG: DR+5                             ROUTINE NAME OR GLOBAL REF: DDBRU
  REPORTER: POO                         DATE CHANGED: JAN 19,2013
  PROGRAMMER: SAM HABIEL
  CHANGE: RTN starts from " " rather than "" b/c Cache has 0 node on ^UTILITY
  DOCUMENTATION NEEDED: NO              NEW VERSION: <22.2>
 LONG DESCRIPTION:
 This prevents a Crash on Cache when DR^DDBRU is invoked.
 DETAILED TESTING INSTRUCTIONS:
 On Cache, invoke DR^DDBRU. Follow the prompts and make sure you can see
 the routines in the end.
Corrected a global kill in DDD for the SAC
Removing unused DINZMGR routines
Fix UCICHECK for Cache
Language file init (^DMLAINIT) changed to be silent
Michael Ogi's changes in patch 169 to improve browser printing
NO.: 14614                              VERSION: 22.2
  TAG: WP+1                             ROUTINE NAME OR GLOBAL REF: DID1
  REPORTER: SMH                         DATE CHANGED: JAN 23,2013
  PROGRAMMER: GEORGE TIMSON
  CHANGE: Word processing fields will now say whether they are audited in Standa
rd Listing                              DOCUMENTATION NEEDED: NO
  NEW VERSION: <22.2>
 LONG DESCRIPTION:
 < WP    I X,$D(^DD(+X,.01,0)) S W=$P(^(0),U,2) I W["W" D
 <       .S X="WORD-PROCESSING #"_+X D  S X="(NOWRAP)" D:W["L"  S
 X="(IGNORE ""|"")" D:W["X"!(W["x")  S X="(UNEDITABLE)" D:W["I"  S X=""
 ---
 > WP I X,$D(^DD(+X,.01,0)) S W=$P(^(0),U,2) I W["W" D  S X=""
 >  .S X="WORD-PROCESSING #"_+X D  S X="(NOWRAP)" D:W["L"  S X="(IGNORE
 ""|"")" D:W["X"!(W["x")  S X="(UNEDITABLE)" D:W["I"  S X="(AUDITED)"
 D:$G(^("AUDIT"))]""
 16a17
 > TYPE S W=+$P(X,"t",2) I W,$D(^DI(.81,W,0)) S W=" ("_$P(^(0),U)_" Data
 Type)" D W G ND:M=U
 DETAILED TESTING INSTRUCTIONS:
 Make a WP field auditable. Make sure that the standard listing says that

Type <Enter> to continue or '^' to exit:
 that field is auditable.
Various fixes dealing with Maximum Global Node Length.

NO.: 14616                              VERSION: 22.2
  TAG: passim                           ROUTINE NAME OR GLOBAL REF: DINIT0F5
  REPORTER: smh                         DATE CHANGED: JAN 23,2013
  PROGRAMMER: GEORGE TIMSON
  CHANGE: Free Text form Min/Max fields are now free text themselves to allow en
tries greater than 250, which is hardcoded in DIR
  DOCUMENTATION NEEDED: YES
  DOCUMENTATION NOTES: Document that long nodes are now possible.
  NEW VERSION: <22.2>
 DETAILED TESTING INSTRUCTIONS:
 Set ^DD("STRING_LIMIT") to a large number not to exceed the capacity of
 your database.

 In the Screenman Modify File Attributes, make a free text field whose
 length is > 250 characters. It should be accepted. Previously, it
 wouldn't.

NO.: 14615                              VERSION: 22.2
  TAG: H,WITHff                         ROUTINE NAME OR GLOBAL REF: DIR2
  REPORTER: GFT                         DATE CHANGED: JAN 23,2013
  PROGRAMMER: GEORGE TIMSON
  CHANGE: Replace/With prompt now will allow more than 245 characters
  DOCUMENTATION NEEDED: NO              NEW VERSION: <22.2>
 DETAILED TESTING INSTRUCTIONS:
 In a field that can accomodate a lot of data, do a replace/with and put
 in more than 255 characters. It should accept it. Previously, it couldn't.

NO.: 14613                              VERSION: 22.2
  TAG: CHKSUBff                         ROUTINE NAME OR GLOBAL REF: DICATTDM
  REPORTER: SMH                         DATE CHANGED: JAN 23,2013
  PROGRAMMER: GEORGE TIMSON
  CHANGE: Screenman Modify File Atrributes now autosuggests next available node
if you are above 250 characters         DOCUMENTATION NEEDED: YES
  DOCUMENTATION NOTES: Document that long nodes are now possible
  NEW VERSION: <22.2>
 LONG DESCRIPTION:
 < CHKSUB(X)     ;used as INPUT TRANSFORM for Fields 16 & 76
 ---
 > CHKSUB(X,DISHORT) ;used as INPUT TRANSFORM for Fields 16 (SUBSCRIPT) &
 76 (MUL SUBSCRIPT)  X is the subscript name.  DISHORT says 'don't go
 beyond 250'
 37c38
 <       S M=$$GET^DDSVALF(20.5,"DICATT",1,"","")
 ---
 >  S M=$$GET^DDSVALF(20.5,"DICATT",1,"","") ;'Is this field Multiple?'
 40c41,42
 <       I $G(DICATTLN),$$MAX(DICATTLN,X)>($G(^DD("STRING_LIMIT"),255)-5)
 Q "Too much to store at the '"_X_"' subscript"
 ---
 >  I '$G(DICATTLN) Q 1 ;if we do not have a current length for the field,
 we are OK
 >  S M=$S($G(DISHORT):250,1:$G(^DD("STRING_LIMIT"),255)-5) I
 $$MAX(DICATTLN,X)>M Q "Too much to store at the '"_X_"' subscript"
 DETAILED TESTING INSTRUCTIONS:
 Set ^DD("STRING_LIMIT") to a high value.

 Keep making fields until you reach 250 characters full on the same node.
 Make sure that when you get there that
 1. You can still place items in the node.
 2. You are suggested the next node.

 You need to test this on both roll and scroll and screenman Modify
 Fileman Attribute forms.
First line formal lists fixes. Change file below:

NO.: 14617                              VERSION: 22.2
  TAG: DDD                              ROUTINE NAME OR GLOBAL REF: DICOMP0
  DATE CHANGED: JAN 24,2013             PROGRAMMER: SAM HABIEL
  CHANGE: Changed comment. No op.       DOCUMENTATION NEEDED: NO
  NEW VERSION: <22.2>

NO.: 14618                              VERSION: 22.2
  TAG: EN                               ROUTINE NAME OR GLOBAL REF: DICOMPU
  DATE CHANGED: JAN 24,2013             PROGRAMMER: SAM HABIEL
  CHANGE: Formal list moved from first line to EN tag
  NEW VERSION: <22.2>
 DETAILED TESTING INSTRUCTIONS:
 Not used in Fileman. No testing necessary.

NO.: 14619                              VERSION: 22.2
  TAG: EN                               ROUTINE NAME OR GLOBAL REF: DILL
  DATE CHANGED: JAN 24,2013             PROGRAMMER: SAM HABIEL
  CHANGE: Changed 1st line formal list to EN
  RELATED CHANGE NUMBERS: 14620-2       DOCUMENTATION NEEDED: NO
  NEW VERSION: <22.2>
 DETAILED TESTING INSTRUCTIONS:
 See next two changes.

NO.: 14620                              VERSION: 22.2
  TAG: +5-6,Z                           ROUTINE NAME OR GLOBAL REF: DIL0
  REPORTER: XINDEX                      DATE CHANGED: JAN 24,2013
  PROGRAMMER: SAM HABIEL
  CHANGE: Change of ^DILL(...) to EN^DILL(...)
  RELATED CHANGE NUMBERS: 14619         DOCUMENTATION NEEDED: NO
  NEW VERSION: <22.2>
 DETAILED TESTING INSTRUCTIONS:
 This code gets invoked when compiling a print template using ^DIPZ. Make
 sure it doesn't crash.

NO.: 14621                              VERSION: 22.2
  TAG: NUMB+4,E+1-2,LOOP+1              ROUTINE NAME OR GLOBAL REF: DIL1
  REPORTER: XINDEX                      DATE CHANGED: JAN 24,2013
  PROGRAMMER: SAM HABIEL
  CHANGE: Change of ^DILL(...) to EN^DILL(...)
  RELATED CHANGE NUMBERS: 14619         DOCUMENTATION NEEDED: NO
  NEW VERSION: <22.2>
 DETAILED TESTING INSTRUCTIONS:
 Code invoked when subtotaling from print using !field. Try this, and make
 sure there are no crashes.

NO.: 14622                              VERSION: 22.2
  TAG: DILL                             ROUTINE NAME OR GLOBAL REF: DIO0
  REPORTER: XINDEX                      DATE CHANGED: JAN 24,2013
  PROGRAMMER: SAM HABIEL
  CHANGE: Change of ^DILL(...) to EN^DILL(...)
  RELATED CHANGE NUMBERS: 14619         DOCUMENTATION NEEDED: NO
  NEW VERSION: <22.2>
 DETAILED TESTING INSTRUCTIONS:
 I couldn't figure out how to test this.

NO.: 14623                              VERSION: 22.2
  TAG: EN,E+4                           ROUTINE NAME OR GLOBAL REF: DITCP
  REPORTER: XINDEX                      DATE CHANGED: JAN 24,2013
  PROGRAMMER: SAM HABIEL
  CHANGE: Formal list moved from first line to EN tag
  DOCUMENTATION NEEDED: NO              NEW VERSION: <22.2>
 DETAILED TESTING INSTRUCTIONS:
 See 14624.

NO.: 14624                              VERSION: 22.2
  TAG: DD+1,FILES+1,ENTRIES+7           ROUTINE NAME OR GLOBAL REF: DITCP0
  REPORTER: XINDEX                      DATE CHANGED: JAN 24,2013
  PROGRAMMER: SAM HABIEL
  CHANGE: Changed ^DITCP(...) to EN^DITCP(...)
  RELATED CHANGE NUMBERS: 14623         DOCUMENTATION NEEDED: NO
  NEW VERSION: <22.2>
 DETAILED TESTING INSTRUCTIONS:
 Run namespace compare option under transfer file entries. Make sure you
 can do a comparison successfully.

NO.: 14625                              VERSION: 22.2
  TAG: EN                               ROUTINE NAME OR GLOBAL REF: DITCPL
  REPORTER: XINDEX                      DATE CHANGED: JAN 24,2013
  PROGRAMMER: SAM HABIEL
  CHANGE: Formal list moved from first line to EN tag
  DOCUMENTATION NEEDED: NO              NEW VERSION: <22.2>
 DETAILED TESTING INSTRUCTIONS:
 See 14626.

NO.: 14626                              VERSION: 22.2
  TAG: DITCPL                           ROUTINE NAME OR GLOBAL REF: DITCP
  REPORTER: XINDEX                      DATE CHANGED: JAN 24,2013
  PROGRAMMER: SAM HABIEL
  CHANGE: Change of ^DITCPL(...) to EN^DITCPL(...)
  RELATED CHANGE NUMBERS: 14625         DOCUMENTATION NEEDED: NO
  NEW VERSION: <22.2>
 DETAILED TESTING INSTRUCTIONS:
 Run the Namespace compare option under Transfer file entries. Expected:
 No Crashes.

NO.: 14627                              VERSION: 22.2
  TAG: EN                               ROUTINE NAME OR GLOBAL REF: DDSRP
  REPORTER: XINDEX                      DATE CHANGED: JAN 24,2013
  PROGRAMMER: SAM HABIEL
  CHANGE: Formal list moved from first line to EN tag
  DOCUMENTATION NEEDED: NO              NEW VERSION: <22.2>
 DETAILED TESTING INSTRUCTIONS:
 See 14628.

NO.: 14628                              VERSION: 22.2
  TAG: PRNT+1                           ROUTINE NAME OR GLOBAL REF: DDS01
  REPORTER: XINDEX                      DATE CHANGED: JAN 24,2013
  PROGRAMMER: SAM HABIEL
  CHANGE: Changed from ^DDSRP(..) to EN^DDSRP(...)
  RELATED CHANGE NUMBERS: 14627         DOCUMENTATION NEEDED: NO
  NEW VERSION: <22.2>
 DETAILED TESTING INSTRUCTIONS:
 In a screenman form, run F1-P.

 Expected: No crashes.

NO.: 14629                              VERSION: 22.2
  TAG: EN                               ROUTINE NAME OR GLOBAL REF: DIVR
  REPORTER: XINDEX                      DATE CHANGED: JAN 24,2013
  PROGRAMMER: SAM HABIEL
  CHANGE: Change first line formal list to EN
  DOCUMENTATION NEEDED: NO              NEW VERSION: <22.2>
 DETAILED TESTING INSTRUCTIONS:
 See next changes for testing instructions.

NO.: 14630                              VERSION: 22.2
  TAG: DIVR+13                          ROUTINE NAME OR GLOBAL REF: DIUTL
  REPORTER: XINDEX                      DATE CHANGED: JAN 24,2013
  PROGRAMMER: SAM HABIEL
  CHANGE: Change of ^DIVR(...) to EN^DIVR(...)
  RELATED CHANGE NUMBERS: 14629         DOCUMENTATION NEEDED: NO
  NEW VERSION: <22.2>
 DETAILED TESTING INSTRUCTIONS:
 Modify File Attributes on existing files. When asked to verify fields,
 say yes.

 No crashes.

NO.: 14631                              VERSION: 22.2
  TAG: DIC+8,ALLFLDS+4,ENQUEUE+6-8      ROUTINE NAME OR GLOBAL REF: DIV
  REPORTER: XINDEX                      DATE CHANGED: JAN 24,2013
  PROGRAMMER: SAM HABIEL
  CHANGE: Change of ^DIVR(...) to EN^DIVR(...)
  RELATED CHANGE NUMBERS: 14629         DOCUMENTATION NEEDED: NO
  NEW VERSION: <22.2>
 DETAILED TESTING INSTRUCTIONS:
 Run verify fields in various combinations. The code is triggered
 here:
 - Regular invocation, one field
 - Regular invocation, ALL fields
 - Invocation and then queuing the output.

 Success: No crashes.
Fixes for bug JIRA [FILEMAN-2]: Fix bug with compound indexes, backward collation, and partial matches. Four Fileman changes: 14605, 14632, 14636, and 14637:

NO.: 14605                              VERSION: 22.2T1
  TAG: LOOKUP+17:18, passim             ROUTINE NAME OR GLOBAL REF: DICF
  REPORTER: ZACH GONZALES               DATE CHANGED: JAN 24,2013
  PROGRAMMER: RICK MARSHALL             PREVIOUS CHECKSUM: B33474300
  SUPPORTING DOCUMENT NUMBERS: JIRA [FILEMAN-2]
  CHANGE: Fix bug with compound indexes, backward collation, and partial matches
  UPDATED UCIS: DEV
  RELATED CHANGE NUMBERS: 14632,14636,14637
  DOCUMENTATION NEEDED: YES
  DOCUMENTATION NOTES: Backward collation includes backward listings in response
 to ? and also backward lists of partial matches. Note effect of different colla
tion of different subscripts in a compound index.
  NEW VERSION: <22.2T1>
 LONG DESCRIPTION:
 In a new-style, compound index with multiple value subscripts, in which
 the second one is defined to have backward collation, it collates
 correctly when responding to help (listing the index entries), but not
 when offering matches if the first subscript value is entered at the
 lookup prompt but not the second one. It collates forward instead of
 backward.

 This issue originally came up with in connection with a new index on
 Lloyd Milligan's ADT Filer package, and it took us a while to figure out
 that it had nothing to do with partial numeric matches, contrary to what
 we initially thought.

 This involved three problems.

 First, COMMON1^DICUIX2 (a subroutine shared by all the lookup-related
 APIs, whose job is to build the definition of the current index's data
 subscripts into the DINDEX array) was suppressing the ability to reverse
 directions during Finder calls. Although this may be fine when the Finder
 is called directly by applications, the Finder is also used as a helper
 for the classic Lookup calls (^DIC, IX^DIC, and MIX^DIC1), and in this
 context it is often building lists for immediate display to the end user,
 so they need to honor the directionality of index subscripts. We changed
 the directionality code in C1 to override the Finder's override (that is,
 to not suppress the directionality calculation) when the Finder is called
 by the classic Lookup.

 Second, it's not enough just to change directions; the lookup values,
 which are used as starting values for the $order loops that traverse the
 index, also need to be revised. When we are doing partial matches while
 traversing forward, the From value equals the user-entered lookup value,
 because $order in the forward direction naturally encounters the longer
 values that are potential partial matches. Unfortunately, when doing
 partial matches while traversing backward, the From value needs to be
 changed to place it after all the possible partial matches, so that the
 first reverse $order finds the last of the partial matches instead of
 none of them. Because the Finder, unlike the Lister, was never designed
 to traverse backward, it had no logic for building these changed From
 values, leading the Finder after the first change described above to
 report no matches. The Lister, of course, already had code to do this,
 but where the Lister is always working with a single lookup value on a
 single index, the Finder is often working with multiple lookup values,
 usually on multiple indexes. The Finder, in CHKONE^DICF3, prior to
 calling its walker code (in DICFIX - the Lister has a similar one of its
 own in DICLIX) loads the list of lookup values from the DIVALUE array
 (which remembers what we're looking for) into the DINDEX array (which
 knows about the current index we're traversing).

 To fix this Finder logic to support backward collation (i.e., reverse
 traversal), we had to preload the DIVALUE array with a second set of
 values to be used when traversing backward (since different subscripts in
 different indexes can have different collation, the same Finder call
 needs to be ready to go both directions), and we had to change the code
 in CHKONE^DICF3 so it would load the right part of DIVALUE depending on
 the direction we're about to traverse. The second part was easily done,
 using the now-corrected directionality flag from step one. For the first
 part, we added a new subroutine BACKFROM in DICF1 (the routine that does
 most of the work building the DIVALUE array) to add the reverse-direction
 From values, based on the forward-direction From values already loaded in
 the DIVALUE array. We then added a line to LOOKUP^DICF, right after it
 calls XFORM^DICF1 to build the needed From values, to call our new
 BACKFROM^DICF1 procedure to calculate and add the reverse From values.
 This gave CHKONE^DICF3 both sets of lookup values in DIVALUE, so it can
 merge into DINDEX the right group for the direction it's going in the
 current index's current subscript.

 Although this handles the immediate situations we face, Sam Habiel looked
 ahead and let us know about a third problem we should solve while we're
 in here.

 The reverse From value calculation, which until now was only used by the
 Lister, is late in COMMON1^DICUIX2, where it appends "{{{{{{{{{{" to the
 end of the partial match value to create the From value. In the ASCII and
 M character sets, this does move the From value after all likely partial
 matches, but in other character sets this won't work. Ideally, this
 calculation should be specific to the character set in use, which can
 vary. We agreed that Sam will come up with a framework for adding these
 calculations. For now, I moved the calculation into a function,
 $$BACKFROM^DICUIX2, which Sam can later turn into an extensible
 framework; for now it just does the existing calculation there. We then
 changed procedure BACKFROM^DICF1 to use $$BACKFROM^DICUIX2 in its
 calculations.

 Here are the two new lines:

         I DIFLAGS'["X" D  ; unless we are doing exact matches, also load FROM
         . D BACKFROM^DICF1(.DIVALUE,.DINDEX) ; values for backward traversal

 While in DICF, I also did a very light refactoring of header lines and
 last lines throughout the routine and removed do-dot block quits, since
 they're no-ops.

 I took this opportunity to overhaul Tami's Fileman Routine file entry for
 DICF to match the refactored code with my mod in it. I did not do
 likewise for the other routines that make up this change, in the
 interests of time, since we're nearing the end of alpha testing. For 22.3
 we should plan to overhaul the Fileman Routine file to bring it up to
 date with our changes since Fileman 22 was released.
  EXPLANATION FOR TEST SITES: [FILEMAN-2] COMPOUND INDEXES: FAILURE TO COLLATE B
ACKWARD WITH PARTIAL MATCH
 DETAILED TESTING INSTRUCTIONS:
 Create a simple file with two free-text fields (film name (.01) and
 director (.02). Create a new-style compound index ("AB") on both of those
 fields (with the director as value subscript 1 and film name as value
 subscript 2), with both set to collate backward.

 Enter seven films by Ridley Scott and three by Tony Scott. Do a
 direct-mode call to IX^DIC to force the use of that index. At the prompt,
 enter ? to confirm that the entries are properly listed backward. Then
 enter RIDLEY SCOTT. Suddenly, his films are listed in alphabetical order,
 as opposed to the proper reverse order they were just shown as in response
 to the help request.

 Here's an example of the correct behavior (backward collation) when
 requesting help:

  LIVE,FORUM>S DIC=42001.2,DIC(0)="AEQ",D="AB" D IX^DIC

   Select DMUT FILM DIRECTOR: ?
   Answer with DMUT FILM DIRECTOR & NAME
   Choose from:
   TONY SCOTT UNSTOPPABLE
   TONY SCOTT TOP GUN
   TONY SCOTT MAN ON FIRE
   RIDLEY SCOTT PROMETHEUS
   RIDLEY SCOTT KINGDOM OF HEAVEN
   RIDLEY SCOTT GLADIATOR
   RIDLEY SCOTT BLADERUNNER
   RIDLEY SCOTT BLACK HAWK DOWN
   RIDLEY SCOTT AMERICAN GANGSTER
   RIDLEY SCOTT ALIEN

 And here's the incorrect behavior (forward collation) when entering the
 first subscript value but not the second:

   Select DMUT FILM DIRECTOR: RIDLEY SCOTT
   NAME:

   1 RIDLEY SCOTT ALIEN ALIEN
   2 RIDLEY SCOTT AMERICAN GANGSTER AMERICAN GANGSTER
   3 RIDLEY SCOTT BLACK HAWK DOWN BLACK HAWK DOWN
   4 RIDLEY SCOTT BLADERUNNER BLADERUNNER
   5 RIDLEY SCOTT GLADIATOR GLADIATOR
   Press <Enter> to see more, '^' to exit this list, OR
   CHOOSE 1-5:
   6 RIDLEY SCOTT KINGDOM OF HEAVEN KINGDOM OF HEAVEN
   7 RIDLEY SCOTT PROMETHEUS PROMETHEUS
   CHOOSE 1-7:

NO.: 14632                              VERSION: 22.2T1
  TAG: BACKFROM, passim                 ROUTINE NAME OR GLOBAL REF: DICF1
  REPORTER: ZACH GONZALES               DATE CHANGED: JAN 24,2013
  PROGRAMMER: RICK MARSHALL             PREVIOUS CHECKSUM: B22351550
  SUPPORTING DOCUMENT NUMBERS: JIRA [FILEMAN-2]
  CHANGE: Fix bug with compound indexes, backward collation, and partial matches
  UPDATED UCIS: DEV
  RELATED CHANGE NUMBERS: 14605,14636,14637
  DOCUMENTATION NEEDED: YES
  DOCUMENTATION NOTES: See Fileman Change #14605 for details.
  NEW VERSION: <22.2T1>
 LONG DESCRIPTION:
 See Fileman Change #14605 for details.

 In routine DICF1 I added new subroutine BACKFROM to create From values
 for backward collation. Here's the new code:

 BACKFROM(DIVALUE,DINDEX)        ; create From values for backward collation
         ;;private;procedure;clean;silent;SAC compliant
         ; input:
         ;   .DINDEX("#") = # of lookup values supplied
         ;   .DIVALUE(subscript #) = default lookup value
         ;   .DIVALUE(subscript #,value #) = each additional lookup value
         ; output:
         ;   .DIVALUE("BACK",DISUB,...) = From values for backwards
         ; called only by:
         ;   LOOKUP^DICF
         ; calls:
         ;   $$BACKFROM^DICUIX2 to compute each From value for backwards
         ;
         N DISUB F DISUB=1:1:DINDEX("#") D  ; traverse lookup values
         . ;
         . M DIVALUE("BACK",DISUB)=DIVALUE(DISUB) ; initialize From values
         . ;
         . I DIVALUE(DISUB)'="" D  ; if default exists
         . . N B S B=$$BACKFROM^DICUIX2(DIVALUE(DISUB))
         . . S DIVALUE("BACK",DISUB)=B ; add default back-from value
         . ;
         . N DIVAL S DIVAL=0
         . F  D  Q:'DIVAL  ; traverse alternate values
         . . S DIVAL=$O(DIVALUE(DISUB,DIVAL)) ; each alternate
         . . Q:'DIVAL
         . . I $G(DIVALUE(DISUB,DIVAL))'="" D  ; if alternate exists
         . . . N B S B=$$BACKFROM^DICUIX2(DIVALUE(DISUB,DIVAL))
         . . . S DIVALUE("BACK",DISUB,DIVAL)=B ; add alternate back-from val
         ;
         QUIT  ; end of BACKFROM

 While in this routine, I also lightly refactored it, fixing headers and
 quits throughout and removing dot-dot block quits (no-ops)
  EXPLANATION FOR TEST SITES: [FILEMAN-2] COMPOUND INDEXES: FAILURE TO COLLATE B
ACKWARD WITH PARTIAL MATCH
 DETAILED TESTING INSTRUCTIONS:
 See Fileman Change #14605 for details.

 In addition, unit tests could be written that call BACKFROM^DICF1 with
 various combinations of parameters, to ensure that it always adds the
 right alternate lookup values.

NO.: 14636                              VERSION: 22.2T1
  TAG: C2+6:10, passim                  ROUTINE NAME OR GLOBAL REF: DICF3
  REPORTER: ZACH GONZALES               DATE CHANGED: JAN 24,2013
  PROGRAMMER: RICK MARSHALL             PREVIOUS CHECKSUM: B5692609
  SUPPORTING DOCUMENT NUMBERS: JIRA [FILEMAN-2]
  CHANGE: Fix bug with compound indexes, backward collation, and partial matches
  UPDATED UCIS: DEV
  RELATED CHANGE NUMBERS: 14605,14632,14637
  DOCUMENTATION NEEDED: YES
  DOCUMENTATION NOTES: See Fileman Change #14605 for details.
  NEW VERSION: <22.2T1>
 LONG DESCRIPTION:
 See Fileman Change #14605 for details.

 In routine DICF3, I replaced this line in C2:

         . I DISUB>1!("VP"'[DINDEX(1,"TYPE")) M DINDEX(DISUB)=DIVALUE(DISUB)

 which sets up the from values for the index subscript we're preparing to
 traverse, with these replacement lines:

         . I DISUB>1!("VP"'[DINDEX(1,"TYPE")) D
         . . I DINDEX(DISUB,"WAY")=1 D  ; forward traversal, traverse from
         . . . M DINDEX(DISUB)=DIVALUE(DISUB) ; start of partial matches
         . . I DINDEX(DISUB,"WAY")=-1 D  ; backward traversal, traverse from
         . . . M DINDEX(DISUB)=DIVALUE("BACK",DISUB) ; end of partial matches

 which properly set up the from values for both forward and backward
 traversal.

 While in this routine, I also lightly refactored it, fixing headers and
 quits throughout and removing dot-dot block quits (no-ops).
  EXPLANATION FOR TEST SITES: [FILEMAN-2] COMPOUND INDEXES: FAILURE TO COLLATE B
ACKWARD WITH PARTIAL MATCH
 DETAILED TESTING INSTRUCTIONS:
 See Fileman Change #14605 for details.

NO.: 14637                              VERSION: 22.2T1
  TAG: C1+2:3,C6+18,$$BACKFROM, passim  ROUTINE NAME OR GLOBAL REF: DICUIX2
  REPORTER: ZACH GONZALES               DATE CHANGED: JAN 24,2013
  PROGRAMMER: RICK MARSHALL             PREVIOUS CHECKSUM: B23539644
  SUPPORTING DOCUMENT NUMBERS: JIRA [FILEMAN-2]
  CHANGE: Fix bug with compound indexes, backward collation, and partial matches
  UPDATED UCIS: DEV
  RELATED CHANGE NUMBERS: 14605, 14632, 14636
  DOCUMENTATION NEEDED: YES
  DOCUMENTATION NOTES: See Fileman Change #14605 for details.
  NEW VERSION: <22.2T1>
 LONG DESCRIPTION:
 See Fileman Change #14605 for details.

 In routine DICUIX2 I made three main changes:

 In C1 I replaced this line:

         S DINDEX(DISUB,"WAY")=$S(DIFLAGS[4:1,DIWAY=DINDEX("WAY"):1,1:-1)

 with these two lines:

         S DINDEX(DISUB,"WAY")=DIWAY*DINDEX("WAY") ; calculate direction
         I DIFLAGS[4,DIFLAGS'["l" S DINDEX(DISUB,"WAY")=1 ; override?

 to not suppress the Finder reversing directions if it's being called to
 support the Classic Lookup from routine DIC4.

 In C6 I replaced this line:

         . S DIFR=DIPRT_"{{{{{{{{{{"

 with this line:

         . S DIFR=$$BACKFROM(DIPRT) ; start from end of partial matches

 to begin the move from hard-coded backward from values (which are too
 tied to ASCII specifically) to the use of a function, which can later be
 converted to an extensible framework to support alternative character
 sets. This was based on Sam's experience adapting VISTA for Arabic
 characters in Jordan.

 I also added this function:

 BACKFROM(DIPART)        ; Return From Value for Backward Collation
         ;
         ;;private;function;clean;silent;SAC compliant
         ; input: DIPART = the partial-match value
         ; output = From value for backward collation
         ; called by:
         ;   COMMON1, at C6+18
         ;   BACKFROM^DICF1
         ; calls: none
         ;
         N DIFROM S DIFROM=DIPART_"{{{{{{{{{{"
         ;
         QUIT DIFROM ; return From value ; end of $$BACKFROM

 While in this routine, I also lightly refactored it, fixing headers and
 quits throughout and removing dot-dot block quits (no-ops).
  EXPLANATION FOR TEST SITES: [FILEMAN-2] COMPOUND INDEXES: FAILURE TO COLLATE B
ACKWARD WITH PARTIAL MATCH
 DETAILED TESTING INSTRUCTIONS:
 See Fileman Change #14605 for details.

 Although new function $$BACKFROM^DICUIX2 was added and could in theory be
 unit tested, in practice it always returns the same value for now. When
 in a future version we convert it to an extensible framework, then unit
 tests should be written around it, but not for now.
NO.: 14638                              VERSION: 22.2
  TAG: ENff                             ROUTINE NAME OR GLOBAL REF: DDSRP
  REPORTER: SMH                         DATE CHANGED: JAN 25,2013
  PROGRAMMER: SAM HABIEL
  CHANGE: Now prints properly without using IOP=P
  DOCUMENTATION NEEDED: YES
  DOCUMENTATION NOTES: New feature for screenman
  NEW VERSION: <22.2>
 DETAILED TESTING INSTRUCTIONS:
 In a screenman form, hit F1-P. Try various combinations for printing
 (screen, hfs, real printer). Everything should work properly.
NO.: 14640                              VERSION: 22.2
  TAG: passim                           ROUTINE NAME OR GLOBAL REF: DIAUTL
  REPORTER: SMH                         DATE CHANGED: JAN 25,2013
  PROGRAMMER: GEORGE TIMSON
  CHANGE: Changes to suppress call to ^%ZIS for every audited file
  DOCUMENTATION NEEDED: YES             DOCUMENTATION NOTES: New feature
  NEW VERSION: <22.2>
 LONG DESCRIPTION:
 13,16c12,14
 <  N
 DIA,FR,BY,TO,DHD,DDHD,DIC,L,POP,DDIO,DIOEND,DDTOUT,DIOSL,DIFIXPT,DIFIXPTH
 S DIFIXPT=1 ;KEEPS ^%ZIS FROM BEING CALLED IN ^DIP3
 <  D ^%ZIS Q:POP  S DDIO=IO U IO
 <  F DIA=0:0 S DIA=$O(^DDA(DIA)) Q:'DIA  S FR=$O(^DDA(DIA,"D",DDB)) D:FR
 Q:$D(DDTOUT)
 <  .U IO W @IOF D DDHD
 ---
 >       N DIA,FR,BY,TO,DHD,DDHD,DIC,L,POP,DDIO,DIOEND,DDTOUT
 >       D ^%ZIS Q:POP  S DDIO=ION
 >       F DIA=0:0 S DIA=$O(^DDA(DIA)) Q:'DIA  S FR=$O(^DDA(DIA,"D",DDB))
 D:FR  Q:$D(DDTOUT)  W @IOF

Type <Enter> to continue or '^' to exit:
 18c16
 <  .S DIOEND="S:$G(DIOO1) DDTOUT=1",DIOSL=IOSL ;DHD="W ?0 D
 DDHD^DIAUTL",IOP=DDIO
 ---
 >       .S DHD="W ?0 D DDHD^DIAUTL",IOP=DDIO,DIOEND="S:$G(DIOO1) DDTOUT=1"
 20d17
 <  U IO W @IOF D CLOSE^DIO4
 22,23c19,20
 < DDHD S DDHD="DATA DICTIONARY CHANGES, "_$P($G(^DIC(DIA,0)),U)_"
 FILE(#"_DIA_")" S:DDB DDHD=DDHD_" since "_$$DATE^DIUTL(DDB)
 <  W DDHD,!
 ---
 > DDHD  S DDHD="DATA DICTIONARY CHANGES, "_$P($G(^DIC(DIA,0)),U)_"
 FILE(#"_DIA_")" S:DDB DDHD=DDHD_"    SINCE "_$$DATE^DIUTL(DDB)
 >       W DDHD,?IOM-9," Page ",$G(DC),!
 DETAILED TESTING INSTRUCTIONS:
 From Fileman: OTHER > AUDIT OPTION  >   SHOW PAST CHANGES TO DD'S.

 Print to an HFS device.

 Make sure that the output is complete (long output, several files are
 included). Incorrect output will be seeing just one file.
Two changes in one routine, DIAU.

NO.: 14641                              VERSION: 22.2T1
  TAG: passim                           ROUTINE NAME OR GLOBAL REF: DIAU
  REPORTER: CAROL MONAHAN               DATE CHANGED: JAN 25,2013
  PROGRAMMER: RICK MARSHALL             PREVIOUS CHECKSUM: B37812759
  CHANGE: Auditing: Overhaul Auditing Menu
  UPDATED UCIS: DEV
  RELATED CHANGE NUMBERS: [add Sam's post-install change when he's done]
  DOCUMENTATION NEEDED: YES
  DOCUMENTATION NOTES: Auditing Menu: New Ordering, Numbers, and Menu Text
  NEW VERSION: <22.2T1>
 LONG DESCRIPTION:
 With all the work George has done for auditing since version 22, and with
 the new documentation coming, we took this opportunity to reorganize,
 renumber, and rename the auditing options for clarity and ease of
 selection.

 Before:

    Choose from:
    1            FIELDS BEING AUDITED
    2            MONITOR A USER

Type <Enter> to continue or '^' to exit:
    3            PURGE DATA AUDITS
    4            PURGE DD AUDITS
    5            TURN DATA AUDIT ON/OFF
    6            SHOW PAST CHANGES TO DD'S

 Select AUDIT OPTION:

 After:

    Choose from:
    1            LIST FIELDS BEING AUDITED
    2            TURN DATA AUDIT ON/OFF
    3            DATA AUDIT TRAIL PURGE
    4            SHOW DD AUDIT TRAIL
    5            DD AUDIT TRAIL PURGE
    6            MONITOR A USER

 Select AUDIT OPTION:

 While in DIAU, I also did a very light refactoring of header lines and
 last lines throughout the routine and reorganized the subroutines to
 follow the order of the new menu.
  EXPLANATION FOR TEST SITES: AUDITING: REORGANIZE AUDITING MENU
 DETAILED TESTING INSTRUCTIONS:
 Just run all the options to make sure they still work. Other than a
 possible displatching problem if I didn't match things up correctly,
 there shouldn't be any other kinds of errors possible with this change.

Type <Enter> to continue or '^' to exit:

NO.: 14642                              VERSION: 22.2
  TAG: 4+4                              ROUTINE NAME OR GLOBAL REF: DIAU
  REPORTER: SMH                         DATE CHANGED: JAN 27,2013
  PROGRAMMER: GEORGE TIMSON
  CHANGE: Better help for SHOW DD AUDIT TRAIL option on what to enter.
  DOCUMENTATION NEEDED: NO              NEW VERSION: <22.2>
 LONG DESCRIPTION:
 This line is added:

 >  S DIR("?")="Enter a date.  All audited changes to Data Dictionaries,
 starting with that date, will be shown."
 DETAILED TESTING INSTRUCTIONS:
 Under the menu option, do a "?" to see if the text is there.
Partial Numeric Match fix with U/Q flags for Finder/Lister.
NO.: 14639                              VERSION: 22.2T1
  TAG: C5+4:12                          ROUTINE NAME OR GLOBAL REF: DICUIX2
  REPORTER: ZACH GONZALES               DATE CHANGED: JAN 25,2013
  PROGRAMMER: RICK MARSHALL             PREVIOUS CHECKSUM: B34510586
  SUPPORTING DOCUMENT NUMBERS: JIRA [FILEMAN-6]
  CHANGE: Lookup: make U (classic) or Q (Finder/Lister) flag should suppress par
tial numeric matches on pointer values  UPDATED UCIS: DEV
  DOCUMENTATION NEEDED: NO              NEW VERSION: <22.2T1>
 LONG DESCRIPTION:
 Partial numeric matches, the ability to enter a short number and have it
 match a longer one, was added to deal with free text and code fields that
 have the syntax numbers but the semantics of strings, like social
 security numbers, health record numbers, and other numeric strings.

 Unfortunately, they are being applied too widely, even to actual numbers
 in some cases. The issue at hand is that during an untransformed lookup
 on a pointer index, which stores the internal number of the
 cross-referenced records in an index's value subscript, due to a bug in
 the code, the Fileman lookup is allowing partial numeric matches on these
 internal pointer values. The potential for chaos is high, since there are
 few if any files in VISTA in which records are meaningfully grouped from

Type <Enter> to continue or '^' to exit:
 a user perspective according to the first digit or digits of their record
 numbers.

 Probably, a widespread examination of the current behavior of partial
 numeric matches should be made to ensure they are only being applied to
 free text and set-of-codes fields, for this issue we ask only that when
 the U (untransformed) flag is passed to the classic lookup or the Q
 (quick) flag to the Finder or Lister, partial-numeric matches be
 suppressed on pointer lookups.

 This feature - partial numeric match - is actually two different features.

 First, it enables a lookup value of 1 to match the numbers 1, 12, 135,
 etc. This makes sense when dealing with the kinds of pseudo-numbers I
 wrote about in my original description.

 Second, it ensures that when a field allows both pure numerics and
 alphanumeric strings, that partial matches where the lookup value itself
 is pure numeric will check both the numeric part of the index and the
 string part of the index. So, for example, a lookup value of 9 should
 match both 9 and "9A".

 These two features are inseparable in the Fileman Lookup. I wonder,
 though, whether both features are useful in precisely the same
 circumstances, or whether it might be desirable to separate them.

 Routine DICLIX0 handles the associated calculations for DICLIX (the
 Lister walker), for DICFIX (the Finder walker), and for DIC3 (for the

Type <Enter> to continue or '^' to exit:
 classic lookup). COMMON1^DICUIX2 also does part of the calculation,
 setting DINDEX(DISUB,"MORE?") to flag those routines to consider doing
 the calculations. My temporary fix is in the wrong place, I think; I
 fixed it in DICUIX2, which may be too early. Pointer fields can have
 input transforms that alter DIC(0) for purposes of doing that pointer
 lookup. We should consider whether that pointer-specific DIC(0) ought to
 have any bearing on this later partial numeric match calculation being
 used to help decide how to traverse an index that cross-references that
 field. Even if not, the relationship between the calculation in DICUIX2
 and that in DICLIX0 should be better defined.

 There is also some confusion between the documentation on these three
 contexts and the shared code that does the calculation. This areas should
 be thoroughly tested, and if necessary the code and/or the documentation
 should be updated until it all makes sense and matches.

 Our first attempt to fix this bug was broken because it used the wrong
 variable to test the data subscript's type. It used DINDEX(DISUB,"TYPE"),
 following the Fileman team's internal documentation, but it turns out the
 documentation was wrong. The original author of the Finder was too damn
 clever by half and made this variable actually record the type the lookup
 will treat the subscript as, not its true type. The difference arises when
 we pass in the Q flag to the Finder or Lister to do a Quick Find or Quick
 Lookup. In this case, DINDEX(DISUB,"TYPE") equals F for free text, which
 makes the lookup avoid the elaborate strategies it usually follows for
 doing lookups on pointers. Thus, the original author should have named
 this subscript "ASTYPE" rather than "TYPE". The original author (me) finds
 himself hoist on his own petard. It never pays to be too clever with our

Type <Enter> to continue or '^' to exit:
 algorithms. Baby code.

 For now, we fixed our fix by using DITYPE instead, a variable that does
 (temporarily) contain the field's type (along with the other
 field-descriptor flags). Our tests show that the classic lookup, Lister,
 and Finder all now properly suppress partial numeric matches on pointer
 subscripts when the right flag (U or Q, conditionally) is passed.

 The fix itself is to conditionally suppress the setting of the Any More?
 flag, which plays a key role in activating the search for partial numeric
 matches. For all data types, we suppres it if we're doing exact matching.
 For pointers and variable pointers, we suppress it when the flags tell us
 to do an untransformed lookup. In the case of pointers and variable
 pointers, that's codeword for a lookup in which we're being passed in the
 right IEN and just need to find it in the index; partial numeric matching
 can cause trouble in this scenario, so we suppress it.

 Here are the new lines for C5:

         . ;
         . Q:DIFLAGS["X"  ; no partial-numeric matches if require exact
         . N PNM S PNM=0 ; suppress PNM for pointers or variable pointers?
         . I "VP"[$E(DITYPE) D  Q:'PNM  ; at least for these cases:
         . . I DIFLAGS["l",DIC(0)["U" Q  ; classic, untransformed lookup
         . . I DIFLAGS[3,DIFLAGS["Q" Q  ; Lister, quick list
         . . I DIFLAGS[4,DIFLAGS["Q" Q  ; Finder, quick lookup
         . . S PNM=1 ; otherwise, allow it on ptrs or vptrs
         . ;

Type <Enter> to continue or '^' to exit:
  EXPLANATION FOR TEST SITES: [FILEMAN-6] U (CLASSIC) OR Q (FINDER/LISTER) FLAG
SHOULD SUPPRESS PARTIAL NUMERIC MATCHES ON POINTER VALUES; X SHOULD ALWAYS SUPPR
ESS IT
 DETAILED TESTING INSTRUCTIONS:
 To test the suppression of partial numeric matches with the X flag, set
 up a test file with a set of fields, one for each cross-referenceable
 data type; design all of those fields to accept numerals, whatever their
 data type (for example, allow one code to be 3 and another code to be 30).
 Put indexes on each one. Enter a pair of entries in the file so you have
 partial numeric matches between the entries for the same field in both
 files (free text of 10 in one, 100 in the other, pointer to record 2 in
 one, 20 in the other, and so on).

 Then set up calls through IX^DIC, one for each index, each passing in the
 short numeric value that ought to cause partial numeric matching to
 happen, and always passing the X flag. Lookup will incorrectly prompt the
 user to pick between both values in most or all cases before the fix,
 never after the fix.

 To test suppression of partial numeric matches with the U flag on
 pointers and variable pointers, use the same test file and call IX^DIC
 without the X flag but with the U flag on the pointer index and then
 again on the variable pointer index. They will both incorrectly offer
 both choices, even though you passed in an IEN that matches the shorter
 value. After the fix, this should no longer happen.

 To test it with the Q flags, set up Finder and Lister calls on those same
 indexes. Again, the before and after should demonstrate that the fix

Type <Enter> to continue or '^' to exit:
 worked.
Beta version internal testing file
Removed DD(.85,0,"DDA") node from language file init