PRSARPT2 ; HISC/FPT-Un-Transmitted Employees Report ;8/14/95 12:03
;;4.0;PAID;;Sep 21, 1995
;
; IEN = employee's internal entry number (file 450)
; NAME = employee's name
; PAGE = page number of report
; PP = pay period
; PPIEN = pay period internal entry number (file 458)
; STATUS = 8b record status
; TL = time and leave unit
; YN = variable to stop terminal scrolling
;
K DIC S DIC="^PRST(458,",DIC(0)="AEMQZ" S PPIEN=$P($G(^PRST(458,0)),U,3) I PPIEN<1 D KILL Q
S DIC("B")=$P(^PRST(458,PPIEN,0),U,1) D ^DIC K DIC I +Y<1 D KILL Q
S PPIEN=+Y
R0 R !!,"Select T&L Unit (or ALL): ",X:DTIME G:'$T!("^"[X) KILL S X=$TR(X,"al","AL") I X="ALL" S TLE=""
E K DIC S DIC="^PRST(455.5,",DIC(0)="EMQ" D ^DIC G KILL:$D(DTOUT),R0:Y<1 S TLE=$P(Y,"^",2)
K %ZIS S %ZIS="MQ" W ! D ^%ZIS I POP D KILL Q
I $D(IO("Q")) S ZTDESC="8B Un-Transmitted Employees List",ZTRTN="PRINT^PRSARPT2",ZTSAVE("PPIEN")="",ZTSAVE("TLE")="" D ^%ZTLOAD D KILL,HOME^%ZIS Q
U IO D PRINT D ^%ZISC
KILL K %,%ZIS,DIR,DIROUT,DIRUT,DTOUT,DUOUT,IEN,NAME,PAGE,POP,PP,PPIEN,STATUS,TL,TLE,X,Y,YN,ZTDESC,ZTREQ,ZTRTN,ZTSAVE,ZTSTOP
Q
PRINT ; print report
I $D(ZTQUEUED) S ZTREQ="@"
S PAGE=0,PP=$P(^PRST(458,PPIEN,0),U),YN=""
D HEADER I TLE'="" S ATL="ATL"_TLE,TL=TLE G P1
S ATL="ATL00" F S ATL=$O(^PRSPC(ATL)) Q:ATL'?1"ATL".E!(YN="^") S TL=$E(ATL,4,6) D P1
Q
P1 S NAME="" F S NAME=$O(^PRSPC(ATL,NAME)) Q:NAME=""!(YN="^") S IEN=0 F S IEN=$O(^PRSPC(ATL,NAME,IEN)) Q:IEN<1!(YN="^") D
.S STATUS=$P($G(^PRST(458,PPIEN,"E",IEN,0)),"^",2)
.Q:"X"[STATUS
.I $Y>(IOSL-4) D:IOST?1."C".E SCROLL D:$D(ZTQUEUED) STOPCHK Q:YN["^" D HEADER
.W !,$P($G(^PRSPC(IEN,0)),"^",1),?35,TL,?46,$S(STATUS="T":"Timekeeper",STATUS="P":"Payroll",1:"")
Q
W:$Y>0 @IOF
S PAGE=PAGE+1 D NOW^%DTC S Y=% X ^DD("DD")
W !!,"Un-Transmitted Employees for ",PP,?46,Y,?70,"Page ",PAGE
W !,"NAME",?35,"T&L",?46,"STATUS"
W !,$$REPEAT^XLFSTR("-",79)
Q
SCROLL ; screen hold
K DIR,DIROUT,DIRUT,DTOUT,DUOUT
W ! S DIR(0)="E" D ^DIR
S:$D(DIRUT)!(Y=0) YN="^"
Q
STOPCHK ; check for user request to stop a background print job
I $$S^%ZTLOAD S ZTSTOP=1,YN="^" K ZTREQ W !?10,"*** Output stopped at user's request ***"
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HPRSARPT2 2274 printed Dec 13, 2024@02:24:14 Page 2
PRSARPT2 ; HISC/FPT-Un-Transmitted Employees Report ;8/14/95 12:03
+1 ;;4.0;PAID;;Sep 21, 1995
+2 ;
+3 ; IEN = employee's internal entry number (file 450)
+4 ; NAME = employee's name
+5 ; PAGE = page number of report
+6 ; PP = pay period
+7 ; PPIEN = pay period internal entry number (file 458)
+8 ; STATUS = 8b record status
+9 ; TL = time and leave unit
+10 ; YN = variable to stop terminal scrolling
+11 ;
+12 KILL DIC
SET DIC="^PRST(458,"
SET DIC(0)="AEMQZ"
SET PPIEN=$PIECE($GET(^PRST(458,0)),U,3)
IF PPIEN<1
DO KILL
QUIT
+13 SET DIC("B")=$PIECE(^PRST(458,PPIEN,0),U,1)
DO ^DIC
KILL DIC
IF +Y<1
DO KILL
QUIT
+14 SET PPIEN=+Y
R0 READ !!,"Select T&L Unit (or ALL): ",X:DTIME
if '$TEST!("^"[X)
GOTO KILL
SET X=$TRANSLATE(X,"al","AL")
IF X="ALL"
SET TLE=""
+1 IF '$TEST
KILL DIC
SET DIC="^PRST(455.5,"
SET DIC(0)="EMQ"
DO ^DIC
if $DATA(DTOUT)
GOTO KILL
if Y<1
GOTO R0
SET TLE=$PIECE(Y,"^",2)
+2 KILL %ZIS
SET %ZIS="MQ"
WRITE !
DO ^%ZIS
IF POP
DO KILL
QUIT
+3 IF $DATA(IO("Q"))
SET ZTDESC="8B Un-Transmitted Employees List"
SET ZTRTN="PRINT^PRSARPT2"
SET ZTSAVE("PPIEN")=""
SET ZTSAVE("TLE")=""
DO ^%ZTLOAD
DO KILL
DO HOME^%ZIS
QUIT
+4 USE IO
DO PRINT
DO ^%ZISC
KILL KILL %,%ZIS,DIR,DIROUT,DIRUT,DTOUT,DUOUT,IEN,NAME,PAGE,POP,PP,PPIEN,STATUS,TL,TLE,X,Y,YN,ZTDESC,ZTREQ,ZTRTN,ZTSAVE,ZTSTOP
+1 QUIT
PRINT ; print report
+1 IF $DATA(ZTQUEUED)
SET ZTREQ="@"
+2 SET PAGE=0
SET PP=$PIECE(^PRST(458,PPIEN,0),U)
SET YN=""
+3 DO HEADER
IF TLE'=""
SET ATL="ATL"_TLE
SET TL=TLE
GOTO P1
+4 SET ATL="ATL00"
FOR
SET ATL=$ORDER(^PRSPC(ATL))
if ATL'?1"ATL".E!(YN="^")
QUIT
SET TL=$EXTRACT(ATL,4,6)
DO P1
+5 QUIT
P1 SET NAME=""
FOR
SET NAME=$ORDER(^PRSPC(ATL,NAME))
if NAME=""!(YN="^")
QUIT
SET IEN=0
FOR
SET IEN=$ORDER(^PRSPC(ATL,NAME,IEN))
if IEN<1!(YN="^")
QUIT
Begin DoDot:1
+1 SET STATUS=$PIECE($GET(^PRST(458,PPIEN,"E",IEN,0)),"^",2)
+2 if "X"[STATUS
QUIT
+3 IF $Y>(IOSL-4)
if IOST?1."C".E
DO SCROLL
if $DATA(ZTQUEUED)
DO STOPCHK
if YN["^"
QUIT
DO HEADER
+4 WRITE !,$PIECE($GET(^PRSPC(IEN,0)),"^",1),?35,TL,?46,$SELECT(STATUS="T":"Timekeeper",STATUS="P":"Payroll",1:"")
End DoDot:1
+5 QUIT
+1 if $Y>0
WRITE @IOF
+2 SET PAGE=PAGE+1
DO NOW^%DTC
SET Y=%
XECUTE ^DD("DD")
+3 WRITE !!,"Un-Transmitted Employees for ",PP,?46,Y,?70,"Page ",PAGE
+4 WRITE !,"NAME",?35,"T&L",?46,"STATUS"
+5 WRITE !,$$REPEAT^XLFSTR("-",79)
+6 QUIT
SCROLL ; screen hold
+1 KILL DIR,DIROUT,DIRUT,DTOUT,DUOUT
+2 WRITE !
SET DIR(0)="E"
DO ^DIR
+3 if $DATA(DIRUT)!(Y=0)
SET YN="^"
+4 QUIT
STOPCHK ; check for user request to stop a background print job
+1 IF $$S^%ZTLOAD
SET ZTSTOP=1
SET YN="^"
KILL ZTREQ
WRITE !?10,"*** Output stopped at user's request ***"
+2 QUIT