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

DINIT2A1.m

Go to the documentation of this file.
  1. DINIT2A1 ;SFISC/MKO-KEY AND INDEX FILES ;8:42 AM 4 Jun 1999 [ 04/02/2003 8:25 AM ]
  1. ;;22.0;VA FileMan;**1001**;APR 1, 2003
  1. ;;22.0;VA FileMan;**1**;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 ^DINIT2A2
  1. Q Q
  1. ;;^DD(.11,.42,21,5,0)
  1. ;;=the FileMan Sort and Print (EN1^DIP).
  1. ;;^DD(.11,.42,21,6,0)
  1. ;;=
  1. ;;^DD(.11,.42,21,7,0)
  1. ;;=SORTING ONLY - The index name starts with "A". Calls to Classic FileMan
  1. ;;^DD(.11,.42,21,8,0)
  1. ;;=lookup (^DIC) or the Finder (FIND^DIC or $$FIND1^DIC) will not use this
  1. ;;^DD(.11,.42,21,9,0)
  1. ;;=index unless it is specified in the input parameters. The index will be
  1. ;;^DD(.11,.42,21,10,0)
  1. ;;=available for use by the FileMan Sort and Print (EN1^DIP).
  1. ;;^DD(.11,.42,21,11,0)
  1. ;;=
  1. ;;^DD(.11,.42,21,12,0)
  1. ;;=ACTION - The index name starts with "A". This is used for M code that
  1. ;;^DD(.11,.42,21,13,0)
  1. ;;=performs some actions and does NOT build an index. Therefore, it is not
  1. ;;^DD(.11,.42,21,14,0)
  1. ;;=available for use by either the Classic FileMan lookup (^DIC), the Finder
  1. ;;^DD(.11,.42,21,15,0)
  1. ;;=(FIND^DIC or $$FIND1^DIC) or the Sort and Print (EN1^DIP).
  1. ;;^DD(.11,.42,"DT")
  1. ;;=2980416
  1. ;;^DD(.11,.5,0)
  1. ;;=ROOT TYPE^S^I:INDEX FILE;W:WHOLE FILE;^0;8^Q
  1. ;;^DD(.11,.5,3)
  1. ;;=Answer '??' for more help.
  1. ;;^DD(.11,.5,21,0)
  1. ;;=^^6^6^2980911^
  1. ;;^DD(.11,.5,21,1,0)
  1. ;;=Answer 'I' if the fields that make up the file are defined at the same
  1. ;;^DD(.11,.5,21,2,0)
  1. ;;=level at which the index is located.
  1. ;;^DD(.11,.5,21,3,0)
  1. ;;=
  1. ;;^DD(.11,.5,21,4,0)
  1. ;;=Answer 'W' if this is a whole file cross-reference in which the fields
  1. ;;^DD(.11,.5,21,5,0)
  1. ;;=that make up the index are defined in a subfile, but the index is
  1. ;;^DD(.11,.5,21,6,0)
  1. ;;=physically located at a parent file level.
  1. ;;^DD(.11,.5,"DT")
  1. ;;=2980908
  1. ;;^DD(.11,.51,0)
  1. ;;=ROOT FILE^RNJ20,7^^0;9^K:+X'=X!(X>999999999999)!(X<0)!(X?.E1"."8N.N) X
  1. ;;^DD(.11,.51,1,0)
  1. ;;=^.1
  1. ;;^DD(.11,.51,1,1,0)
  1. ;;=.11^AC
  1. ;;^DD(.11,.51,1,1,1)
  1. ;;=S ^DD("IX","AC",$E(X,1,30),DA)=""
  1. ;;^DD(.11,.51,1,1,2)
  1. ;;=K ^DD("IX","AC",$E(X,1,30),DA)
  1. ;;^DD(.11,.51,1,1,3)
  1. ;;=Lets FileMan find indexes defined on fields from a particular file
  1. ;;^DD(.11,.51,1,1,"DT")
  1. ;;=2980929
  1. ;;^DD(.11,.51,3)
  1. ;;=Type a Number between 0 and 999999999999, 7 Decimal Digits. Answer '??' for more help.
  1. ;;^DD(.11,.51,21,0)
  1. ;;=^^3^3^2980910^
  1. ;;^DD(.11,.51,21,1,0)
  1. ;;=Answer with the number of the file or subfile where this index is defined.
  1. ;;^DD(.11,.51,21,2,0)
  1. ;;=For whole file indexes, answer with the subfile number, not the number of
  1. ;;^DD(.11,.51,21,3,0)
  1. ;;=the file where the index physically resides.
  1. ;;^DD(.11,.51,"DT")
  1. ;;=2980929
  1. ;;^DD(.11,1.1,0)
  1. ;;=SET LOGIC^RK^^1;E1,245^K:$L(X)>245 X D:$D(X) ^DIM
  1. ;;^DD(.11,1.1,3)
  1. ;;=Answer must be Standard M code. Answer '??' for more help.
  1. ;;^DD(.11,1.1,9)
  1. ;;=@
  1. ;;^DD(.11,1.1,21,0)
  1. ;;=^^16^16^2990430^^
  1. ;;^DD(.11,1.1,21,1,0)
  1. ;;=Answer with the M code that FileMan should execute when the values of
  1. ;;^DD(.11,1.1,21,2,0)
  1. ;;=fields that make up the cross-reference are set or changed. When field
  1. ;;^DD(.11,1.1,21,3,0)
  1. ;;=values are changed, FileMan executes first the KILL LOGIC, then the SET
  1. ;;^DD(.11,1.1,21,4,0)
  1. ;;=LOGIC.
  1. ;;^DD(.11,1.1,21,5,0)
  1. ;;=
  1. ;;^DD(.11,1.1,21,6,0)
  1. ;;=Assume the DA array describes the record to be cross-referenced, and that
  1. ;;^DD(.11,1.1,21,7,0)
  1. ;;=the X(order#) array contains values after the transform for storage is
  1. ;;^DD(.11,1.1,21,8,0)
  1. ;;=applied, but before the truncation to the maximum length. The variable X
  1. ;;^DD(.11,1.1,21,9,0)
  1. ;;=also equals X(order#) of the lowest order number.
  1. ;;^DD(.11,1.1,21,10,0)
  1. ;;=
  1. ;;^DD(.11,1.1,21,11,0)
  1. ;;=When fields that make up a cross-reference are edited and the kill and set
  1. ;;^DD(.11,1.1,21,12,0)
  1. ;;=logic are executed, the X1(order#) array contains the old field values,
  1. ;;^DD(.11,1.1,21,13,0)
  1. ;;=and the X2(order#) array contains the new field values. If a record is
  1. ;;^DD(.11,1.1,21,14,0)
  1. ;;=being added, and there is an X1(order#) array element that corresponds to
  1. ;;^DD(.11,1.1,21,15,0)
  1. ;;=the .01 field, it is set to null. When a record is deleted, all X2(order#)
  1. ;;^DD(.11,1.1,21,16,0)
  1. ;;=array elements are null.
  1. ;;^DD(.11,1.1,"DT")
  1. ;;=2960116
  1. ;;^DD(.11,1.2,0)
  1. ;;=OVERFLOW SET LOGIC^.111^^1.2;0
  1. ;;^DD(.11,1.2,"DT")
  1. ;;=2960124
  1. ;;^DD(.11,1.3,0)
  1. ;;=SET CONDITION^F^^1.3;E1,245^K:$L(X)>245!($L(X)<1) X
  1. ;;^DD(.11,1.3,3)
  1. ;;=Answer must be a valid FileMan computed expression. Answer '??' for more help.
  1. ;;^DD(.11,1.3,21,0)
  1. ;;=^^5^5^2960124^
  1. ;;^DD(.11,1.3,21,1,0)
  1. ;;=Answer with a FileMan computed expression that will evaluate to Boolean
  1. ;;^DD(.11,1.3,21,2,0)
  1. ;;=true (according to the M rules for Boolean interpretation). FileMan will
  1. ;;^DD(.11,1.3,21,3,0)
  1. ;;=evaluate this expression whenever it would normally execute the
  1. ;;^DD(.11,1.3,21,4,0)
  1. ;;=cross-reference's Set Logic, and will not execute the Set Logic unless
  1. ;;^DD(.11,1.3,21,5,0)
  1. ;;=this condition evaluates to true.
  1. ;;^DD(.11,1.3,"DT")
  1. ;;=2960116
  1. ;;^DD(.11,1.4,0)
  1. ;;=SET CONDITION CODE^K^^1.4;E1,245^K:$L(X)>245 X D:$D(X) ^DIM
  1. ;;^DD(.11,1.4,3)
  1. ;;=This is Standard MUMPS code. Answer '??' for more help.
  1. ;;^DD(.11,1.4,9)
  1. ;;=@
  1. ;;^DD(.11,1.4,21,0)
  1. ;;=^^15^15^2990430^
  1. ;;^DD(.11,1.4,21,1,0)
  1. ;;=This is MUMPS code that sets the variable X. The SET LOGIC is executed
  1. ;;^DD(.11,1.4,21,2,0)
  1. ;;=only if the SET CONDTION, if present, sets X to Boolean true (according to
  1. ;;^DD(.11,1.4,21,3,0)
  1. ;;=M rules for Boolean interpretation).
  1. ;;^DD(.11,1.4,21,4,0)
  1. ;;=
  1. ;;^DD(.11,1.4,21,5,0)
  1. ;;=Assume the DA array describes the record to be cross-referenced, and that
  1. ;;^DD(.11,1.4,21,6,0)
  1. ;;=the X(order#) array contains values after the transform for storage is
  1. ;;^DD(.11,1.4,21,7,0)
  1. ;;=applied, but before the truncation to the maximum length. The variable X
  1. ;;^DD(.11,1.4,21,8,0)
  1. ;;=also equals X(order#) of the lowest order number.
  1. ;;^DD(.11,1.4,21,9,0)
  1. ;;=
  1. ;;^DD(.11,1.4,21,10,0)
  1. ;;=When fields that make up a cross-reference are edited and the kill and set
  1. ;;^DD(.11,1.4,21,11,0)
  1. ;;=conditions are executed, the X1(order#) array contains the old field
  1. ;;^DD(.11,1.4,21,12,0)
  1. ;;=values, and the X2(order#) array contains the new field values. If a
  1. ;;^DD(.11,1.4,21,13,0)
  1. ;;=record is being added, and there is an X1(order#) array element that
  1. ;;^DD(.11,1.4,21,14,0)
  1. ;;=corresponds to the .01 field, it is set to null. When a record is deleted,
  1. ;;^DD(.11,1.4,21,15,0)
  1. ;;=all X2(order#) array elements are null.
  1. ;;^DD(.11,1.4,"DT")
  1. ;;=2970117
  1. ;;^DD(.11,2.1,0)
  1. ;;=KILL LOGIC^RK^^2;E1,245^K:$L(X)>245 X D:$D(X) ^DIM
  1. ;;^DD(.11,2.1,3)
  1. ;;=Answer must be Standard M code. Answer '??' for more help.