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

PRCSREC1.m

Go to the documentation of this file.
  1. PRCSREC1 ;WISC/KMB-SEND FMS 820 REPORT ;12/28/99 13:31
  1. V ;;5.1;IFCAP;**199**;Oct 20, 2000;Build 3
  1. ;Per VA Directive 6402, this routine should not be modified.
  1. ;
  1. ;PRC*5.1*199 Modify date call for header due to new % kill in ^DICRW call
  1. N LINE2,XMTEXT,XMDUZ,XMSUB,WHAT,YY,DELIM,TEMP,XMY
  1. S DELIM="TRANS #: ,TRANSACTION DATE: ,AMOUNT: ,COST CENTER: ,FY: ,QUARTER: ,"
  1. F YY=1:1:6 S WHAT(YY)=$P(DELIM,",",YY)
  1. ;
  1. S XMSUB="FMS TRANSACTION NOTIFICATION",XMDUZ=.5
  1. S LINE2=1 F YY=18,22,20,11,4,5 S SENDIT(LINE2+3)=WHAT(LINE2)_$P($G(^PRCF(423.6,RDA,1,LINE,0)),"^",YY),LINE2=LINE2+1
  1. S TEMP=$P(SENDIT(5),": "),X=$P(SENDIT(5),": ",2),X=$E(X,3,4)_"/"_$E(X,5,6)_"/"_$E(X,1,2) K %DT D ^%DT,DD^%DT S SENDIT(5)=TEMP_": "_Y
  1. S Y=RDATE D DD^%DT
  1. S SENDIT(1)="DATE: "_Y,SENDIT(2)=" STATION: "_STATION_" CP: "_FCP
  1. S (SENDIT(3),SENDIT(9))="" S:$D(INFORM) SENDIT(10)=INFORM
  1. I $D(ERROR) D REGRET Q
  1. ;
  1. S USER=0 F S USER=$O(^PRC(420,STATION,1,+FCP,1,USER)) Q:USER="" I $P($G(^(USER,2)),"^")="Y" S XMY(USER)=""
  1. I $D(XMY) S XMTEXT="SENDIT(",XMDUZ=.5 D ^XMD
  1. K SENDIT QUIT
  1. REGRET ;send error message and data to app coord
  1. S SENDIT(10)=ERROR,XMDUN="820 RECONCILIATION",XMTEXT="SENDIT("
  1. S USER=$P($G(^PRC(411,+STATION,9)),"^") Q:USER=""
  1. S XMY(USER)="" D ^XMD K SENDIT Q
  1. EXCEPT ;
  1. ;this code generates a report of FMS trans. for CPs not
  1. ;activated by the site
  1. N EXCEPT,DIC,L,LEN,FLDS,BY
  1. S EXCEPT="" D WRITE S DIC="^PRCS(417.1,",BY="30;""FISCAL YEAR"",4,21",FLDS="[PRCSEXCE]",L=0
  1. S DHD="W ?0 D WRITE2^PRCSREC1"
  1. D EN1^DIP W !,"End of report" Q
  1. FMSRPT ;
  1. ; this code generates a report of all FMS trans. for a CP
  1. D WRITE
  1. D EN1^PRCSUT Q:'$D(PRC("SITE")) Q:Y<0
  1. N P,PRCSZ,Z1 S P=0,(PRCSZ,Z(0))=Z
  1. K IO("Q") S %ZIS("B")="HOME",%ZIS="MQ" D ^%ZIS Q:POP
  1. I $D(IO("Q")) S ZTDESC="FMS TRANSACTIONS REPORT",ZTRTN="BEGIN^PRCSFMS",ZTSAVE("Z*")="",ZTSAVE("P")="",ZTSAVE("PRCSZ")="",ZTSAVE("PRC*")="" D ^%ZTLOAD D ^%ZISC W !,"End of report." Q
  1. U IO D BEGIN^PRCSFMS D ^%ZISC W !,"End of report" Q
  1. WRITE ;
  1. W !,"This report will generate a listing of FMS transactions",!
  1. I $D(EXCEPT) W "which are for control points not activated by your site.",!
  1. W !,"You may create the report for all entries,",!,"or for selected year and/or quarter.",!
  1. W !,"Enter fiscal year in the format '99'.",!
  1. Q
  1. WRITE2 ;
  1. D NOW^PRCFQ W !,"FMS EXCEPTIONS REPORT",?45,%X,! ;PRC*5.1*199
  1. W !,?3,"REFERENCE",?40,"TRANS DATE",?55,"AMOUNT",!,"STATION",?9,"BFY",?15,"AO",?21,"FUND",?33,"FCP/PROJECT",?47,"PROGRAM",?58,"B. OBJ. CLASS",?74,"JOB"
  1. S LEN="",$P(LEN,"-",IOM)="-" W !,LEN S LEN="" Q
  1. CLEAR ;clear 417.1 entries which are earlier than a selected date
  1. N REC,REC1,SDATE
  1. W !!,"This option will purge all FMS Exceptions File Entries earlier",!,"than the date which you select.",!!
  1. S DIR("A")="Enter date from which entries should be deleted",DIR("?")="To remove records earlier than a certain date, enter that date"
  1. S DIR(0)="D^^" D ^DIR Q:+Y<1 S SDATE=+Y W " ",Y(0)
  1. W !!,"Beginning File 417.1 cleanup.."
  1. S REC="" F S REC=$O(^PRCS(417.1,"B",REC)) Q:REC="" D
  1. .S REC1=$O(^PRCS(417.1,"B",REC,0)) Q:REC1=""
  1. .I +$P($G(^PRCS(417.1,REC1,0)),"^",22)<SDATE S DIK="^PRCS(417.1,",DA=REC1 D ^DIK K DA,DIK
  1. W !!,"End of processing"
  1. K %X ;PRC*5.1*199
  1. Q