Annotation of freem_fileman/DINIT125.m, revision 1.1.1.1

1.1       snw         1: DINIT125       ;SFISC/TKW - INITIALIZE V21 SORT TEMPLATE DD NODES ;6/24/94  11:16
                      2:        ;;21.0;VA FileMan;;Dec 28, 1994
                      3:        ;Per VHA Directive 10-93-142, this routine should not be modified.
                      4:        F I=1:2 S X=$T(Q+I) Q:X=""  S Y=$E($T(Q+I+1),4,999),X=$E(X,4,999) S:$A(Y)=126 I=I+1,Y=$E(Y,2,999)_$E($T(Q+I+1),5,99) S:$A(Y)=61 Y=$E(Y,2,999) S @X=Y
                      5: Q      Q
                      6:        ;;^DD(.4014,15,21,1,0)
                      7:        ;;=This pointer to the FileMan DATA TYPE file is entered automatically by
                      8:        ;;^DD(.4014,15,21,2,0)
                      9:        ;;=FileMan during the sort/print.  Note that if sorting by a pointer or a
                     10:        ;;^DD(.4014,15,21,3,0)
                     11:        ;;=variable pointer, FileMan will follow the pointer chain until it gets to
                     12:        ;;^DD(.4014,15,21,4,0)
                     13:        ;;=one of the other data types, in order to determine how to correctly set up
                     14:        ;;^DD(.4014,15,21,5,0)
                     15:        ;;=the sort logic.
                     16:        ;;^DD(.4014,15,23,0)
                     17:        ;;=^^1^1^2930514^
                     18:        ;;^DD(.4014,15,23,1,0)
                     19:        ;;=Pointer to DATA TYPE file, derived by FileMan in routine DTYP^DIP1.
                     20:        ;;^DD(.4014,15,"DT")
                     21:        ;;=2930514
                     22:        ;;^DD(.4014,16,0)
                     23:        ;;=COMPUTED FIELD CODE^K^^CM;E1,245^K:$L(X)>245 X D:$D(X) ^DIM
                     24:        ;;^DD(.4014,16,3)
                     25:        ;;=This is Standard MUMPS code, generated for sorting by computed fields or pointer fields.
                     26:        ;;^DD(.4014,16,9)
                     27:        ;;=@
                     28:        ;;^DD(.4014,16,21,0)
                     29:        ;;=^^3^3^2930201^
                     30:        ;;^DD(.4014,16,21,1,0)
                     31:        ;;=This field contains MUMPS code used to find the actual value of a field
                     32:        ;;^DD(.4014,16,21,2,0)
                     33:        ;;=that is computed or a pointer.  The code is generated by DICOMP.  This
                     34:        ;;^DD(.4014,16,21,3,0)
                     35:        ;;=code may execute code in OVERFLOW nodes as well.
                     36:        ;;^DD(.4014,16,23,0)
                     37:        ;;=^^1^1^2930201^
                     38:        ;;^DD(.4014,16,23,1,0)
                     39:        ;;=Generated by DICOMP.  Put into the DPP array in C^DIP0.
                     40:        ;;^DD(.4014,16,"DT")
                     41:        ;;=2930201
                     42:        ;;^DD(.4014,17,0)
                     43:        ;;=MULTIPLE FIELD DATA^.40141^^1;0
                     44:        ;;^DD(.4014,18,0)
                     45:        ;;=RELATIONAL JUMP FIELD DATA^.401418^^2;0
                     46:        ;;^DD(.4014,19,0)
                     47:        ;;=OVERFLOW DATA^.401419^^3;0
                     48:        ;;^DD(.4014,19,21,0)
                     49:        ;;=^^5^5^2930201^
                     50:        ;;^DD(.4014,19,21,1,0)
                     51:        ;;=This field contains the first subscript from the part of the DPP array
                     52:        ;;^DD(.4014,19,21,2,0)
                     53:        ;;=that contains overflow code executed when sorting by a field that is
                     54:        ;;^DD(.4014,19,21,3,0)
                     55:        ;;=gotten to relationally or a computed field.  Overflow code is generated
                     56:        ;;^DD(.4014,19,21,4,0)
                     57:        ;;=when needed by DICOMP.  This field will typically look something like
                     58:        ;;^DD(.4014,19,21,5,0)
                     59:        ;;="OVF0".
                     60:        ;;^DD(.4014,19,23,0)
                     61:        ;;=^^1^1^2930201^
                     62:        ;;^DD(.4014,19,23,1,0)
                     63:        ;;=Generated by DICOMP from DIP0 during the sort/print option.
                     64:        ;;^DD(.4014,19,"DT")
                     65:        ;;=2930201
                     66:        ;;^DD(.4014,20,0)
                     67:        ;;=SUBHEADER OUTPUT TRANSFORM^K^^OUT;E1,245^K:$L(X)>245 X D:$D(X) ^DIM
                     68:        ;;^DD(.4014,20,3)
                     69:        ;;=This is Standard MUMPS code.  This is used only when sorting by a user-specified cross-reference in input variable BY(0).
                     70:        ;;^DD(.4014,20,9)
                     71:        ;;=@
                     72:        ;;^DD(.4014,20,21,0)
                     73:        ;;=^^6^6^2930204^
                     74:        ;;^DD(.4014,20,21,1,0)
                     75:        ;;=Defined only when using the BY(0) input variable to the FileMan print,
                     76:        ;;^DD(.4014,20,21,2,0)
                     77:        ;;=EN1^DIP, which allows the user to specify a cross-reference to sort on.
                     78:        ;;^DD(.4014,20,21,3,0)
                     79:        ;;=The user is allowed to specify MUMPS code that can be used as an output
                     80:        ;;^DD(.4014,20,21,4,0)
                     81:        ;;=transform for any of the subheaders (i.e., subscripts in the
                     82:        ;;^DD(.4014,20,21,5,0)
                     83:        ;;=cross-reference) in the S input array.  This output transform code is
                     84:        ;;^DD(.4014,20,21,6,0)
                     85:        ;;=stored in this field.
                     86:        ;;^DD(.4014,20,23,0)
                     87:        ;;=^^4^4^2930204^
                     88:        ;;^DD(.4014,20,23,1,0)
                     89:        ;;=Stores output transform code from the third piece of S(0,N) where N is
                     90:        ;;^DD(.4014,20,23,2,0)
                     91:        ;;=the sort level.  This is an input array used in conjunction with BY(0)
                     92:        ;;^DD(.4014,20,23,3,0)
                     93:        ;;=when user specifies a specific cross-reference to use for the sort, in
                     94:        ;;^DD(.4014,20,23,4,0)
                     95:        ;;=in the FileMan print routine EN1^DIP.
                     96:        ;;^DD(.4014,20,"DT")
                     97:        ;;=2930204
                     98:        ;;^DD(.4014,21,0)
                     99:        ;;=TEXT SORT FLAG^S^SORT:SORT LIKE TEXT;RANGE:TREAT RANGE LIKE TEXT;^SRTTXT;1^Q
                    100:        ;;^DD(.4014,21,21,0)
                    101:        ;;=^^12^12^2931221^
                    102:        ;;^DD(.4014,21,21,1,0)
                    103:        ;;=This flag will be set in one of two cases.
                    104:        ;;^DD(.4014,21,21,2,0)
                    105:        ;;= 1) If the user entered the ;TXT qualifier, the flag will be set to
                    106:        ;;^DD(.4014,21,21,3,0)
                    107:        ;;="SORT", and will cause a space to be inserted at the beginning of each
                    108:        ;;^DD(.4014,21,21,4,0)
                    109:        ;;=sort value, causing even numeric fields to be sorted as if they were text.
                    110:        ;;^DD(.4014,21,21,5,0)
                    111:        ;;= 2) If the user entered a FROM or TO value that is a non-canonic number,
                    112:        ;;^DD(.4014,21,21,6,0)
                    113:        ;;=the flag will be set to RANGE, and will cause sort values that are numeric
                    114:        ;;^DD(.4014,21,21,7,0)
                    115:        ;;=to be treated as if they were text, when seeing whether they fall within
                    116:        ;;^DD(.4014,21,21,8,0)
                    117:        ;;=the from/to range.  However, they will still sort like numbers (MUMPS sort
                    118:        ;;^DD(.4014,21,21,9,0)
                    119:        ;;=sequence).
                    120:        ;;^DD(.4014,21,21,10,0)
                    121:        ;;= 

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>