ZIBNSSV ; IHS/ADC/GTH - NONSTANDARD SPECIAL VARIABLES ; [ 10/29/2002 7:42 AM ]
;;3.0;IHS/VA UTILITIES;**8,9**;FEB 07, 1997
; XB*3*8 - IHS/ASDST/GTH - Correct parsing for MSM Windows.
; XB*3*9 IHS/SET/GTH XB*3*9 10/29/2002 Cache' mods.
;
; Return Non-Standard ($Z) Special Variables.
;
; E.g.:
; W $$Z^ZIBNSSV("ERROR")
; will write the contents of the error message most recently
; produced by the OS.
;
; These are the variables supported:
;
; ERROR : Text of error message most recently produced.
; LEVEL : Number of the current nesting level.
; NAME : Name of routine currently loaded in memory.
; ORDER : Data value of the next global node that follows
; the current global reference.
; TRAP : Line label and routine name of the program that
; is to receive control when an error occurs.
; VERSION : Name and release of M implementation.
;
Z(NSSV) ;PEP - Return Non-Standard ($Z) Special Variables.
I '$L($G(NSSV)) Q "NONSTANDARD SPECIAL VAR NOT SPECIFIED."
I '$F("ERROR^LEVEL^NAME^ORDER^TRAP^VERSION",NSSV) Q "NONSTANDARD SPECIAL VAR '"_NSSV_"' NOT SUPPORTED."
NEW O
; S O=$P($G(^%ZOSF("OS")),"-",1) ; XB*3*8 - IHS/ASDST/GTH
;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
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
;I '$L($T(@(O))) Q "OPERATING SYSTEM '"_O_"' NOT SUPPORTED." ;IHS/SET/GTH XB*3*9 10/29/2002
I '$L(O) Q "OPERATING SYSTEM '"_^%ZOSF("OS")_"' NOT SUPPORTED." ;IHS/SET/GTH XB*3*9 10/29/2002
G @(O)
;
MSM ; Micronetics specific Non-Standard Special Variables.
NEW MSMSV
S MSMSV="MSMZ"_$E(NSSV)
I '$L($T(@MSMSV)) Q "Micronetics VALUE FOR '"_NSSV_"' NOT SUPPORTED."
G @(MSMSV)
;
MSMZE Q $ZE
MSMZL Q $ZL
MSMZN Q $ZN
MSMZO Q $ZO
MSMZR() ;PEP - MSM's last global reference.
; Going thru the "Z" entry point will re-set the global reference!
Q $ZR
MSMZT Q $ZT
MSMZV Q $ZV
;
;Begin New Code;IHS/SET/GTH XB*3*9 10/29/2002
CACHE ;
NEW %
S %="CACHEZ"_$E(NSSV)
I '$L($T(@%)) Q "Cache' VALUE FOR '"_NSSV_"' NOT SUPPORTED."
G @(%)
;
CACHEZE Q $ZE
CACHEZN Q $ZN
CACHEZO Q $ZO
CACHEZT Q $ZT
CACHEZV Q $ZV
;End New Code;IHS/SET/GTH XB*3*9 10/29/2002
ZIBNSSV ; IHS/ADC/GTH - NONSTANDARD SPECIAL VARIABLES ; [ 10/29/2002 7:42 AM ]
+1 ;;3.0;IHS/VA UTILITIES;**8,9**;FEB 07, 1997
+2 ; XB*3*8 - IHS/ASDST/GTH - Correct parsing for MSM Windows.
+3 ; XB*3*9 IHS/SET/GTH XB*3*9 10/29/2002 Cache' mods.
+4 ;
+5 ; Return Non-Standard ($Z) Special Variables.
+6 ;
+7 ; E.g.:
+8 ; W $$Z^ZIBNSSV("ERROR")
+9 ; will write the contents of the error message most recently
+10 ; produced by the OS.
+11 ;
+12 ; These are the variables supported:
+13 ;
+14 ; ERROR : Text of error message most recently produced.
+15 ; LEVEL : Number of the current nesting level.
+16 ; NAME : Name of routine currently loaded in memory.
+17 ; ORDER : Data value of the next global node that follows
+18 ; the current global reference.
+19 ; TRAP : Line label and routine name of the program that
+20 ; is to receive control when an error occurs.
+21 ; VERSION : Name and release of M implementation.
+22 ;
Z(NSSV) ;PEP - Return Non-Standard ($Z) Special Variables.
+1 IF '$LENGTH($GET(NSSV))
QUIT "NONSTANDARD SPECIAL VAR NOT SPECIFIED."
+2 IF '$FIND("ERROR^LEVEL^NAME^ORDER^TRAP^VERSION",NSSV)
QUIT "NONSTANDARD SPECIAL VAR '"_NSSV_"' NOT SUPPORTED."
+3 NEW O
+4 ; S O=$P($G(^%ZOSF("OS")),"-",1) ; XB*3*8 - IHS/ASDST/GTH
+5 ;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
+6 ; XB*3*8 - IHS/ASDST/GTH ;IHS/SET/GTH XB*3*9 10/29/2002
SET O=$SELECT($PIECE($GET(^%ZOSF("OS")),"^",1)["MSM":"MSM",^%ZOSF("OS")["OpenM":"CACHE",1:"")
+7 ;I '$L($T(@(O))) Q "OPERATING SYSTEM '"_O_"' NOT SUPPORTED." ;IHS/SET/GTH XB*3*9 10/29/2002
+8 ;IHS/SET/GTH XB*3*9 10/29/2002
IF '$LENGTH(O)
QUIT "OPERATING SYSTEM '"_^%ZOSF("OS")_"' NOT SUPPORTED."
+9 GOTO @(O)
+10 ;
MSM ; Micronetics specific Non-Standard Special Variables.
+1 NEW MSMSV
+2 SET MSMSV="MSMZ"_$EXTRACT(NSSV)
+3 IF '$LENGTH($TEXT(@MSMSV))
QUIT "Micronetics VALUE FOR '"_NSSV_"' NOT SUPPORTED."
+4 GOTO @(MSMSV)
+5 ;
MSMZE QUIT $ZE
MSMZL QUIT $ZL
MSMZN QUIT $ZN
MSMZO QUIT $ZO
MSMZR() ;PEP - MSM's last global reference.
+1 ; Going thru the "Z" entry point will re-set the global reference!
+2 QUIT $ZR
MSMZT QUIT $ZT
MSMZV QUIT $ZV
+1 ;
+2 ;Begin New Code;IHS/SET/GTH XB*3*9 10/29/2002
CACHE ;
+1 NEW %
+2 SET %="CACHEZ"_$EXTRACT(NSSV)
+3 IF '$LENGTH($TEXT(@%))
QUIT "Cache' VALUE FOR '"_NSSV_"' NOT SUPPORTED."
+4 GOTO @(%)
+5 ;
CACHEZE QUIT $ZE
CACHEZN QUIT $ZN
CACHEZO QUIT $ZO
CACHEZT QUIT $ZT
CACHEZV QUIT $ZV
+1 ;End New Code;IHS/SET/GTH XB*3*9 10/29/2002