source: WorldVistAEHR/trunk/r/VA_FILEMAN-ARJT-DI-DD-DM-DT-%DT-%RCR/DMSQT1.m@ 724

Last change on this file since 724 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 1.3 KB
Line 
1DMSQT1 ;SFISC/EZ-STATUS CHECK ;11/13/97 12:08
2 ;;22.0;VA FileMan;;Mar 30, 1999
3 ;Per VHA Directive 10-93-142, this routine should not be modified.
4 Q
5WAIT() ; extrinsic function, checks if SQLI is running (you must wait)
6 ; returns 1 if nodes in ^DMSQ are changing, null otherwise
7 D DT^DICRW N J,FLG,DM S FLG=""
8 D SET H 2 D CHK
9 I FLG Q 1
10 E Q ""
11SET ; set the DM array with current record counts
12 S J=""
13 F S J=$O(^DMSQ(J)) Q:J="" S DM(J)=$P(^(J,0),U,3)
14 Q
15CHK ; check whether the counts have changed
16 S J=""
17 F S J=$O(^DMSQ(J)) Q:J="" S:DM(J)'=$P(^(J,0),U,3) FLG=1
18 Q
19IDX(TI) ; extrinsic function, checks for indexes on table TI
20 ; returns 1 if there are more indexes to process
21 ; see INDEX^DMSQF2 for similar index checking code
22 N F,FI,IN,I,IF,IX,CI,FLG D DT^DICRW S FLG=""
23 S F=$P(^DMSQ("T",TI,0),U,7)
24 S FI=0 F S FI=$O(^DD(F,FI)) Q:'FI D
25 . S IN=0 F S IN=$O(^DD(F,FI,1,IN)) Q:'IN D
26 .. S I=$G(^DD(F,FI,1,IN,0))
27 .. I $P(I,U,3)]"" Q ; not a regular index
28 .. I I="" Q ; no data at DD location
29 .. S IF=+I,IX=$P(I,U,2) I IX=""!'IF Q ; no file # or index name
30 .. I $G(^DD(F,FI,1,IN,1))'[",DA)" Q ; last subscript isn't DA
31 .. S CI=$O(^DMSQ("C","D",F,FI,"")) Q:'CI ; missing column
32 .. S FLG=2 ; this index is a candidate for projection
33 I FLG=2 Q 1
34 E Q ""
Note: See TracBrowser for help on using the repository browser.