Annotation of freem_fileman/DINIT123.m, revision 1.1.1.1

1.1       snw         1: DINIT123       ;SFISC/TKW - INITIALIZE V21 SORT TEMPLATE DD NODES ;6/24/94  11:15
                      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,7,3)
                      7:        ;;=Answer must be 1-63 characters in length.  The ending point for the sort, derived by FileMan.
                      8:        ;;^DD(.4014,7,21,0)
                      9:        ;;=^^3^3^2930115^
                     10:        ;;^DD(.4014,7,21,1,0)
                     11:        ;;=FileMan usually uses the TO value as entered by the user, but in the
                     12:        ;;^DD(.4014,7,21,2,0)
                     13:        ;;=case of dates and sets of codes, the internal value is used.  This field
                     14:        ;;^DD(.4014,7,21,3,0)
                     15:        ;;=tells FileMan the ending point for the sort.
                     16:        ;;^DD(.4014,7,"DT")
                     17:        ;;=2930119
                     18:        ;;^DD(.4014,8,0)
                     19:        ;;=TO VALUE EXTERNAL^F^^T;2^K:$L(X)>63!($L(X)<1) X
                     20:        ;;^DD(.4014,8,3)
                     21:        ;;=Answer must be 1-63 characters in length.  The ending point for the sort, as entered by the user.
                     22:        ;;^DD(.4014,8,21,0)
                     23:        ;;=^^1^1^2930115^
                     24:        ;;^DD(.4014,8,21,1,0)
                     25:        ;;=The ending value for the sort, as entered by the user.
                     26:        ;;^DD(.4014,8,"DT")
                     27:        ;;=2930119
                     28:        ;;^DD(.4014,8.5,0)
                     29:        ;;=TO VALUE PRINTABLE^F^^T;3^K:$L(X)>40!($L(X)<1) X
                     30:        ;;^DD(.4014,8.5,3)
                     31:        ;;=Answer must be 1-40 characters in length.  Used for storing printable form of date and set values.
                     32:        ;;^DD(.4014,8.5,21,0)
                     33:        ;;=^^3^3^2930216^
                     34:        ;;^DD(.4014,8.5,21,1,0)
                     35:        ;;=This field is used to store a printable representation of the TO value
                     36:        ;;^DD(.4014,8.5,21,2,0)
                     37:        ;;=entered by the user during the sort/print dialogue.  Used for date and
                     38:        ;;^DD(.4014,8.5,21,3,0)
                     39:        ;;=set-of-code data types.
                     40:        ;;^DD(.4014,8.5,23,0)
                     41:        ;;=^^1^1^2930216^
                     42:        ;;^DD(.4014,8.5,23,1,0)
                     43:        ;;=Created in CK^DIP12.
                     44:        ;;^DD(.4014,8.5,"DT")
                     45:        ;;=2930216
                     46:        ;;^DD(.4014,9,0)
                     47:        ;;=CROSS REFERENCE DATA^F^^IX;E1,245^K:$L(X)>245!($L(X)<1) X
                     48:        ;;^DD(.4014,9,3)
                     49:        ;;=First ^ piece null, second piece=static part of cross-reference, third piece=global reference, 4th piece=number of variable subscripts to get to (and including) record number.
                     50:        ;;^DD(.4014,9,21,0)
                     51:        ;;=^^8^8^2930115^
                     52:        ;;^DD(.4014,9,21,1,0)
                     53:        ;;= Piece 1 is always null
                     54:        ;;^DD(.4014,9,21,2,0)
                     55:        ;;= Piece 2 is the static part of the cross-reference: ex. DIZ(662001,"B",
                     56:        ;;^DD(.4014,9,21,3,0)
                     57:        ;;= Piece 3 is the global reference: ex. DIZ(662001,
                     58:        ;;^DD(.4014,9,21,4,0)
                     59:        ;;= Piece 4 tells FileMan how many variable subscripts must be sorted
                     60:        ;;^DD(.4014,9,21,5,0)
                     61:        ;;=through to get to the record number, plus 1 for the record number
                     62:        ;;^DD(.4014,9,21,6,0)
                     63:        ;;=itself.  ex. for a regular cross-reference, ^DIZ(662001,"B",X,DA),
                     64:        ;;^DD(.4014,9,21,7,0)
                     65:        ;;=the number is 2.  One for the value of the X subscript, and one for the
                     66:        ;;^DD(.4014,9,21,8,0)
                     67:        ;;=record number itself (DA).
                     68:        ;;^DD(.4014,9,23,0)
                     69:        ;;=^^6^6^2930115^
                     70:        ;;^DD(.4014,9,23,1,0)
                     71:        ;;=The IX nodes are normally derived by FileMan during the entry of sort
                     72:        ;;^DD(.4014,9,23,2,0)
                     73:        ;;=fields (in routine XR^DIP).  However, they can also be passed to the
                     74:        ;;^DD(.4014,9,23,3,0)
                     75:        ;;=print (^DIP) in the BY(0) variable to cause FileMan to either use a MUMPS
                     76:        ;;^DD(.4014,9,23,4,0)
                     77:        ;;=type cross-reference, or a previously sorted list of record numbers.
                     78:        ;;^DD(.4014,9,23,5,0)
                     79:        ;;=Fileman sometimes builds the IX node prior to calling the print, as in
                     80:        ;;^DD(.4014,9,23,6,0)
                     81:        ;;=the INQUIRE option, where the user then goes on to print the records.
                     82:        ;;^DD(.4014,9,"DT")
                     83:        ;;=2930115
                     84:        ;;^DD(.4014,9.5,0)
                     85:        ;;=POINT TO CROSS REFERENCE^F^^PTRIX;E1,245^K:$L(X)>245!($L(X)<1) X
                     86:        ;;^DD(.4014,9.5,3)
                     87:        ;;=Enter global reference for "B" index of .01 field on pointed-to file.  Answer must be 1-245 characters in length.
                     88:        ;;^DD(.4014,9.5,21,0)
                     89:        ;;=^^7^7^2931221^
                     90:        ;;^DD(.4014,9.5,21,1,0)
                     91:        ;;=This node will exist only if the sort field is a pointer, if the sort
                     92:        ;;^DD(.4014,9.5,21,2,0)
                     93:        ;;=field has a regular cross-reference, if the .01 field on the pointed-to
                     94:        ;;^DD(.4014,9.5,21,3,0)
                     95:        ;;=file has a "B" index, and if the .01 field on the pointed-to file is
                     96:        ;;^DD(.4014,9.5,21,4,0)
                     97:        ;;=either a numeric, date, set-of-codes or free-text field, and does not have
                     98:        ;;^DD(.4014,9.5,21,5,0)
                     99:        ;;=an output transform.  If this node exists, it will be set to the static
                    100:        ;;^DD(.4014,9.5,21,6,0)
                    101:        ;;=part of the global reference of the "B" index on the pointed-to file. (ex.
                    102:        ;;^DD(.4014,9.5,21,7,0)
                    103:        ;;=^DIZ(662001,"B",).
                    104:        ;;^DD(.4014,9.5,"DT")
                    105:        ;;=2931221
                    106:        ;;^DD(.4014,10,0)
                    107:        ;;=GET CODE^K^^GET;E1,245^K:$L(X)>245 X D:$D(X) ^DIM
                    108:        ;;^DD(.4014,10,3)
                    109:        ;;=This is Standard MUMPS code used to extract the sort field from a record.
                    110:        ;;^DD(.4014,10,9)
                    111:        ;;=@
                    112:        ;;^DD(.4014,10,21,0)
                    113:        ;;=^^3^3^2930115^
                    114:        ;;^DD(.4014,10,21,1,0)
                    115:        ;;=The GET CODE is MUMPS code that is executed after a record (or sub-record)

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