DIENVWRN ;IRMFO-SF/FM STAFF-ENVIRONMENT CHECK ROUTINE ;10:10 AM  28 Apr 2006
 ;;22.2;VA FileMan;;Jan 05, 2016;Build 42
 ;;Per VA Directive 6402, this routine should not be modified.
 ;;Submitted to OSEHRA 5 January 2015 by the VISTA Expertise Network.
 ;;Based on Medsphere Systems Corporation's MSC FileMan 1051.
 ;;Licensed under the terms of the Apache License, Version 2.0.
 ;Per VHA Directive 10-93-142, this routine should not be modified.
 ;
 ; Check XPDENV 0 = Loading; 1 = Installing
 I 'XPDENV D  Q  ; Loading Distribution - No Check
 . ; Make sure exported routines are registered in ROUTINE(#9.8) file
 . ; Edit FOR loop
 . N ROU,ZDATE,%,%H,%I,X
 . D NOW^%DTC
 . S ZDATE=%
 . F ROU="DDS10","DIA2","DICA3","DICN0","DIEF1","DIEFW","DIET","DILF" D
 .. N IEN S IEN=$O(^DIC(9.8,"B",ROU,0))
 .. I 'IEN D
 ... N FDA,DIERR,ZERR,IEN
 ... S IEN="+1,"
 ... S FDA(9.8,IEN,.01)=ROU
 ... S FDA(9.8,IEN,1)="R"
 ... S FDA(9.8,IEN,7.4)=ZDATE
 ... D UPDATE^DIE("","FDA","IEN")
 ... Q
 .. Q
 . D CLEAN^DILF
 . Q
 ;
INSCHK ; Do Checks During Install Only
 W $C(7)
 D MES^XPDUTL("** Although Queuing is allowed - it is HIGHLY recommended that ALL Users and")
 D MES^XPDUTL("VISTA Background jobs be STOPPED before installation of this patch.  Failure")
 D MES^XPDUTL("to do so may result in 'source routine edited' error(s). Edits will be")
 D MES^XPDUTL("lost and record(s) may be left in an inconsistent state, for example,")
 D MES^XPDUTL("not all Cross-Referencing completed; which in turn may cause FUTURE")
 D MES^XPDUTL("VistA/FileMan Hard Errors or corrupted Data. **")
 ;
TMCHK ; Check to see if TaskMan is still running
 S X=$$TM^%ZTLOAD
 I X,'$D(^%ZTSCH("WAIT")) D
 . W $C(7)
 . D BMES^XPDUTL("* Warning TaskMan Has NOT Been Stopped or Placed in a WAIT State!")
 ;
LINH ; Check to see if Logons are Inhibited
 D GETENV^%ZOSV  ; $P(Y,"^",2) = Installing Volume
 S X=+$G(^%ZIS(14.5,"LOGON",$P(Y,"^",2)))
 I 'X D
 . W $C(7)
 . D BMES^XPDUTL("* Warning Logons are NOT Inhibited!")
 Q
 
--- Routine Detail   --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HDIENVWRN   2033     printed  Sep 23, 2025@20:23:21                                                                                                                                                                                                    Page 2
DIENVWRN  ;IRMFO-SF/FM STAFF-ENVIRONMENT CHECK ROUTINE ;10:10 AM  28 Apr 2006
 +1       ;;22.2;VA FileMan;;Jan 05, 2016;Build 42
 +2       ;;Per VA Directive 6402, this routine should not be modified.
 +3       ;;Submitted to OSEHRA 5 January 2015 by the VISTA Expertise Network.
 +4       ;;Based on Medsphere Systems Corporation's MSC FileMan 1051.
 +5       ;;Licensed under the terms of the Apache License, Version 2.0.
 +6       ;Per VHA Directive 10-93-142, this routine should not be modified.
 +7       ;
 +8       ; Check XPDENV 0 = Loading; 1 = Installing
 +9       ; Loading Distribution - No Check
           IF 'XPDENV
               Begin DoDot:1
 +10      ; Make sure exported routines are registered in ROUTINE(#9.8) file
 +11      ; Edit FOR loop
 +12               NEW ROU,ZDATE,%,%H,%I,X
 +13               DO NOW^%DTC
 +14               SET ZDATE=%
 +15               FOR ROU="DDS10","DIA2","DICA3","DICN0","DIEF1","DIEFW","DIET","DILF"
                       Begin DoDot:2
 +16                       NEW IEN
                           SET IEN=$ORDER(^DIC(9.8,"B",ROU,0))
 +17                       IF 'IEN
                               Begin DoDot:3
 +18                               NEW FDA,DIERR,ZERR,IEN
 +19                               SET IEN="+1,"
 +20                               SET FDA(9.8,IEN,.01)=ROU
 +21                               SET FDA(9.8,IEN,1)="R"
 +22                               SET FDA(9.8,IEN,7.4)=ZDATE
 +23                               DO UPDATE^DIE("","FDA","IEN")
 +24                               QUIT 
                               End DoDot:3
 +25                       QUIT 
                       End DoDot:2
 +26               DO CLEAN^DILF
 +27               QUIT 
               End DoDot:1
               QUIT 
 +28      ;
INSCHK    ; Do Checks During Install Only
 +1        WRITE $CHAR(7)
 +2        DO MES^XPDUTL("** Although Queuing is allowed - it is HIGHLY recommended that ALL Users and")
 +3        DO MES^XPDUTL("VISTA Background jobs be STOPPED before installation of this patch.  Failure")
 +4        DO MES^XPDUTL("to do so may result in 'source routine edited' error(s). Edits will be")
 +5        DO MES^XPDUTL("lost and record(s) may be left in an inconsistent state, for example,")
 +6        DO MES^XPDUTL("not all Cross-Referencing completed; which in turn may cause FUTURE")
 +7        DO MES^XPDUTL("VistA/FileMan Hard Errors or corrupted Data. **")
 +8       ;
TMCHK     ; Check to see if TaskMan is still running
 +1        SET X=$$TM^%ZTLOAD
 +2        IF X
               IF '$DATA(^%ZTSCH("WAIT"))
                   Begin DoDot:1
 +3                    WRITE $CHAR(7)
 +4                    DO BMES^XPDUTL("* Warning TaskMan Has NOT Been Stopped or Placed in a WAIT State!")
                   End DoDot:1
 +5       ;
LINH      ; Check to see if Logons are Inhibited
 +1       ; $P(Y,"^",2) = Installing Volume
           DO GETENV^%ZOSV
 +2        SET X=+$GET(^%ZIS(14.5,"LOGON",$PIECE(Y,"^",2)))
 +3        IF 'X
               Begin DoDot:1
 +4                WRITE $CHAR(7)
 +5                DO BMES^XPDUTL("* Warning Logons are NOT Inhibited!")
               End DoDot:1
 +6        QUIT