Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: BLRINRPT

BLRINRPT.m

Go to the documentation of this file.
BLRINRPT ; IHS/MSC/MKK - IHS Lab Patch Reports ; 17-Oct-2014 09:22 ; MKK
 ;;5.2;IHS LABORATORY;**1034**;NOV 01, 1997;Build 88
 ;
EEP ; EP - Ersatz EP
 D EEP^BLRGMENU
 Q
 ;
EP ; EP 
PEP ; EP
 NEW (DILOCKTM,DISYS,DT,DTIME,DUZ,IO,IOBS,IOF,IOM,ION,IOS,IOSL,IOST,IOT,IOXY,U,XPARSYS,XQXFLG)
 ;
 D SETBLRVS
 ;
 D ADDTMENU^BLRGMENU("BACKUP^BLRINRPT","Backup Confirmed By")
 D ADDTMENU^BLRGMENU("INSTALL^BLRINRPT","Installed By")
 ;
 ; Main Menu driver
 D MENUDRVR^BLRGMENU("RPMS Lab","Patch Install Reports")
 Q
 ;
BACKUP ; EP - Report on BACKUP CONFIRMED
 NEW (DILOCKTM,DISYS,DT,DTIME,DUZ,IO,IOBS,IOF,IOM,ION,IOS,IOSL,IOST,IOT,IOXY,U,XPARSYS,XQXFLG)
 ;
 D REPORT("BACKUP CONFIRMED BY","BACKUP")
 ;
 Q
 ;
INSTALL ; EP - Report on INSTALLED BY
 NEW (DILOCKTM,DISYS,DT,DTIME,DUZ,IO,IOBS,IOF,IOM,ION,IOS,IOSL,IOST,IOT,IOXY,U,XPARSYS,XQXFLG)
 ;
 D REPORT("INSTALLED BY","INSTALL")
 ;
 Q
 ;
 ;
 ; ============================= UTILITIES =============================
 ;
SETBLRVS(TWO) ; EP - Set BLRVERN variable(s).  See BLRGMENU routine.
 S BLRVERN=$TR($P($T(+1),";")," ")
 S:$D(TWO) BLRVERN2=TWO
 Q
 ;
REPORT(SUBSTR,TWO) ; EP - Produce the report
 Q:$$INITVARS(SUBSTR_" Report",TWO)="Q"
 ;
 F  S PATCH=$O(^BLRINSTL("LAB PATCH",PATCH))  Q:PATCH<1!(QFLG="Q")  D
 . S (FOUNDIT,NUM)=0
 . F  S NUM=$O(^BLRINSTL("LAB PATCH",PATCH,SUBSTR,NUM))  Q:NUM<1!(QFLG="Q")  D PRNTLINE(PATCH,SUBSTR,NUM)
 . I FOUNDIT D LINER  S PATCHCNT=PATCHCNT+1
 ;
 D ^%ZISC
 Q:QFLG="Q"
 ;
 W !!,?9,PATCHCNT," Patches analyzed.",!
 D PRESSKEY^BLRGMENU(9)
 Q
 ;
INITVARS(SECONDH,SECONDV) ; EP - Initialization
 D SETBLRVS($G(SECONDV))
 ;
 S HEADER(1)="RPMS Lab Patch"
 S HEADER(2)=SECONDH
 ;
 D HEADERDT^BLRGMENU
 D HEADONE^BLRGMENU(.HDRONE)
 ;
 D ^%ZIS
 U IO
 ;
 S HEADER(3)=" "
 ;
 S $E(HEADER(4),20)=$TR($$CJ^XLFSTR("@User@",43)," @","= ")
 S $E(HEADER(5),5)="Patch"
 S $E(HEADER(5),16)="#"
 S $E(HEADER(5),20)="DUZ"
 S $E(HEADER(5),30)="Name"
 S $E(HEADER(5),65)="Date/Time"
 ;
 S MAXLINES=IOSL-4,LINES=MAXLINES+10
 S QFLG="NO"
 S (CNT,PATCH,PATCHCNT,PG)=0
 Q "OK"
 ;
PRNTLINE(PATCH,SUBSTR,NUM) ; EP - Line of Data
 Q:$$PRNTLNBO(PATCH,SUBSTR,NUM)="Q"
 ;
 S FOUNDIT=FOUNDIT+1
 I LINES>MAXLINES D HEADERPG^BLRGMENU(.PG,.QFLG,HDRONE)  Q:QFLG="Q"
 ;
 W ?4,PATCH
 W ?14,$J(NUM,2)
 W ?19,USERDUZ
 W ?29,USERNAME
 W ?64,DATETIME
 D LINERCNT
 Q
 ;
PRNTLNBO(PATCH,SUBSTR,NUM) ; EP - Breakout variables
 S STR=$G(^BLRINSTL("LAB PATCH",PATCH,SUBSTR,NUM))
 S:STR'["^" USERNAME=STR,USERDUZ=""
 S:STR["^" USERDUZ=$P(STR,"^"),USERNAME=$P(STR,"^",2)
 Q:USERDUZ=""&(USERNAME="") "Q"
 ;
 S DATETIME=$P($G(^BLRINSTL("LAB PATCH",PATCH,SUBSTR,NUM,"DATE/TIME")),":",1,2)
 Q "OK"
 ;
LINER ; EP
 W !
 S LINES=LINES+1
 Q
 ;
LINERCNT ; EP
 W !
 S LINES=LINES+1
 S CNT=1+$G(CNT)
 Q