File:  [Coherent Logic Development] / freem_fileman / Attic / DINIT125.m
Revision 1.1: download - view: text, annotated - select for diffs
Mon Apr 28 14:10:44 2025 UTC (5 weeks, 4 days ago) by snw
Branches: MAIN
CVS tags: HEAD
Initial revision

DINIT125	;SFISC/TKW - INITIALIZE V21 SORT TEMPLATE DD NODES ;6/24/94  11:16
	;;21.0;VA FileMan;;Dec 28, 1994
	;Per VHA Directive 10-93-142, this routine should not be modified.
	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
Q	Q
	;;^DD(.4014,15,21,1,0)
	;;=This pointer to the FileMan DATA TYPE file is entered automatically by
	;;^DD(.4014,15,21,2,0)
	;;=FileMan during the sort/print.  Note that if sorting by a pointer or a
	;;^DD(.4014,15,21,3,0)
	;;=variable pointer, FileMan will follow the pointer chain until it gets to
	;;^DD(.4014,15,21,4,0)
	;;=one of the other data types, in order to determine how to correctly set up
	;;^DD(.4014,15,21,5,0)
	;;=the sort logic.
	;;^DD(.4014,15,23,0)
	;;=^^1^1^2930514^
	;;^DD(.4014,15,23,1,0)
	;;=Pointer to DATA TYPE file, derived by FileMan in routine DTYP^DIP1.
	;;^DD(.4014,15,"DT")
	;;=2930514
	;;^DD(.4014,16,0)
	;;=COMPUTED FIELD CODE^K^^CM;E1,245^K:$L(X)>245 X D:$D(X) ^DIM
	;;^DD(.4014,16,3)
	;;=This is Standard MUMPS code, generated for sorting by computed fields or pointer fields.
	;;^DD(.4014,16,9)
	;;=@
	;;^DD(.4014,16,21,0)
	;;=^^3^3^2930201^
	;;^DD(.4014,16,21,1,0)
	;;=This field contains MUMPS code used to find the actual value of a field
	;;^DD(.4014,16,21,2,0)
	;;=that is computed or a pointer.  The code is generated by DICOMP.  This
	;;^DD(.4014,16,21,3,0)
	;;=code may execute code in OVERFLOW nodes as well.
	;;^DD(.4014,16,23,0)
	;;=^^1^1^2930201^
	;;^DD(.4014,16,23,1,0)
	;;=Generated by DICOMP.  Put into the DPP array in C^DIP0.
	;;^DD(.4014,16,"DT")
	;;=2930201
	;;^DD(.4014,17,0)
	;;=MULTIPLE FIELD DATA^.40141^^1;0
	;;^DD(.4014,18,0)
	;;=RELATIONAL JUMP FIELD DATA^.401418^^2;0
	;;^DD(.4014,19,0)
	;;=OVERFLOW DATA^.401419^^3;0
	;;^DD(.4014,19,21,0)
	;;=^^5^5^2930201^
	;;^DD(.4014,19,21,1,0)
	;;=This field contains the first subscript from the part of the DPP array
	;;^DD(.4014,19,21,2,0)
	;;=that contains overflow code executed when sorting by a field that is
	;;^DD(.4014,19,21,3,0)
	;;=gotten to relationally or a computed field.  Overflow code is generated
	;;^DD(.4014,19,21,4,0)
	;;=when needed by DICOMP.  This field will typically look something like
	;;^DD(.4014,19,21,5,0)
	;;="OVF0".
	;;^DD(.4014,19,23,0)
	;;=^^1^1^2930201^
	;;^DD(.4014,19,23,1,0)
	;;=Generated by DICOMP from DIP0 during the sort/print option.
	;;^DD(.4014,19,"DT")
	;;=2930201
	;;^DD(.4014,20,0)
	;;=SUBHEADER OUTPUT TRANSFORM^K^^OUT;E1,245^K:$L(X)>245 X D:$D(X) ^DIM
	;;^DD(.4014,20,3)
	;;=This is Standard MUMPS code.  This is used only when sorting by a user-specified cross-reference in input variable BY(0).
	;;^DD(.4014,20,9)
	;;=@
	;;^DD(.4014,20,21,0)
	;;=^^6^6^2930204^
	;;^DD(.4014,20,21,1,0)
	;;=Defined only when using the BY(0) input variable to the FileMan print,
	;;^DD(.4014,20,21,2,0)
	;;=EN1^DIP, which allows the user to specify a cross-reference to sort on.
	;;^DD(.4014,20,21,3,0)
	;;=The user is allowed to specify MUMPS code that can be used as an output
	;;^DD(.4014,20,21,4,0)
	;;=transform for any of the subheaders (i.e., subscripts in the
	;;^DD(.4014,20,21,5,0)
	;;=cross-reference) in the S input array.  This output transform code is
	;;^DD(.4014,20,21,6,0)
	;;=stored in this field.
	;;^DD(.4014,20,23,0)
	;;=^^4^4^2930204^
	;;^DD(.4014,20,23,1,0)
	;;=Stores output transform code from the third piece of S(0,N) where N is
	;;^DD(.4014,20,23,2,0)
	;;=the sort level.  This is an input array used in conjunction with BY(0)
	;;^DD(.4014,20,23,3,0)
	;;=when user specifies a specific cross-reference to use for the sort, in
	;;^DD(.4014,20,23,4,0)
	;;=in the FileMan print routine EN1^DIP.
	;;^DD(.4014,20,"DT")
	;;=2930204
	;;^DD(.4014,21,0)
	;;=TEXT SORT FLAG^S^SORT:SORT LIKE TEXT;RANGE:TREAT RANGE LIKE TEXT;^SRTTXT;1^Q
	;;^DD(.4014,21,21,0)
	;;=^^12^12^2931221^
	;;^DD(.4014,21,21,1,0)
	;;=This flag will be set in one of two cases.
	;;^DD(.4014,21,21,2,0)
	;;= 1) If the user entered the ;TXT qualifier, the flag will be set to
	;;^DD(.4014,21,21,3,0)
	;;="SORT", and will cause a space to be inserted at the beginning of each
	;;^DD(.4014,21,21,4,0)
	;;=sort value, causing even numeric fields to be sorted as if they were text.
	;;^DD(.4014,21,21,5,0)
	;;= 2) If the user entered a FROM or TO value that is a non-canonic number,
	;;^DD(.4014,21,21,6,0)
	;;=the flag will be set to RANGE, and will cause sort values that are numeric
	;;^DD(.4014,21,21,7,0)
	;;=to be treated as if they were text, when seeing whether they fall within
	;;^DD(.4014,21,21,8,0)
	;;=the from/to range.  However, they will still sort like numbers (MUMPS sort
	;;^DD(.4014,21,21,9,0)
	;;=sequence).
	;;^DD(.4014,21,21,10,0)
	;;= 

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