Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: DINIT122

DINIT122.m

Go to the documentation of this file.
  1. DINIT122 ;SFISC/MKO-SORT TEMPLATE FILE ;1:13 PM 13 Nov 1998
  1. ;;22.0;VA FileMan;;Mar 30, 1999
  1. ;Per VHA Directive 10-93-142, this routine should not be modified.
  1. 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
  1. G ^DINIT123
  1. Q Q
  1. ;;^DD(.4011624,3.1,21,3,0)
  1. ;;=the sort qualifiers for page breaks (#) or rankings (!).
  1. ;;^DD(.4011624,3.1,21,4,0)
  1. ;;=
  1. ;;^DD(.4011624,3.1,21,5,0)
  1. ;;=The # and/or ! are the only qualifiers that can be used. Others,
  1. ;;^DD(.4011624,3.1,21,6,0)
  1. ;;=such as + for subtotals, cannot be used.
  1. ;;^DD(.4011624,3.1,23,0)
  1. ;;=^^1^1^2960910^^
  1. ;;^DD(.4011624,3.1,23,1,0)
  1. ;;=Equivalent to the 1st piece of DISPAR(0,n) in the EN1^DIP call.
  1. ;;^DD(.4011624,3.1,"DT")
  1. ;;=2960910
  1. ;;^DD(.4011624,3.2,0)
  1. ;;=DISPAR(0,n) PIECE TWO^FX^^1;2^K:$L(X)>50!($L(X)<1)!'((X[";""")!(X[";L")!(X[";C")!(X[";S")) X
  1. ;;^DD(.4011624,3.2,3)
  1. ;;=Answer with qualifiers like ;"" or ;S2;C10;L30;"VALUE: "
  1. ;;^DD(.4011624,3.2,21,0)
  1. ;;=^^12^12^2960910^^^
  1. ;;^DD(.4011624,3.2,21,1,0)
  1. ;;=As when defining the second piece of DISPAR(0,n) in a programmer
  1. ;;^DD(.4011624,3.2,21,2,0)
  1. ;;=call that includes BY(0) when calling EN1^DIP, this field can hold
  1. ;;^DD(.4011624,3.2,21,3,0)
  1. ;;=the sort qualifiers that normally appear after a sort-by field in
  1. ;;^DD(.4011624,3.2,21,4,0)
  1. ;;=interactive mode. The ones that can be used are as follows:
  1. ;;^DD(.4011624,3.2,21,5,0)
  1. ;;=
  1. ;;^DD(.4011624,3.2,21,6,0)
  1. ;;= ;"" to have the subheader appear
  1. ;;^DD(.4011624,3.2,21,7,0)
  1. ;;= ;"caption" to give the subheader a caption
  1. ;;^DD(.4011624,3.2,21,8,0)
  1. ;;= ;Ln to left-justify the subheader to n characters
  1. ;;^DD(.4011624,3.2,21,9,0)
  1. ;;= ;Cn to start the display in the nth column
  1. ;;^DD(.4011624,3.2,21,10,0)
  1. ;;= ;Sn to skip n lines before each subheader
  1. ;;^DD(.4011624,3.2,21,11,0)
  1. ;;=
  1. ;;^DD(.4011624,3.2,21,12,0)
  1. ;;=If this field is null, subheaders are supressed (@ is assumed).
  1. ;;^DD(.4011624,3.2,23,0)
  1. ;;=^^3^3^2960910^^^
  1. ;;^DD(.4011624,3.2,23,1,0)
  1. ;;=Equivalent to the 2nd piece of DISPAR(0,n) in the EN1^DIP call.
  1. ;;^DD(.4011624,3.2,23,2,0)
  1. ;;=Note that if DISPAR(0,n) is defined, subheaders will appear even if
  1. ;;^DD(.4011624,3.2,23,3,0)
  1. ;;=used with a print template that normally suppresses subheaders.
  1. ;;^DD(.4011624,3.2,"DT")
  1. ;;=2960911
  1. ;;^DD(.4011624,4,0)
  1. ;;=DISPAR(0,n,OUT)^K^^2;E1,245^K:$L(X)>245 X D:$D(X) ^DIM
  1. ;;^DD(.4011624,4,3)
  1. ;;=Enter code to transform subscript. This is Standard M code.
  1. ;;^DD(.4011624,4,9)
  1. ;;=@
  1. ;;^DD(.4011624,4,21,0)
  1. ;;=^^7^7^2960829^^^^
  1. ;;^DD(.4011624,4,21,1,0)
  1. ;;=As when defining DISPAR(0,n,"OUT") for a call to EN1^DIP that includes
  1. ;;^DD(.4011624,4,21,2,0)
  1. ;;=BY(0), enter M code that will transform the sort-by value for this
  1. ;;^DD(.4011624,4,21,3,0)
  1. ;;=subscript (n) when it is output (e.g. printed). At the time
  1. ;;^DD(.4011624,4,21,4,0)
  1. ;;=the code is executed the untransformed value of the subscript will be in
  1. ;;^DD(.4011624,4,21,5,0)
  1. ;;=Y. The code should put the transformed value back into Y.
  1. ;;^DD(.4011624,4,21,6,0)
  1. ;;=
  1. ;;^DD(.4011624,4,21,7,0)
  1. ;;=For example, for an inverse date, S:Y Y=99999999-Y S Y=$$FMTE^XLFDT(Y)"
  1. ;;^DD(.4011624,4,23,0)
  1. ;;=^^2^2^2960829^^^^
  1. ;;^DD(.4011624,4,23,1,0)
  1. ;;=Equivalent to the DISPAR(0,n,"OUT") input variable to the programmer call
  1. ;;^DD(.4011624,4,23,2,0)
  1. ;;=EN1^DIP.
  1. ;;^DD(.4011624,4,"DT")
  1. ;;=2960829
  1. ;;^DD(.4012,0)
  1. ;;=DESCRIPTION SUB-FIELD^^.01^1
  1. ;;^DD(.4012,0,"NM","DESCRIPTION")
  1. ;;=
  1. ;;^DD(.4012,0,"UP")
  1. ;;=.401
  1. ;;^DD(.4012,.01,0)
  1. ;;=DESCRIPTION^W^^0;1^Q
  1. ;;^DD(.4014,0)
  1. ;;=SORT FIELD DATA SUB-FIELD^^21^27
  1. ;;^DD(.4014,0,"DT")
  1. ;;=2931221
  1. ;;^DD(.4014,0,"IX","B",.4014,.01)
  1. ;;=
  1. ;;^DD(.4014,0,"NM","SORT FIELD DATA")
  1. ;;=
  1. ;;^DD(.4014,0,"UP")
  1. ;;=.401
  1. ;;^DD(.4014,.01,0)
  1. ;;=FILE OR SUBFILE NO.^MRNJ13,5^^0;1^K:+X'=X!(X>9999999.99999)!(X<0)!(X?.E1"."6N.N) X
  1. ;;^DD(.4014,.01,1,0)
  1. ;;=^.1
  1. ;;^DD(.4014,.01,1,1,0)
  1. ;;=.4014^B
  1. ;;^DD(.4014,.01,1,1,1)
  1. ;;=S ^DIBT(DA(1),2,"B",$E(X,1,30),DA)=""
  1. ;;^DD(.4014,.01,1,1,2)
  1. ;;=K ^DIBT(DA(1),2,"B",$E(X,1,30),DA)
  1. ;;^DD(.4014,.01,3)
  1. ;;=Type a Number between 0 and 9999999.99999, 5 Decimal Digits. File or subfile number on which sort field resides.
  1. ;;^DD(.4014,.01,21,0)
  1. ;;=^^3^3^2930125^^
  1. ;;^DD(.4014,.01,21,1,0)
  1. ;;=This is the number of the file or subfile on which the sort field
  1. ;;^DD(.4014,.01,21,2,0)
  1. ;;=resides. It is created automatically during the SORT FIELDS dialogue
  1. ;;^DD(.4014,.01,21,3,0)
  1. ;;=with the user in the sort/print option.
  1. ;;^DD(.4014,.01,23,0)
  1. ;;=^^1^1^2930125^^
  1. ;;^DD(.4014,.01,23,1,0)
  1. ;;=This number is automatically assigned by the print routine DIP.
  1. ;;^DD(.4014,.01,"DT")
  1. ;;=2930125
  1. ;;^DD(.4014,2,0)
  1. ;;=FIELD NO.^NJ13,5^^0;2^K:+X'=X!(X>9999999.99999)!(X<0)!(X?.E1"."6N.N) X
  1. ;;^DD(.4014,2,3)
  1. ;;=Type a Number between 0 and 9999999.99999, 5 Decimal Digits. Sort field number, except for pointers, variable pointers and computed fields.
  1. ;;^DD(.4014,2,21,0)
  1. ;;=^^4^4^2930125^
  1. ;;^DD(.4014,2,21,1,0)
  1. ;;=On most sort fields, this piece will contain the field number. If sorting
  1. ;;^DD(.4014,2,21,2,0)
  1. ;;=on a pointer, variable pointer or computed field, the piece will be null.
  1. ;;^DD(.4014,2,21,3,0)
  1. ;;=If sorting on the record number (NUMBER or .001), the piece will contain
  1. ;;^DD(.4014,2,21,4,0)
  1. ;;=a 0.
  1. ;;^DD(.4014,2,23,0)
  1. ;;=^^1^1^2930125^
  1. ;;^DD(.4014,2,23,1,0)
  1. ;;=Created by FileMan during the print option (in the DIP* routines).
  1. ;;^DD(.4014,2,"DT")
  1. ;;=2930125
  1. ;;^DD(.4014,3,0)
  1. ;;=FIELD NAME^F^^0;3^K:$L(X)>100!($L(X)<1) X
  1. ;;^DD(.4014,3,3)
  1. ;;=Answer must be 1-100 characters in length.
  1. ;;^DD(.4014,3,21,0)
  1. ;;=^^2^2^2930125^
  1. ;;^DD(.4014,3,21,1,0)
  1. ;;=This piece contains the sort field name, or the user entry if sorting by
  1. ;;^DD(.4014,3,21,2,0)
  1. ;;=an on-the-fly computed field.
  1. ;;^DD(.4014,3,23,0)
  1. ;;=^^1^1^2930125^
  1. ;;^DD(.4014,3,23,1,0)
  1. ;;=Created by FileMan during the print option (DIP* routines).
  1. ;;^DD(.4014,3,"DT")
  1. ;;=2930125
  1. ;;^DD(.4014,4,0)
  1. ;;=SORT QUALIFIERS BEFORE FIELD^F^^0;4^K:$L(X)>20!($L(X)<1) X
  1. ;;^DD(.4014,4,3)
  1. ;;=Answer must be 1-20 characters in length. Sort qualifiers that normally precede the field number in the user dialogue (like !,@,#,+)
  1. ;;^DD(.4014,4,21,0)
  1. ;;=^^5^5^2930125^^^
  1. ;;^DD(.4014,4,21,1,0)
  1. ;;=This contains all of the sort qualifiers that normally precede the field
  1. ;;^DD(.4014,4,21,2,0)
  1. ;;=number in the user dialogue during the sort option. It includes things
  1. ;;^DD(.4014,4,21,3,0)
  1. ;;=like # (Page break when sort value changes), @ (suppress printing of
  1. ;;^DD(.4014,4,21,4,0)
  1. ;;=subheader). These qualifiers are listed out with no delimiters, as they
  1. ;;^DD(.4014,4,21,5,0)
  1. ;;=are found during the user dialogue. (So you might see something like #@).