source: IHS-VA_UTILITIES-XB/trunk/ZIBNSSV.m@ 1119

Last change on this file since 1119 was 642, checked in by Sam Habiel, 15 years ago

Modified directory structure; moved routines.

File size: 2.2 KB
RevLine 
[641]1ZIBNSSV ; IHS/ADC/GTH - NONSTANDARD SPECIAL VARIABLES ; [ 10/29/2002 7:42 AM ]
2 ;;4.0;XB;;Jul 20, 2009;Build 2
3 ; XB*3*8 - IHS/ASDST/GTH - Correct parsing for MSM Windows.
4 ; XB*3*9 IHS/SET/GTH XB*3*9 10/29/2002 Cache' mods.
5 ;
6 ; Return Non-Standard ($Z) Special Variables.
7 ;
8 ; E.g.:
9 ; W $$Z^ZIBNSSV("ERROR")
10 ; will write the contents of the error message most recently
11 ; produced by the OS.
12 ;
13 ; These are the variables supported:
14 ;
15 ; ERROR : Text of error message most recently produced.
16 ; LEVEL : Number of the current nesting level.
17 ; NAME : Name of routine currently loaded in memory.
18 ; ORDER : Data value of the next global node that follows
19 ; the current global reference.
20 ; TRAP : Line label and routine name of the program that
21 ; is to receive control when an error occurs.
22 ; VERSION : Name and release of M implementation.
23 ;
24Z(NSSV) ;PEP - Return Non-Standard ($Z) Special Variables.
25 I '$L($G(NSSV)) Q "NONSTANDARD SPECIAL VAR NOT SPECIFIED."
26 I '$F("ERROR^LEVEL^NAME^ORDER^TRAP^VERSION",NSSV) Q "NONSTANDARD SPECIAL VAR '"_NSSV_"' NOT SUPPORTED."
27 NEW O
28 ; S O=$P($G(^%ZOSF("OS")),"-",1) ; XB*3*8 - IHS/ASDST/GTH
29 ;S O=$S($P($G(^%ZOSF("OS")),"^",1)["MSM":"MSM",1:"") ; XB*3*8 - IHS/ASDST/GTH;IHS/SET/GTH XB*3*9 10/29/2002
30 S O=$S($P($G(^%ZOSF("OS")),"^",1)["MSM":"MSM",^%ZOSF("OS")["OpenM":"CACHE",1:"") ; XB*3*8 - IHS/ASDST/GTH ;IHS/SET/GTH XB*3*9 10/29/2002
31 ;I '$L($T(@(O))) Q "OPERATING SYSTEM '"_O_"' NOT SUPPORTED." ;IHS/SET/GTH XB*3*9 10/29/2002
32 I '$L(O) Q "OPERATING SYSTEM '"_^%ZOSF("OS")_"' NOT SUPPORTED." ;IHS/SET/GTH XB*3*9 10/29/2002
33 G @(O)
34 ;
35MSM ; Micronetics specific Non-Standard Special Variables.
36 NEW MSMSV
37 S MSMSV="MSMZ"_$E(NSSV)
38 I '$L($T(@MSMSV)) Q "Micronetics VALUE FOR '"_NSSV_"' NOT SUPPORTED."
39 G @(MSMSV)
40 ;
41MSMZE Q $ZE
42MSMZL Q $ZL
43MSMZN Q $ZN
44MSMZO Q $ZO
45MSMZR() ;PEP - MSM's last global reference.
46 ; Going thru the "Z" entry point will re-set the global reference!
47 Q $ZR
48MSMZT Q $ZT
49MSMZV Q $ZV
50 ;
51 ;Begin New Code;IHS/SET/GTH XB*3*9 10/29/2002
52CACHE ;
53 NEW %
54 S %="CACHEZ"_$E(NSSV)
55 I '$L($T(@%)) Q "Cache' VALUE FOR '"_NSSV_"' NOT SUPPORTED."
56 G @(%)
57 ;
58CACHEZE Q $ZE
59CACHEZN Q $ZN
60CACHEZO Q $ZO
61CACHEZT Q $ZT
62CACHEZV Q $ZV
63 ;End New Code;IHS/SET/GTH XB*3*9 10/29/2002
Note: See TracBrowser for help on using the repository browser.