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

AIBCVT2.m

Go to the documentation of this file.
AIBCVT2 ;IHS/DDPS/DFM-IBM STAT RECORDS BALANCING  [ 01/12/89  1:09 PM ]
 ;1.3; 1/13/89 LOGBOOK TOTAL INCLUDES BATCH HEADER REC, HEADER INCLUDES LOOP NAME
 ;1.3 ;12/31/88 ; LOGBOOK COUNTS,FAC HEADING,RJE COUNTS
 ;1.3; 9/23/88 RESTRUCTURE, ALLOW FOR REGISTRATION ELIGIBILITY FILE
 ;1.0; 3/28/88
GBLHEAD ;PROCESS GLOBAL HEADINGS
 S AIBGCTH=$P(AIBIN,U,4)
 S Y=$P(AIBIN,U,1) X ^DD("DD") S AIBGBD=Y
 S Y=$P(AIBIN,U,2) X ^DD("DD") S AIBGED=Y
 U AIBPDV W #,?20,AIBCNM_" CONVERSION RUNNING",!
 W !,"Global Beginning Date ",AIBGBD
 W !,"Global Ending Date ",AIBGED
 W !,"Global Header Record Count ",AIBGCTH
 D DATIME^AIBCVT6 W !!,"Processing Begun ",AIBDT," ",AIBTI,! G RETURN
FACHEAD ;PRINT NEXT FACILITY HEADINGS
 S AIBMSG=AIBCNM_" FOR "_AIBFNR_" PROCESSING - CODE = "_AIBFCD
 U AIBPDV W #!!!,?10,AIBMSG
 U AIBCDV W !!,AIBMSG," ",! S AIBMSG="" U AIBPDV
 W !,"Facility Data Beginning Date ",AIBFBD
 W !,"Facility Data Ending Date ",AIBFED
 W !,"Facility Header Record Count ",AIBFCT,!
 G RETURN
FACFOOT ;FACILITY FOOTING LINES
 U AIBCDV W !,"Facility Records Created ",AIBCTO+AIBCTB,!
 I AIBFILE="ibmjob" W "Facility RJE Data Records Created ",AIBCTW-AIBCTH,!
 U AIBPDV W !!!,"Facility Records Read   ",AIBCTI+AIBCTE+AIBCT2
 S AIBGCTI=AIBGCTI+AIBCTI
 I $L(AIBTGBL)=0 G WREJCT
 W !,"Facility Records Written To ",AIBTGBL,"GLOB ",AIBCT2
 S AIBGCT2=AIBGCT2+AIBCT2
WREJCT ;WRITE REJECTED COUNT
 W !,"Facility Records Rejected ",AIBCTE S AIBGCTE=AIBGCTE+AIBCTE
 I AIBCTB=0 G WTOTAL
 W !,"Facility REG DEL/MRG Batch Header Records Created ",AIBCTB
 S AIBGCTB=AIBGCTB+AIBCTB,AIBCTB=0
WTOTAL ;WRITE TOTAL RECORD COUNT
 ; I AIBFILE="ibmjob" G WRJETOT
 W !,"Facility Records Written  ",AIBCTO+AIBCTB
 S AIBGCTO=AIBGCTO+AIBCTO,AIBCTO=0
 G CKBAL
WRJETOT ;WRITE TOTAL CARDS CREATED
 W !,"Facility RJE Data Records Created ",AIBCTW-AIBCTH
 S AIBCTH=AIBCTW
CKBAL ;CHECK IF TOTALS BALANCE
 S AIBCTI=AIBCTI+AIBCTE+AIBCT2
 I AIBCTI=AIBFCT W !!,"Facility Counts Balanced" G ZEROUT
 S AIBDIF=AIBFCT-AIBCTI
 W !!,"********** Facility Counts Don't Balance **********"
 W !,"  Facility Header Count = ",AIBFCT
 W !,"  Input Count = ",AIBCTI
 W !,$S(AIBDIF>0:"  Over by ",1:"  Short by "),AIBDIF K AIBDIF
ZEROUT ;RESET FACILITY COUNTERS
 S (AIBCTI,AIBCTE,AIBCT2)=0 G RETURN
EOJ ;END OF JOB PROCESSING
 U AIBPDV W #,?20,AIBCNM_" CONVERSION TOTALS",!
 U AIBCDV W !,"Global Total Records Written ",AIBGCTO+AIBGCTB U AIBPDV
 S AIBAGO=AIBAGO+AIBGCTO+AIBGCTB
 S AIBCRG1=AIBGCTI,AIBGCTI=AIBGCTI+AIBGCTE
 S AIBAGI=AIBAGI+AIBGCTI,AIBGCTI=AIBGCTI+AIBGCT2
 W !!!,"Total Records Read   ",AIBGCTI
 W !,"Total Records Rejected ",AIBGCTE
 I $L(AIBTGBL)=0 G CKDELMRG
 W !,"Total Records Written to ",AIBTGBL,"GLOB ",AIBGCT2
 S AIBTZ(0)=AIBTZ,AIBTZ=0
 S AIBZ=0,AIBZZ=0,$P(@AIBTGLT,U,3)=AIBGCT2,$P(@AIBTGLT,U,4)=AIBGCT2
 I $L(AIBTZ(0))=0 G CKDELMRG
 S AIBZ=AIBZ(0),$P(@AIBTGFT,U,3)=AIBTZ(0),$P(@AIBTGFT,U,4)=AIBTZ(0)
CKDELMRG ;CHECK REGISTRATION DELETE MERGE PRESENT
 I AIBGCTB=0 G GTOTS
 W !,"Facility REG DEL/MRG Batch Header Records Created ",AIBGCTB
GTOTS ;GRAND TOTALS
 I AIBFILE="keytap" G TAPE
 W !,"Total RJE Data Record Count ",AIBCTW
 W !,"Total RJE JCL Record Count ",AIBCTJ
 W !,"Total RJE Records to Transmit ",AIBCTW+AIBCTJ
 W !,"Total Records Written  ",AIBGCTO+AIBGCTB
 G BAL
TAPE ;TAPE TO BE CREATED
 W !,"Total Records Written  ",AIBGCTO+AIBGCTB
 W !!,"******* Keytape Volume Serial Number To Create ",AIBV," *******"
BAL ;BALANCE LOGIC
 I AIBGCTI=AIBGCTH W !!,"Global Counts Balanced" G CKLAST
 S AIBDIF=AIBGCTH-AIBGCTI
 W !!,"********** Global Counts Out of Balance **********"
 W !,"  Global Header Count = ",AIBGCTH
 W !,"  Input Count = ",AIBGCTI
 W !,$S(AIBDIF<0:"  Over by ",1:"  Short by "),AIBDIF K AIBDIF
CKLAST ;IF REGISTRATION CHECK IF DONE
 S (AIBGCTI,AIBGCTO,AIBGCTE,AIBGCT2,AIBGCTB,AIBCRG1)=0
 I AIBGBLP'="AGEL" G RETURN
 U AIBPDV W #,?17,"REGISTRATION CONVERSION LOGBOOK DATA",!
 W !!,"TOTAL TO USE TO BALANCE TO INPUT ",AIBAGI
 W !,"TOTAL RECORDS TO BE ENTERED INTO PCIS LOGBOOK ",AIBAGO
 S (AIBAGI,AIBAGO)=0
RETURN ;RETURN TO CALLING PROGRAM
 Q