source: IHS-VA_UTILITIES-XB/XBGLDFN.m@ 641

Last change on this file since 641 was 641, checked in by Sam Habiel, 14 years ago

Initial commit of XB, move away from sf.net.
Includes kids file and documentation.

File size: 731 bytes
Line 
1XBGLDFN ; IHS/ADC/GTH - GET LAST DFN ; [ 02/07/97 3:02 PM ]
2 ;;4.0;XB;;Jul 20, 2009;Build 2
3 ;
4START ;
5 NEW GBL,LDFN,NDFN,STRT,TGBL
6LOOP ;
7 R !,"Enter global reference like '^DPT(""B"",' ",GBL:$G(DTIME,999)
8 Q:GBL=""
9 I $E(GBL)="?"!(GBL'?1"^"1U.U.E) W !,"Enter global reference (e.g. ""^AUPNPAT("")." G LOOP
10 S TGBL=$S($E(GBL,$L(GBL))="(":$P(GBL,"(",1),$E(GBL,$L(GBL))=",":$E(GBL,1,$L(GBL)-1)_")",$E(GBL,$L(GBL))'=")":GBL_")",1:GBL)
11 I '$D(@(TGBL)) W !!,"Global ",GBL," does not exist!" G XBGLDFN
12 R !,"Start after DFN: 0// ",STRT:$G(DTIME,999)
13 S:STRT="" STRT=0
14 S LDFN="Started after high DFN"
15 S NDFN=$D(@(GBL_STRT_")")),NDFN=STRT F L=0:0 S NDFN=$O(^(NDFN)) Q:NDFN=""!(NDFN'?1N.N) S LDFN=NDFN
16 W !!,"Last DFN is ",LDFN
17 Q
18 ;
Note: See TracBrowser for help on using the repository browser.