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

PRS8TL1.m

Go to the documentation of this file.
  1. PRS8TL1 ;HISC/MRL-DECOMPOSITION, SELECTIVE T&L, CONT. ;2/26/93 14:35
  1. ;;4.0;PAID;;Sep 21, 1995
  1. ;
  1. ;This routine is a continuation of PRS8TL. This portion of the
  1. ;routine actually loops through file 450 and locates the entries
  1. ;identified by the user. If the user has decided to only show
  1. ;the information currently stored it is located in file 458 and
  1. ;displayed. If decomposition has been selected and the record has
  1. ;not yet been transmitted the record will be decomposed and then
  1. ;the information (old and new) will be displayed.
  1. ;
  1. ;Called by Routines: PRS8TL
  1. ;
  1. D TOP F TLU2=0:0 S NAME=$O(^PRSPC("ATL"_TLU,NAME)),DFN=0 Q:NAME=""!(PRS8("QUIT")) D
  1. .F TLU3=0:0 S DFN=$O(^PRSPC("ATL"_TLU,NAME,DFN)) Q:'DFN!(PRS8("QUIT")) D W !
  1. ..S X=$G(IOSL) S:'X X=24 S X=X-8 I $Y>X,'PRS8("QUIT") D TOP
  1. ..Q:PRS8("QUIT")
  1. ..S X=$G(^PRST(458,+PY,"E",+DFN,0)) I X="" Q ;no record for this pp
  1. ..W !,$E($P(NAME,",",1)_","_$E($P(NAME,",",2)),1,25)
  1. ..S X1=$P($G(^PRSPC(+DFN,0)),"^",9) I X1="" S X1="XXXXXXXXX"
  1. ..W ?30,$E(X1,1,3)_"-"_$E(X1,4,5)_"-"_$E(X1,6,9)
  1. ..S X1=$P(X,"^",2)
  1. ..W ?45,$S(X1="P":"Released to Payroll",X1="X":"Transmitted to Austin",1:"T&L still updating Record")
  1. ..I X1="" W !?6,"|OLD| Record has not been released to Payroll...Cannot Decompose..." Q
  1. ..S VALUE=$G(^PRST(458,+PY,"E",+DFN,5))
  1. ..W !?6,"|OLD| ",$S(VALUE'="":VALUE,1:"No Decomposition currently on File")
  1. ..Q:SHOW
  1. ..I X1="X"!(VALUE'=""&('DECOM)) W !?6,"|NEW| " D Q
  1. ...I X1="X" W "Record already Transmitted...Cannot update Decomposition..." Q
  1. ...W "Record already decomposed <see above>...Not updated per user..."
  1. ..D UP
  1. ..S VALUE(1)=$G(^PRST(458,+PY,"E",+DFN,5))
  1. ..W !?6,"|NEW| ",$S(VALUE(1)=VALUE:" ",1:"*"),VALUE(1)
  1. Q
  1. ;
  1. UP ; --- decompose
  1. S PPI=PY
  1. N PRS8,SHOW,VALUE,PY
  1. S (SEE,SHOW)=0,SAVE=1
  1. D ONE^PRS8
  1. Q
  1. ;
  1. TOP ; --- Top of Form
  1. S PRS8("PAGE")=PRS8("PAGE")+1
  1. I PRS8("PAGE")>1 D
  1. .F I=$Y:1:(IOSL)-6 W !
  1. .D BOT
  1. I PRS8("QUIT") Q
  1. W @IOF S X="Decomposition Report for T&L '"_TLU_"'" D CTR
  1. S X="Pay Period "_PY(0) D CTR
  1. W !!,"Employee Name",?30,"SSN",?45,"Current T&A Status",!
  1. S X="",$P(X,"-",(IOM-1))="" W X Q
  1. ;
  1. BOT ; --- bottom of form
  1. I IOST["C-" D Q
  1. .R !!,"Press <RETURN> to Continue, Enter '^' to QUIT: ",X:DTIME
  1. .I X["^"!('$T) S PRS8("QUIT")=1
  1. S X="",$P(X,"=",(IOM-1))="" W !!,X
  1. W !,PRS8("WHO") S X="Page "_PRS8("PAGE") D CTR1
  1. W ?(IOM-($L(PRS8("DATE"))+2)),PRS8("DATE"),! Q
  1. ;
  1. COVER ; --- cover page
  1. D NOW^%DTC S Y=% X ^DD("DD") S PRS8("DATE")=Y
  1. S X=$P($G(^VA(200,+$G(DUZ),0)),"^",1) ;user
  1. S PRS8("WHO")=$S(X'="":X,1:"REQUESTOR UNKNOWN")
  1. S (PRS8("PAGE"),PRS8("QUIT"))=0
  1. I IOST["C-" Q
  1. F I=1:1:10 W !
  1. S X="D E C O M P O S I T I O N A C T I V I T Y R E P O R T" D CTR
  1. F I=1:1:5 W !
  1. S X="Date/Time Started",X1=PRS8("DATE") D FORM
  1. S X="User Initiating Report",X1=PRS8("WHO") D FORM
  1. W !!! S X="S E A R C H P A R A M E T E R S" D CTR
  1. W !! S X="Report is Run for Pay Period",X1=PY(0) D FORM
  1. S X="Decompose or Show Data",X1=$S(SHOW:"SHOW",1:"DECOMPOSE") D FORM
  1. I 'SHOW S X=$S(DECOM:"",1:"*")_"Decompose All Records",X1=$S(DECOM:"YES",1:"NO") D FORM
  1. S X="Process All Records",X1=$S($O(TLU(0))]"":"NO",1:"YES") D FORM
  1. I $O(TLU(0))]"" D
  1. .W ! S X="The following T&L's are processed in this Report:",X1="" D CTR
  1. .S X="",CT=0,J="" F I=0:0 S J=$O(TLU(J)) Q:J="" D
  1. ..S CT=CT+1 I (CT*10)>(IOM-10) S CT=1 D CTR S X=""
  1. ..S X=X_J_" "
  1. .D CTR:X'=""
  1. W !! S X="",$P(X,80)="" D CTR
  1. S X="NOTE: Records which have not been released to Payroll are never Decomposed." D CTR
  1. S X="Additionally, records which have been Transmitted to Austin are not Decomposed." D CTR
  1. Q:DECOM!SHOW
  1. W ! S X="* You have chosen the feature which will not initiate a decomposition run for" D CTR
  1. S X="any record already having been previously decomposed. " D CTR
  1. Q
  1. ;
  1. FORM ; --- format X and X1 then fall into CTR (Center)
  1. S X=$E(X_"...............................",1,50)_" "
  1. S X1=$E(X1,1,20),X1=$J(X1,10),X=X_X1
  1. ;
  1. CTR ; --- center
  1. W !
  1. ;
  1. CTR1 ; --- center but don't write line feed
  1. W ?(IOM-$L(X)\2),X
  1. K X,X1 Q