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

ACRFEXP5.m

Go to the documentation of this file.
ACRFEXP5 ;IHS/OIRM/DSD/AEF - EXPORT TO ECS FILE [ 01/27/2005  1:36 PM ]
 ;;2.1;ADMIN RESOURCE MGT SYSTEM;**2,15**;NOV 05, 2001
 ;
 ;ACR*2.1*2.01;NEW ROUTINE
 ;
 ;The formats for the ECS payment records herein are described in
 ;US Treasury document 'Electronic Certification System, Formats
 ;And Notes For Mainframe Alternate Data Entry Methods For ECS
 ;Production PC', P7.6 Revision 8, dated October 26, 1998.
 ;
REC01(ACRSCH,ACRRFC,ACRALC,ACRECS,ACRACH,ACRBTYP)          ;EP
 ;----- CHECK TRANSMISSION HEADER RECORD 01
 ;RECORD LAYOUT:
 ; 1-2  RECORD TYPE "01"     43-45  RFC IDENTIFIER
 ; 3-8  TRANSMISSION NUMBER  46-53  ALC
 ; 9-22 SCHEDULE NUMBER      54-65  DOS FILENAME
 ;23-34 DATE/TIME            66-416 FILLER
 ;35-38 FPA ID              417-417 PAYMENT TYPE
 ;39-40 FPA PC #            418-418 PAYMENT APPLICATION
 ;41-42 FILLER              419-440 BLANK FILL
 ;
 ;INPUT:
 ;ACRSCH =TREASURY SCHEDULE NUMBER
 ;ACRRFC =REGIONAL FINANCE CENTER
 ;ACRALC =AGENCY LOCATION CODE
 ;ACRECS =TREASURY ECS FILE NAME
 ;ACRACH =PAYMENT FORMAT
 ;ACRBTYP=BATCH TYPE
 ;
 N Z
 S $E(Z,1,2)="01"
 S $E(Z,3,8)=$$PAD^ACRFUTL("","R",6,"")
 S $E(Z,9,22)=$$PAD^ACRFUTL(ACRSCH,"L",14,0)
 S $E(Z,23,34)=$$PAD^ACRFUTL("","R",12,"")
 S $E(Z,35,38)=$$PAD^ACRFUTL("","R",4,"")
 S $E(Z,39,40)=$$PAD^ACRFUTL("","R",2,"")
 S $E(Z,41,42)=$$PAD^ACRFUTL("","R",2,"")
 S $E(Z,43,45)=$$PAD^ACRFUTL(ACRRFC,"R",3,"")
 S $E(Z,46,53)=$$PAD^ACRFUTL(ACRALC,"R",8,"")
 S $E(Z,54,65)=$$PAD^ACRFUTL($G(ACRECS)_"."_$G(ACRRFC),"R",12,"")
 S $E(Z,66,416)=$$PAD^ACRFUTL("","R",351,"")
 S $E(Z,417)=$$PAD^ACRFUTL($S(ACRACH="A":"A",ACRACH="B":"A",ACRACH="C":"C",ACRACH="N":"C",1:""),"R",1,"")
 S $E(Z,418)=$$PAD^ACRFUTL($S(ACRBTYP="V":"V",ACRACH="C"&(ACRBTYP="T"):"M",ACRACH="N"&(ACRBTYP="T"):"M",ACRACH="A"&(ACRBTYP="T"):"T",ACRACH="B"&(ACRBTYP="T"):"T",1:""),"R",1,"")
 S $E(Z,419,440)=$$PAD^ACRFUTL("","R",22,"")
 ;
 W Z
 Q
REC02(ACRSCH,ACRALC)         ;EP
 ;----- AGENCY LOCATION CODE (ALC) CONTROL RECORD 02
 ;
 ; ACR*2.1*15.01 IM15981
 ; Moved code to ACRFEXP6 because ACRFEXP5 is too large
 ;
 D REC02^ACRFEXP6(ACRSCH,ACRALC)
 Q
 ;
REC03(ACRSCH,ACRADD1,ACRADD2,ACRADD3,ACRPHON)    ;EP
 ;----- AGENCY BILLING ADDRESS CONTROL RECORD 03
 ;	
 ; ACR*2.1*15.01 IM15981
 ; Moved code to ACRFEXP6 because ACRFEXP5 is too large
 ;
 D REC03^ACRFEXP6(ACRSCH,ACRAADD1,ACRAADD2,ACRAADD3,ACRAPHON)
 Q
 ;
RECA04(ACRPCNT,ACRSCH,ACRATYP,ACRSSN,ACRAMT,ACRNAME,ACRRTN,ACRDAN,ACRAPPN,ACRPDFOR,ACRBTYP)        ;EP
 ;----- ACH 04 PAYMENT RECORD
 ;
 ;RECORD LAYOUT:
 ; 1-2  RECORD TYPE "04"          96-112 DEPOSITOR ACCT NO.
 ; 3-8  PAYMENT NUMBER           113-216 FILLER
 ; 9-22 SCHEDULE NUMBER          217-217 PAYMENT TYPE
 ;23-23 ACCOUNT TYPE             218-233 ACCOUNT SYMBOL
 ;24-32 PAYEE ID/TIN             234-283 FILLER
 ;33-35 FILLER                   284-363 PAYMENT ID LINE
 ;36-46 ZERO FILL                364-410 FILLER
 ;47-56 PAYMENT AMOUNT           411-413 ADDENDUM FORMAT
 ;57-57 RECORD CODE "B"          414-414 1099 REPORTING ELIG
 ;58-79 PAYEE NAME               415-415 TOP OFFSET ELIG
 ;80-80 ALLOTMENT CODE           416-423 ASAID
 ;81-86 FILLER                   424-431 ACOID
 ;87-95 ROUTING TRANSIT NUMBER   432-440 MAC
 ;
 ;INPUT:
 ;ACRPCNT =PAYMENT NO
 ;ACRSCH  =TREAS SCHED NO
 ;ACRATYP =ENCLOSURE CODE
 ;ACRSSN  =VENDOR EIN OR TRAVELER SSN
 ;ACRAMT  =PAYMENT AMOUNT
 ;ACRNAME =PAYEE NAME
 ;ACRRTN  =BANK ROUTING TRANSIT NUMBER
 ;ACRDAN  =DEPOSITOR ACCOUNT NUMBER
 ;ACRAPPN =APPROPRIATION
 ;ACRPDFOR=ACH ADDENDUM/INVOICE NUMBER
 ;ACRBTYP =BATCH TYPE
 ;
 N Z
 S $E(Z,1,2)="04"
 S $E(Z,3,8)=$$PAD^ACRFUTL(ACRPCNT,"L",6,0)
 S $E(Z,9,22)=$$PAD^ACRFUTL(ACRSCH,"L",14,0)
 S $E(Z,23)=ACRATYP
 S $E(Z,24,32)=ACRSSN
 S $E(Z,33,35)=$$PAD^ACRFUTL("","R",3,"")
 S $E(Z,36,46)=$$PAD^ACRFUTL(0,"R",11,0)
 S $E(Z,47,56)=$$PAD^ACRFUTL($TR($$DOL^ACRFUTL(ACRAMT),".",""),"L",10,0)
 S $E(Z,57)="B"
 S $E(Z,58,79)=$$PAD^ACRFUTL(ACRNAME,"R",22,"")
 S $E(Z,80)=$$PAD^ACRFUTL("","R",1,"")
 S $E(Z,81,86)=$$PAD^ACRFUTL("","R",6,"")
 S $E(Z,87,95)=$$PAD^ACRFUTL(ACRRTN,"R",9,"")
 S $E(Z,96,112)=$$PAD^ACRFUTL(ACRDAN,"R",17,"")
 S $E(Z,113,216)=$$PAD^ACRFUTL("","R","",104)
 S $E(Z,217)=$$PAD^ACRFUTL("","R",1,"")
 S $E(Z,218,233)=$$PAD^ACRFUTL(ACRAPPN,"R",16,"")
 S $E(Z,234,283)=$$PAD^ACRFUTL("","L","",50)
 S $E(Z,284,363)=$$PAD^ACRFUTL(ACRPDFOR,"R",80,"")
 S $E(Z,364,410)=$$PAD^ACRFUTL("","R",47,"")
 S $E(Z,411,413)=$$PAD^ACRFUTL($S(ACRBTYP="V":"CCD",ACRBTYP="T":"PPD",1:""),"R",3,"")
 S $E(Z,414)="N"
 ;S $E(Z,415)="Y"                            ;ACR*2.1*15.01 IM15981
 ;S $E(Z,415)=$S(ACRBTYP="T":"N",1:"Y")      ;ACR*2.1*15.01 IM15981
 S $E(Z,415)="Y"                             ;ACR*2.1*15.01 IM15981
 S $E(Z,416,423)=$$PAD^ACRFUTL("","R",8,"")
 S $E(Z,424,431)=$$PAD^ACRFUTL("","R",8,"")
 S $E(Z,432,440)=$$PAD^ACRFUTL("","R",9,"")
 ;
 W Z
 Q
RECC04(ACRPCNT,ACRSCH,ACRAMT,ACRNAME,ACRADD,ACRAPPN,ACRSSN,ACRNID,ACRID)       ;EP
 ;----- CHECK 04 PAYMENT RECORD
 ;
 ;RECORD LAYOUT:
 ;  1-2   RECORD TYPE "04"   218-218 TYPE OF PAYMENT
 ;  3-8   PAYMENT NUMBER     219-234 ACCOUNT SYMBOL
 ;  9-22  SCHEDULE NUMBER    235-243 VENDOR EIN/TRAVELER SSN
 ; 23-23  ENCLOSURE CODE     244-283 FILLER
 ; 24-30  FILLER             284-285 NUMBER OF PAYMENT ID LINES
 ; 31-31  ZERO FILL          286-340 PAYMENT ID LINE 1
 ; 32-41  PAYMENT AMOUNT     341-395 PAYMENT ID LINE 2
 ; 42-51  AGENCY ID          396-413 FILLER
 ; 52-52  RECORD CODE "B"    414-414 1099 REPORTING ELIG
 ; 53-87  PAYEE NAME         415-415 TOP OFFSET ELIG
 ; 88-122 ADDRESS LINE 1     416-423 ASAID
 ;123-157 ADDRESS LINE 2     424-431 ACOID
 ;158-187 ADDRESS LINE 3     432-440 MAC
 ;188-217 ADDRESS LINE 4
 ;
 ;INPUT:
 ;ACRPCNT=RECORD NUMBER
 ;ACRSCH =TREAS SCHED NO
 ;ACRAMT =PAYMENT AMOUNT
 ;ACRNAME=PAYEE NAME
 ;ACRADD =ARRAY CONTAINING ADDRESS LINES
 ;ACRAPPN=APPROPRIATION
 ;ACRSSN =VENDOR EIN/TRAVELER SSN
 ;ACRNID =NUMBER OF PAYMENT ID LINES
 ;ACRID  =ARRAY CONTAINING PAYMENT ID LINES
 ;
 N Z
 S $E(Z,1,2)="04"
 S $E(Z,3,8)=$$PAD^ACRFUTL(ACRPCNT,"L",6,0)
 S $E(Z,9,22)=$$PAD^ACRFUTL(ACRSCH,"L",14,0)
 S $E(Z,23)=2
 S $E(Z,24,30)=$$PAD^ACRFUTL("","R",7,"")
 S $E(Z,31)=0
 S $E(Z,32,41)=$$PAD^ACRFUTL($TR($$DOL^ACRFUTL(ACRAMT),".",""),"L",10,0)
 S $E(Z,42,51)=$$PAD^ACRFUTL("IHS","R",10,"")
 S $E(Z,52)="B"
 S $E(Z,53,87)=$$PAD^ACRFUTL(ACRNAME,"R",35,"")
 S $E(Z,88,122)=$$PAD^ACRFUTL($G(ACRADD(1)),"R",35,"")
 S $E(Z,123,157)=$$PAD^ACRFUTL($G(ACRADD(2)),"R",35,"")
 S $E(Z,158,187)=$$PAD^ACRFUTL($G(ACRADD(3)),"R",30,"")
 S $E(Z,188,217)=$$PAD^ACRFUTL($G(ACRADD(4)),"R",30,"")
 S $E(Z,218)="A"
 S $E(Z,219,234)=$$PAD^ACRFUTL(ACRAPPN,"R",16,"")
 S $E(Z,235,243)=$$PAD^ACRFUTL(ACRSSN,"R",9,"")
 S $E(Z,244,283)=$$PAD^ACRFUTL("","R",40,"")
 S $E(Z,284,285)=$$PAD^ACRFUTL(ACRNID,"L",2,0)
 S $E(Z,286,340)=$$PAD^ACRFUTL($G(ACRID(1)),"R",55,"")
 S $E(Z,341,395)=$$PAD^ACRFUTL($G(ACRID(2)),"R",55,"")
 S $E(Z,396,413)=$$PAD^ACRFUTL("","R",18,"")
 S $E(Z,414)="N"
 ;S $E(Z,415)="Y"                       ;ACR*2.1*15.01 IM15981
 ;S $E(Z,415)=$S(ACRBTYP="T":"N",1:"Y") ;ACR*2.1*15.01 IM15981
 S $E(Z,415)="Y"                        ;ACR*2.1*15.01 IM15981
 S $E(Z,416,423)=$$PAD^ACRFUTL("","R",8,"")
 S $E(Z,424,431)=$$PAD^ACRFUTL("","R",8,"")
 S $E(Z,432,440)=$$PAD^ACRFUTL("","R",9,"")
 ;
 W Z
 Q
RECC05(ACRPCNT,ACRSCH,ACRID) ;EP
 ;----- CHECK 05 NCR ENCLOSURE RECORD
 ;
 ;RECORD LAYOUT:
 ;  1-2   RECORD TYPE "05"     243-297 PAYMENT ID LINE 7
 ;  3-8   PAYMENT NUMBER       298-352 PAYMENT ID LINE 8
 ;  9-22  SCHEDULE NUMBER      353-415 FILLER
 ; 23-77  PAYMENT ID LINE 3    416-423 ASAID
 ; 78-132 PAYMENT ID LINE 4    424-431 ACOID
 ;133-187 PAYMENT ID LINE 5    432-440 MAC
 ;188-242 PAYMENT ID LINE 6
 ;
 ;INPUT:
 ;ACRPCNT=PAYMENT NUMBER
 ;ACRSCH =TREAS SCHED NO
 ;ACRID  =ARRAY CONTAINING PAYMENT ID LINES
 ;
 N Z
 S $E(Z,1,2)="05"
 S $E(Z,3,8)=$$PAD^ACRFUTL(ACRPCNT,"L",6,0)
 S $E(Z,9,22)=$$PAD^ACRFUTL(ACRSCH,"L",14,0)
 S $E(Z,23,77)=$$PAD^ACRFUTL($G(ACRID(3)),"R",55,"")
 S $E(Z,78,132)=$$PAD^ACRFUTL($G(ACRID(4)),"R",55,"")
 S $E(Z,133,187)=$$PAD^ACRFUTL($G(ACRID(5)),"R",55,"")
 S $E(Z,188,242)=$$PAD^ACRFUTL($G(ACRID(6)),"R",55,"")
 S $E(Z,243,297)=$$PAD^ACRFUTL($G(ACRID(7)),"R",55,"")
 S $E(Z,298,352)=$$PAD^ACRFUTL($G(ACRID(8)),"R",55,"")
 S $E(Z,353,415)=$$PAD^ACRFUTL("","R",63,"")
 S $E(Z,416,423)=$$PAD^ACRFUTL("","R",8,"")
 S $E(Z,424,431)=$$PAD^ACRFUTL("","R",8,"")
 S $E(Z,432,440)=$$PAD^ACRFUTL("","R",9,"")
 ;
 W Z
 Q
RECC06(ACRPCNT,ACRSCH,ACRID) ;EP
 ;----- CHECK 06 NCR ENCLOSURE RECORD
 ; 
 ;RECORD LAYOUT:
 ;  1-2   RECORD TYPE "06"      243-297 PAYMENT ID LINE 13
 ;  3-8   PAYMENT NUMBER        298-352 PAYMENT ID LINE 14
 ;  9-22  SCHEDULE NUMBER       353-415 FILLER
 ; 23-77  PAYMENT ID LINE 9     416-423 ASAID
 ; 78-132 PAYMENT ID LINE 10    424-431 ACOID
 ;133-187 PAYMENT ID LINE 11    432-440 MAC
 ;188-242 PAYMENT ID LINE 12
 ;
 ;INPUT:
 ;ACRPCNT=PAYMENT NUMBER
 ;ACRSCH =TREAS SCHED NO
 ;ACRID  =PAYMENT ID LINE ARRAY
 ;
 N Z
 S $E(Z,1,2)="06"
 S $E(Z,3,8)=$$PAD^ACRFUTL(ACRPCNT,"L",6,0)
 S $E(Z,9,22)=$$PAD^ACRFUTL(ACRSCH,"L",14,0)
 S $E(Z,23,77)=$$PAD^ACRFUTL($G(ACRID(9)),"R",55,"")
 S $E(Z,78,132)=$$PAD^ACRFUTL($G(ACRID(10)),"R",55,"")
 S $E(Z,133,187)=$$PAD^ACRFUTL($G(ACRID(11)),"R",55,"")
 S $E(Z,188,242)=$$PAD^ACRFUTL($G(ACRID(12)),"R",55,"")
 S $E(Z,243,297)=$$PAD^ACRFUTL($G(ACRID(13)),"R",55,"")
 S $E(Z,298,352)=$$PAD^ACRFUTL($G(ACRID(14)),"R",55,"")
 S $E(Z,353,415)=$$PAD^ACRFUTL("","R",63,"")
 S $E(Z,416,423)=$$PAD^ACRFUTL("","R",8,"")
 S $E(Z,424,431)=$$PAD^ACRFUTL("","R",8,"")
 S $E(Z,432,440)=$$PAD^ACRFUTL("","R",9,"")
 ;
 W Z
 Q
REC09(ACRPCNT,ACRSCH,ACRTAMT,ACRAPPN,ACRCNT)     ;EP
 ;----- SCHEDULE CONTROL RECORD 09
 ;
 ; ACR*2.1*15.01 IM15981
 ; Moved code to ACRFEXP6 because ACRFEXP5 is too large
 ;
 D REC09^ACRFEXP6(ACRPCNT,ACRSCH,ACRTAMT,.ACRAPPN,.ACRCNT)
 Q
REC99(ACRCNT,ACRSCH)         ;EP
 ;----- SCHEDULE TRAILER RECORD 99
 ;
 ; ACR*2.1*15.01 IM15981
 ; Moved code to ACRFEXP6 because ACRFEXP5 is too large
 ;
 D REC99^ACRFEXP6(.ACRCNT,ACRSCH)
 Q