Exemple #1
0
 def __init__(self):
     super(HypSDLDly,self).__init__()
     self.landDir    = 'SrcFiles'
     self.incFileSet = []    # Incoming Files. Contains full path name.
     self.workFiles  = []    # Files that were moved to the working dir (ideally same than incFiles). 
     
     self.RowCnt     = -1
 
     self.ib.srcFile = ('FMSGL.TXT',)       # File that Informatica expects. Alphabetical.
          
     self.ib.FileColCnt = {'FMSGL.TXT':4, }  
             
     self.ts        =  su.getTimeSTamp()
     self.cmdStep = { 'A' : self.getLock         ,
                      'B' : self. getIncFiles    ,  # Populates self.incSetFiles. Incoming Files.  
                      'C' : self.cpFileToWorkDir ,  # Copies FileSet and sets self.workFiles (full path)
                      'D' : self.archFiles       ,
                      'E' : self.procHypSdlFile  ,
                      'F' : self.wkfHypSdlDly    ,  #
                      'G' : self.wkfHypIdlDly    ,                  
                     }
    
     # Infa Environmental variables/
     self.infaEnvVar   = {
             'PMCMD'            : 'mg.pmcmd'           ,
             'INFA_USER'        : 'self.ib.rep_user'   ,
             'INFA_XPWD'        : 'self.ib.rep_xpwd'   ,
             'DOMAIN'           : 'self.ib.dom_name'   ,
             'INT_SERV'         : 'self.ib.IS'         , 
             'INFA_SHARE'       : 'self.ib.shareDir'   ,  
             'INFA_APP_CFG'     : 'self.ib.cfgDir'     ,   
             'INFA_APP_LCK'     : 'self.ib.lckDir'     ,   
             'INFA_APP_CTL'     : 'self.ib.ctlDir'     ,         
            }
Exemple #2
0
 def __init__(self):
     super(FinHierSCOS,self).__init__()
     self.landDir    = 'SrcFiles/finance'
     self.outDir     = 'TgtFiles/finance'
     self.ib.outFile = 'SCS_Org_Hierarchy.csv'   
     self.outFile    = ''      # Place Holder for final File Name SCS_Org_Hierarchy130910.csv
     self.outArchDir = 'archive'
     self.trigFiles  = []      # Incoming Trigger File.
     
     self.ts         =  su.getTimeSTamp()
    
     # Allowable commands for this application
     self.cmdStep = { 'A' : self.getLock             ,
                      'B' : self.getTrigFilesDate    ,
                      'C' : self.verTrigFileDate     ,
                      'D' : self.mvTrigFileToArchDir ,   # Move files after dates within are verified.
                      'E' : self.wfinHierSCOS         ,
                      'F' : self.procHierSCOS         ,
                      'G' : self.putSCOSftpFile      ,               
                     }
    
     # Infa Environmental variables/
     self.infaEnvVar   = {
             'PMCMD'            : 'mg.pmcmd'           ,
             'INFA_USER'        : 'self.ib.rep_user'   ,
             'INFA_XPWD'        : 'self.ib.rep_xpwd'   ,
             'DOMAIN'           : 'self.ib.dom_name'   ,
             'INT_SERV'         : 'self.ib.IS'         , 
             'INFA_SHARE'       : 'self.ib.shareDir'   ,  
             'INFA_APP_CFG'     : 'self.ib.cfgDir'     ,   
             'INFA_APP_LCK'     : 'self.ib.lckDir'     ,   
            }
Exemple #3
0
 def __init__(self):
     super(GetCPIData,self).__init__()
     self.landDir    = 'SrcFiles/cpi'
     self.tgtDir     = 'SrcFiles'
     self.incFileSet = []    # Incoming Files. Contains full path name.
     self.incFiles   = []
     self.workFiles  = []    # Files that were moved to the working dir (ideally same than incSetFile). 
     self.trigFiles  = []    # Incoming Trigger File.
                    
     self.ts        =  su.getTimeSTamp()
     
     # Allowable commands for this application. Make sure to Set 
     self.cmdStep = { 'A' : self.getLock   ,
                      'B' : self.getUSACPI ,
                      'C' : self.getCanCPI ,     
                     }
    
     # Infa Environmental variables/
     self.infaEnvVar   = {
             'PMCMD'            : 'mg.pmcmd'           ,
             'INFA_USER'        : 'self.ib.rep_user'   ,
             'INFA_XPWD'        : 'self.ib.rep_xpwd'   ,
             'DOMAIN'           : 'self.ib.dom_name'   ,
             'INT_SERV'         : 'self.ib.IS'         , 
             'INFA_SHARE'       : 'self.ib.shareDir'   ,  
             'INFA_APP_CFG'     : 'self.ib.cfgDir'     ,   
             'INFA_APP_LCK'     : 'self.ib.lckDir'     ,   
             'INFA_APP_CTL'     : 'self.ib.ctlDir'     ,          
            }
Exemple #4
0
    def __init__(self):
        super(ClaimMonthly,self).__init__()
        self.landDir    = ''
        self.incFileSet = []    # Incoming Files. Contains full path name.
        self.incFiles   = []
        self.workFiles  = []    # Files that were moved to the working dir (ideally same than incSetFile).
        self.trigFiles  = []    # Incoming Trigger File.


        self.fileDate   = ''
        self.FILE_SET_LEN = 1

        self.ts        =  su.getTimeSTamp()
        # Allowable commands for this application. Make sure to Set
        self.cmdStep = { 'A' : self.getLock           ,
                         'B' : self.isLastWorkDayWarn ,
                         'C' : self.chkNextRunFlg     ,   
                         'D' : self.procClaims        ,
                        }


        # Infa Environmental variables/
        self.infaEnvVar   = {
                'PMCMD'            : 'mg.pmcmd'           ,
                'INFA_USER'        : 'self.ib.rep_user'   ,
                'INFA_XPWD'        : 'self.ib.rep_xpwd'   ,
                'DOMAIN'           : 'self.ib.dom_name'   ,
                'INT_SERV'         : 'self.ib.IS'         ,
                'INFA_SHARE'       : 'self.ib.shareDir'   ,
                'INFA_APP_CFG'     : 'self.ib.cfgDir'     ,
                'INFA_APP_LCK'     : 'self.ib.lckDir'     ,
                'INFA_APP_CTL'     : 'self.ib.ctlDir'     ,
               }
Exemple #5
0
    def __init__(self):
        super(TisFBCarrImp,self).__init__()
        self.incFileSet = []    # Incoming Files. Contains full path name.
        self.incFiles   = []
        self.workFiles  = []    # Files that were moved to the working dir (ideally same than incSetFile). 

        
        self.ts        =  su.getTimeSTamp()

        self.delCSVFileFlg  = False

        # Allowable commands for this application. Make sure to Set 
        self.cmdStep = { 'A' : self.getLock        ,                        
                         'B' : self.delCSVFile     ,
                         'C' : self.procCarrPrompt ,
                         'D' : self.delCarrPrompt  ,
                        }
       
        # Infa Environmental variables/
        self.infaEnvVar   = {
                 'INFA_SHARE'       : 'self.ib.shareDir'   ,  
                 'INFA_APP_CFG'     : 'self.ib.cfgDir'     ,   
                 'INFA_APP_LCK'     : 'self.ib.lckDir'     ,   
                 'INFA_APP_DAT'     : 'self.ib.dataDir'    ,   
                 'NZ_BIN'           : 'self.ib.nzbin'      ,
               }
Exemple #6
0
    def __init__(self):
        super(LocationDim,self).__init__()
        self.landDir    = 'SrcFiles/employee'
        self.incFileSet = []    # Incoming Files. Contains full path name.
        self.incFiles   = []
        self.workFiles  = []    # Files that were moved to the working dir (ideally same than incSetFile). 
        self.trigFiles  = []    # Incoming Trigger File.
        
        self.srcFile     = ('hp400jnm_sap_dwext.dat',)   # File that Informatica expects. Alphabetical.
        self.ib.fileName = r"'P.HP400JNM.SAP.DW.EXTRACT'"
        
        self.fileDate   = ''          
        self.FILE_SET_LEN = 1   
        
        self.ts        =  su.getTimeSTamp()
        # Allowable commands for this application. Make sure to Set 
        self.cmdStep = { 'A' : self.getLock            ,
                         'B' : self.isWorkDayWarn      ,
                         'C' : self.chkNextRunFlg      ,
                         'D' : self.rWkfLocCbuMthly    ,  
                         'E' : self.rWkfLocGeoMthly    ,
                         'F' : self.rWkfLocAreaMthly   ,
                         'G' : self.rWkfLocRfpMthly    ,
                         'H' : self.rWkfLocAdminMthly  ,
                         'I' : self.rWkfLocWalkerMthly ,
                         'J' : self.rWkfLocTeamMthly   ,
                         'K' : self.rWkfEmpDimMthly    ,
                         'L' : self.procLocationDim    ,  
                       }

       
        # Infa Environmental variables/
        self.infaEnvVar   = {
                'PMCMD'            : 'mg.pmcmd'           ,
                'INFA_USER'        : 'self.ib.rep_user'   ,
                'INFA_XPWD'        : 'self.ib.rep_xpwd'   ,
                'DOMAIN'           : 'self.ib.dom_name'   ,
                'INT_SERV'         : 'self.ib.IS'         , 
                'INFA_SHARE'       : 'self.ib.shareDir'   ,  
                'INFA_APP_CFG'     : 'self.ib.cfgDir'     ,   
                'INFA_APP_LCK'     : 'self.ib.lckDir'     ,   
                'INFA_APP_CTL'     : 'self.ib.ctlDir'     ,          
               }
        
        # Flags to run wkl
        self.loc_cbu_mthly_flg    = False
        self.loc_geo_mthly_flg    = False
        self.loc_area_mthly_flg   = False
        self.loc_rfp_mthly_flg    = False
        self.loc_admin_mthly_flg  = False
        self.loc_walker_mthly_flg = False
        self.loc_team_mthly_flg   = False
        self.emp_dim_mthly_flg    = False
        
        # FTP is expecting the following env variables, which should not be in a config file.
        #UX cp Cortera_Trx_Extract_20130429.txt "'P.PO230D15.VPODATA(0)'"
        os.environ['FILE'     ] =  (r"\'P.HP400JNM.SAP.DW.EXTRACT\'")   
        os.environ['RXFILE'   ] =  ('None')    # 
    def __init__(self):
        super(VehSevenWkday,self).__init__()
        self.landDir    = 'SrcFiles/vehicle'
        self.incFileSet = []    # Incoming Files. Contains full path name.
        self.incFiles   = []
        self.workFiles  = []    # Files that were moved to the working dir (ideally same than incSetFile). 
        
        self.RowCnt     = -1
        self.srcFile     = ('zepprsi_eps133d0.dat','compliance_ven.csv','or_compliant_loc.csv','or_compliant_vendors.csv ','or_excluded_vendors.csv','or_master_account_list.txt','tire_exceptions.csv')   # File that Informatica expects. Alphabetical.
        self.ib.fileName = r"'ZEPPRSI.EPS133D0.EXTRACT',COMPLIANCE_VEN.CSV,OR_Compliant_Loc.csv,OR_Compliant_Vendors.csv ,OR_Excluded_Vendors.CSV,OR_MASTER_ACCOUNT_LIST.TXT,tire_exceptions.CSV"
        self.checkNextRunFlg  = False
        self.runWkfFlowFlg    = False
        
        self.fileDate   = ''          
        self.FILE_SET_LEN = 1   
        
        self.ts        =  su.getTimeSTamp()

        # Allowable commands for this application. Make sure to Set 
        self.cmdStep = { 'A' : self.getLock                   ,
                         'B' : self.isWorkDayWarn             ,
                         'C' : self.getFtpFiles               ,  
                         'D' : self.getFtpFiles2              ,  
                         'E' : self.getIncSetFiles            ,
                         'F' : self.copyFilesWorkDir          ,
                         'G' : self.archFilesTS               ,    
                         'H' : self.wkfEmpOverLaborMthly      ,    
                         'I' : self.wkfRepShopOTTimeSheetMthly,    
                         'J' : self.wkfRepTireRebillMthly     ,    
                         'K' : self.wkfAssetShopSupSalesMthly ,    
                         'L' : self.wkfRepOutRepOrderMthly    ,    
                         'M' : self.wkfRepBatNewUsedMthly     ,    
                         'N' : self.wkfAssetFuelAnalyisMthly  ,    
                         'O' : self.wkfAssetFuelTicketMthly   ,    
                         'P' : self.wkfRepOutRepCompMthly     ,    
                         'Q' : self.wkfVendShopSuppCompMthly  ,    
                         'R' : self.wkfAssetShopSuppCompMthly ,    
                         'S' : self.wkfAssetTrack800SuppMthly ,                          
                        }
        
        # Infa Environmental variables/
        self.infaEnvVar   = {
                'PMCMD'            : 'mg.pmcmd'           ,
                'INFA_USER'        : 'self.ib.rep_user'   ,
                'INFA_XPWD'        : 'self.ib.rep_xpwd'   ,
                'DOMAIN'           : 'self.ib.dom_name'   ,
                'INT_SERV'         : 'self.ib.IS'         , 
                'INFA_SHARE'       : 'self.ib.shareDir'   ,  
                'INFA_APP_CFG'     : 'self.ib.cfgDir'     ,   
                'INFA_APP_LCK'     : 'self.ib.lckDir'     ,   
                'INFA_APP_CTL'     : 'self.ib.ctlDir'     ,          
               }
        
        # FTP is expecting the following env variables, which should not be in a config file.
        # First Set of files from Mainframe. 
        # 
        os.environ['RXFILE'   ] =  ('None')    # 
 def __init__(self):
     super(VehEightWkday,self).__init__()
     self.landDir    = 'SrcFiles/vehicle'
     self.incFileSet = []    # Incoming Files. Contains full path name.
     self.incFiles   = []    # Will need to re-initialize
     self.workFiles  = []    # Files that were moved to the working dir (ideally same than incSetFile). 
     
     self.RowCnt     = -1
     self.srcFile    =  ('cpm_xref_mfr_to_prefix.csv','part_id_except.csv','tire_cmpl_area.csv','vmrs_tmc_cd33.csv') # File that Informatica expects. Alphabetical.
     self.ib.fileName = "CPM_XREF_MFR_TO_PREFIX.csv,PART_ID_EXCEPT.csv,TIRE_CMPL_AREA.csv,VMRS_TMC_CD33.csv"           # SourceFile Name as String, List
     self.checkNextRunFlg  = False
     self.runWkfFlowFlg    = False
     
     self.fileDate   = ''          
     self.FILE_SET_LEN = 1   
     
     self.ts        =  su.getTimeSTamp()
     # Allowable commands for this application. Make sure to Set 
     self.cmdStep = { 'A' : self.getLock                     ,
                      'B' : self.isWorkDayWarn               ,
                      'C' : self.getFtpFiles                 , # Sets self.incFileSet
                      'D' : self.getIncSetFiles              ,
                      'E' : self.copyFilesWorkDir            ,
                      'F' : self.archFilesTS                 ,
                      'G' : self.wkfRepTireAreaCompMthly     ,
                      'H' : self.wkfRepTireCostActualMthly   ,
                      'I' : self.wkfRepTireBrkDownMthly      ,
                      'J' : self.wkfRepRCRCTireIncMthly      ,
                      'K' : self.wkfRepTireScoreCardMthly    ,
                      'L' : self.wkfRepTireScoreCardLocMthly ,   
                      'M' : self.wkfAsstPartDescMthly        ,
                      'N' : self.wkfAsstPartSummMthly        ,
                      'O' : self.wkfRepShpVsTmShtExcpMthly   ,
                      'P' : self.wkfAsstPartSummRankMthly    ,
                      'Q' : self.wkfVendVmrsPartCodeDesc     ,      
                      'R' : self.wkfAsstCPMtopXrefBldk       ,      
                    }
    
     # Infa Environmental variables/
     self.infaEnvVar   = {
             'PMCMD'            : 'mg.pmcmd'           ,
             'INFA_USER'        : 'self.ib.rep_user'   ,
             'INFA_XPWD'        : 'self.ib.rep_xpwd'   ,
             'DOMAIN'           : 'self.ib.dom_name'   ,
             'INT_SERV'         : 'self.ib.IS'         , 
             'INFA_SHARE'       : 'self.ib.shareDir'   ,  
             'INFA_APP_CFG'     : 'self.ib.cfgDir'     ,   
             'INFA_APP_LCK'     : 'self.ib.lckDir'     ,   
             'INFA_APP_CTL'     : 'self.ib.ctlDir'     ,         
            }
     
     # FTP is expecting the following env variables, which should not be in a config file.
     # First Set of files from Mainframe. 
     # 
     os.environ['RXFILE'   ] =  ('None')    # 
     os.environ['FILE'     ] =  ('CPM_XREF_MFR_TO_PREFIX.csv,PART_ID_EXCEPT.csv,TIRE_CMPL_AREA.csv,VMRS_TMC_CD33.csv')
 def __init__(self):
     super(VehFifthWkday,self).__init__()
     self.landDir    = 'SrcFiles/vehicle'
     self.incFileSet = []    # Incoming Files. Contains full path name.
     self.incFiles   = []    # Will need to re-initialize
     self.workFiles  = []    # Files that were moved to the working dir (ideally same than incSetFile). 
     
     self.RowCnt     = -1
     self.srcFile    = ('mfg_parts_match.csv','mfg_parts_match_can.csv','rfp_adj.csv','rfp_cmpl_part_exclude.csv','rfp_navistar.txt','rfp_part_price.csv','rfp_part_price_can.csv','rfp_part_xref.csv','rfp_part_xref_can.csv')   # File that Informatica expects. Alphabetical.
     self.ib.fileName = "MFG_Parts_Match.CSV,MFG_Parts_Match_CAN.CSV,RFP_ADJ.csv,RFP_CMPL_PART_EXCLUDE.csv,RFP_NAVISTAR.txt,RFP_Part_Price.csv,RFP_Part_Price_CAN.csv,RFP_Part_Xref.csv,RFP_Part_Xref_CAN.csv"  # SourceFile Name as String, List
     self.checkNextRunFlg  = False
     self.runWkfFlowFlg    = False
     
     self.fileDate   = ''          
     self.FILE_SET_LEN = 1   
     
     self.ts        =  su.getTimeSTamp()
     # Allowable commands for this application. Make sure to Set 
     self.cmdStep = { 'A' : self.getLock                ,
                      'B' : self.isWorkDayWarn          ,
                      'C' : self.getFtpFiles            , # Sets self.incFileSet
                      'D' : self.getIncSetFiles         ,
                      'E' : self.copyFilesWorkDir       ,
                      'F' : self.archFilesTS            ,
                      'G' : self.wPartDimMthly          ,
                      'H' : self.wRFPPartUsCanMthly     ,
                      'I' : self.wRFPComplMthly         ,
                      'J' : self.wJobrComplMthly        ,
                      'K' : self.wSerComplMthly         ,
                      'L' : self.wPrtComplMthly         ,  
                      'M' : self.wkfRFPCompUSCanMthly   ,                         
                      'N' : self.wkfAsstRFPCompCanMthly  ,
                      'O' : self.wkfAsstRFPCompMthly     ,
                      'P' : self.wkfAsstPurchCompMthly   ,
                      'Q' : self.wkfAsstRankResMthly     ,
                      'R' : self.wkfAsstPartPriceMonMthly,                         
                     }
    
     # Infa Environmental variables/
     self.infaEnvVar   = {
             'PMCMD'            : 'mg.pmcmd'           ,
             'INFA_USER'        : 'self.ib.rep_user'   ,
             'INFA_XPWD'        : 'self.ib.rep_xpwd'   ,
             'DOMAIN'           : 'self.ib.dom_name'   ,
             'INT_SERV'         : 'self.ib.IS'         , 
             'INFA_SHARE'       : 'self.ib.shareDir'   ,  
             'INFA_APP_CFG'     : 'self.ib.cfgDir'     ,   
             'INFA_APP_LCK'     : 'self.ib.lckDir'     ,   
             'INFA_APP_CTL'     : 'self.ib.ctlDir'     ,         
            }
     
     # FTP is expecting the following env variables, which should not be in a config file.
     # First Set of files from Mainframe. 
     # 
     os.environ['RXFILE'   ] =  ('None')    # 
     os.environ['FILE'     ] =  ('MFG_Parts_Match.CSV,MFG_Parts_Match_CAN.CSV,RFP_ADJ.csv,RFP_CMPL_PART_EXCLUDE.csv,RFP_NAVISTAR.txt,RFP_Part_Price.csv,RFP_Part_Price_CAN.csv,RFP_Part_Xref.csv,RFP_Part_Xref_CAN.csv')
Exemple #10
0
 def mvTrigFileToArchDir(self):
     rc = 0 
     for src in self.trigFiles:
         fn = fu.getFileBaseName(src)
         d = '%s/%s.%s' % (self.ib.archDir, fn, su.getTimeSTamp()) 
         r = fu.moveFile(src, d)
         if r != 0 : 
             rc += 1
             self.log.error ("Error moving trigger file  %s r = %s. " % (src, r))
         
         else      : self.log.info('Moving Trigger file %s to %s rc= %s' % (src, d, r))
         
     return rc    # Only reach this line if trigger file had been removed externa to the program !
Exemple #11
0
   def __init__(self):
       super(LeaseCredit,self).__init__()
       self.landDir    = 'SrcFiles/lease_credit'
       self.incFileSet = []    # Incoming Files. Contains full path name.
       self.workFiles  = []    # Files that were moved to the working dir (ideally same than incFiles). 
       
       self.RowCnt     = -1
       self.ib.fld     = 'Lease_Credit'
       self.ib.wkf     = 'wkf_LEASE_CREDIT_PROCESS'    
       self.ib.srcFile = ( 'Bu_region.csv','Cortera_Trx_Extract.txt')    # File that Informatica expects. Alphabetical.
       #self.ib.srcFile = ('Bu_region.csv,Cortera_Trx_Extract.txt,CTRL_BUREGION.txt,CTRL_CORTERA.txt')  # Sorted Mandatory Files that Informatica expects.
            
       self.checkNextRunFlg  = False
       self.runWkfFlowFlg    = False
       
       self.fileDate   = ''          
       self.FILE_SET_LEN = 4   
       self.procCort  = {}
       self.procBuReg = {}
       
       self.ts        =  su.getTimeSTamp()
       # Allowable commands for this application. Make sure to Set 
       self.cmdStep = { 'A' : self.getLock          ,
                        'B' : self.getLCRftpFiles   ,  # Sets self.incFileSet
                        'C' : self.getIncSetFiles   ,  # Populates self.incSetFiles. Incoming Files.
                        'D' : self.chkNextRunFlg    ,   
                        'E' : self.procCtlFiles     ,           
                        'F' : self.procBuRegFile    ,     
                        'G' : self.procCortFiles    ,
                        #'H' : self.postTask         ,                 
                        'T' : self.updLeaseCrdTbl   , # Test reserved for Test stub
                       }
      
       # Infa Environmental variables/
       self.infaEnvVar   = {
               'PMCMD'            : 'mg.pmcmd'           ,
               'INFA_USER'        : 'self.ib.rep_user'   ,
               'INFA_XPWD'        : 'self.ib.rep_xpwd'   ,
               'DOMAIN'           : 'self.ib.dom_name'   ,
               'INT_SERV'         : 'self.ib.IS'         , 
               'INFA_SHARE'       : 'self.ib.shareDir'   ,  
               'INFA_APP_CFG'     : 'self.ib.cfgDir'     ,   
               'INFA_APP_LCK'     : 'self.ib.lckDir'     ,   
               'INFA_APP_CTL'     : 'self.ib.ctlDir'     ,         
 
              }
       
       # FTP is expecting the following env variables, which should not be in a config file.
       os.environ['FILE'     ] =  ('Bu_region.csv,Cortera_Trx_Extract.txt,CTRL_BUREGION.txt,CTRL_CORTERA.txt')  # Should match, this are expected files. Mosty control except for Bu_region.csv.
       os.environ['RXFILE'   ] =  r'Cortera_Trx_Extract_[0-9]*.txt'   # data file(s)  which depends on the number of files specified by Cortera_Trx_Extract.txt.
Exemple #12
0
    def __init__(self):
        super(VehCompDly,self).__init__()
        self.landDir    = 'SrcFiles/vehicle'
        self.incFileSet = []    # Incoming Files. Contains full path name.
        self.incFiles   = []
        self.workFiles  = []    # Files that were moved to the working dir (ideally same than incSetFile). 
        
        self.RowCnt     = -1
  
        self.srcFile = ('PO870D30comp.dat','PO075canc.dat',)     # File that Informatica expects. Alphabetical.
        self.ib.fileName = r"'P.PO870D30.WHOUSE.COMP.STD','P.PO075.CANC'"
        self.checkNextRunFlg  = False
        self.runWkfFlowFlg    = False
        
        self.fileDate   = ''          
        self.FILE_SET_LEN = 1   
        
        self.ts        =  su.getTimeSTamp()
        # Allowable commands for this application. Make sure to Set 
        self.cmdStep = { 'A' : self.getLock          ,
                         'B' : self.getTrigFiles     ,
                         'C' : self.getFtpFiles      ,  # Sets self.incFileSet
                         'D' : self.getIncSetFiles   , 
                         'E' : self.copyFilesWorkDir ,
                         'F' : self.archFilesTS      ,
                         'G' : self.chkNextRunFlg    ,   
                         'H' : self.chkFileRowsFlg   ,
                         'I' : self.procCompFiles    ,           

                        }
       
        # Infa Environmental variables/
        self.infaEnvVar   = {
                'PMCMD'            : 'mg.pmcmd'           ,
                'INFA_USER'        : 'self.ib.rep_user'   ,
                'INFA_XPWD'        : 'self.ib.rep_xpwd'   ,
                'DOMAIN'           : 'self.ib.dom_name'   ,
                'INT_SERV'         : 'self.ib.IS'         , 
                'INFA_SHARE'       : 'self.ib.shareDir'   ,  
                'INFA_APP_CFG'     : 'self.ib.cfgDir'     ,   
                'INFA_APP_LCK'     : 'self.ib.lckDir'     ,   
                'INFA_APP_CTL'     : 'self.ib.ctlDir'     ,         
  
               }
        
        # FTP is expecting the following env variables, which should not be in a config file.
        #os.environ['FILE'     ] =  (r"\'P.PO870D30.WHOUSE.COMP.STD\'")    # 
        os.environ['FILE'     ] =  (r"\'P.PO870D30.WHOUSE.COMP.STD\',\'P.PO075.CANC\'")    # 
        os.environ['RXFILE'   ] =  ('None')    # 
Exemple #13
0
   def __init__(self):
       super(VehFifthWkday,self).__init__()
       self.landDir    = 'SrcFiles/vehicle'
       self.incFileSet = []    # Incoming Files. Contains full path name.
       self.incFiles   = []
       self.workFiles  = []    # Files that were moved to the working dir (ideally same than incSetFile). 
       
       self.RowCnt     = -1
       self.srcFile    = ('PO225D15.dat','PO875D30.dat')   # File that Informatica expects. Alphabetical.
       self.ib.fileName = r"'P.PO225D15.UMPK(0)','P.PO875D30.WHOUSE.CURR.STD'"
       self.checkNextRunFlg  = False
       self.runWkfFlowFlg    = False
       
       self.fileDate   = ''          
       self.FILE_SET_LEN = 1   
       
       self.ts        =  su.getTimeSTamp()
       # Allowable commands for this application. Make sure to Set 
       self.cmdStep = { 'A' : self.getLock                 ,
                        'B' : self.isWorkDayWarn           , 
                        'C' : self.getFtpPartDimMthly      ,      
                        'D' : self.wPartDimMthly           ,      
                        'E' : self.getFtpRFPPartUsCanMthly ,      
                        'F' : self.wRFPPartUsCanMthly      ,    
                        'G' : self.getFtpComplMthly        ,      
                        'H' : self.wRFPComplMthly          ,    
                        'I' : self.wJobrComplMthly         ,      
                        'J' : self.wSerComplMthly          ,      
                        'K' : self.wPrtComplMthly          ,    
                       }
      
       # Infa Environmental variables/
       self.infaEnvVar   = {
               'PMCMD'            : 'mg.pmcmd'           ,
               'INFA_USER'        : 'self.ib.rep_user'   ,
               'INFA_XPWD'        : 'self.ib.rep_xpwd'   ,
               'DOMAIN'           : 'self.ib.dom_name'   ,
               'INT_SERV'         : 'self.ib.IS'         , 
               'INFA_SHARE'       : 'self.ib.shareDir'   ,  
               'INFA_APP_CFG'     : 'self.ib.cfgDir'     ,   
               'INFA_APP_LCK'     : 'self.ib.lckDir'     ,   
               'INFA_APP_CTL'     : 'self.ib.ctlDir'     ,         
 
              }
       
       # FTP is expecting the following env variables, which should not be in a config file.
       # First Set of files from Mainframe. 
       # 
       os.environ['RXFILE'   ] =  ('None')    # 
Exemple #14
0
    def __init__(self):
        super(EmpBenefitMthly,self).__init__()
        self.landDir    = 'SrcFiles/employee'
        self.incFileSet = []    # Incoming Files. Contains full path name.
        self.incFiles   = []
        self.workFiles  = []    # Files that were moved to the working dir (ideally same than incSetFile). 
        
        self.RowCnt     = -1
        self.srcFile     = ('hp400jnm_sap.dat','hr503ril.dat','hrcoord5.csv')   # File that Informatica expects. Alphabetical.
        self.ib.fileName = r"'P.HP400JNM.SAP.DW.EXTRACT','P.HR503RIL',hrcoord5.csv"
        self.checkNextRunFlg  = False
        self.runWkfFlowFlg    = False
        
        self.fileDate   = ''          
        self.FILE_SET_LEN = 1   
        
        self.ts        =  su.getTimeSTamp()

        # Allowable commands for this application. Make sure to Set 
        self.cmdStep = { 'A' : self.getLock             ,
                         'B' : self.getTrigFiles        ,
                         'C' : self.mvTrigFileToArchDir ,
                         'D' : self.getFtpFiles         ,  # MF edwetl
                         'E' : self.getFtpFiles2        ,  # MF INFAHR
                         'F' : self.getFtpFiles3        ,  # sscbpbiamsql05
                         'G' : self.getIncSetFiles      ,
                         'H' : self.copyFilesWorkDir    ,
                         'I' : self.archFilesTS         ,
                         'J' : self.chkNextRunFlg       ,
                         'K' : self.procEmpBenefit      , 
                        }
        
        # Infa Environmental variables/
        self.infaEnvVar   = {
                'PMCMD'            : 'mg.pmcmd'           ,
                'INFA_USER'        : 'self.ib.rep_user'   ,
                'INFA_XPWD'        : 'self.ib.rep_xpwd'   ,
                'DOMAIN'           : 'self.ib.dom_name'   ,
                'INT_SERV'         : 'self.ib.IS'         , 
                'INFA_SHARE'       : 'self.ib.shareDir'   ,  
                'INFA_APP_CFG'     : 'self.ib.cfgDir'     ,   
                'INFA_APP_LCK'     : 'self.ib.lckDir'     ,   
                'INFA_APP_CTL'     : 'self.ib.ctlDir'     ,          
               }
        
        # FTP is expecting the following env variables, which should not be in a config file.
        # First Set of files from Mainframe. 
        # 
        os.environ['RXFILE'   ] =  ('None')    # 
Exemple #15
0
    def __init__(self):
        #_InfaBaseApp.__init__(self)
        super(SdlAribaDly,self).__init__()
        self.landDir    = 'SrcFiles/rdw_cp ariba'
        self.incFiles   = []                  # Incoming Files. Contains full path name.                 
        self.procFiles  = []                  # Files to process, that were moved to the working dir .(ideally same than incFiles). 
        self.workFiles  = []                  # Files that were moved to the working dir (ideally same than incFiles)
       
        # Mandatory Files.
        self.ib.srcFile    = ('InvoiceDetailExport.csv','InvoiceHeaderExport.csv','InvoiceSplitAccountingExport.csv','PurchaseOrderDetailExport.csv',
                              'PurchaseOrderExport.csv','PurchaseOrderSplitExport.csv','ReceiptAssetExport.csv','ReceiptDetailExport.csv',
                              'ReceiptHeaderExport.csv','Supplier_Export.csv','SupplierLocation_Export.csv')  # Sorted Files that Informatica expects
     
        # Optional Files if not found create a 0 byte file.
        self.ib.srcOptFile = ('Address_Load.csv','CommodityCodesExport.csv','PaymentBankExport.csv','PaymentDetailExport.csv',
                              'PaymentHeaderExport.csv','PaymentSplitAccountingExport.csv')

        self.ib.chkFiles   = []                 # To check Incoming file set.
        self.FILE_SET_LEN = len(self.ib.srcFile)
        
        self.checkNextRunFlg  = False
        self.runWkfFlowFlg    = False
        
        self.ts        =  su.getTimeSTamp()
        # Allowable commands for this application. Make sure to Set 
        self.cmdStep = { 'A' : self.getLock        ,
                         'B' : self.getMandFiles   ,  # self.ib.srcFile 
                         'C' : self.getOptFiles    ,
                         'D' : self.cpFileToWorkDir,  # Populates self.workFiles 
                         'E' : self.archFilesTS    ,  # Move files to archive
                         'F' : self.chkNextRunFlg  ,  # To verify if no cycle is missed. 
                         'G' : self.rWkfFlowFlg    ,  # To execute wkfl.
                         'H' : self.procIncFiles   , 
                         'I' : self.remWorkFiles   ,  # Remove Input Files from Working directory.
                        }
       
        # Infa Environmental variables/
        self.infaEnvVar   = {
                'PMCMD'            : 'mg.pmcmd'           ,
                'INFA_USER'        : 'self.ib.rep_user'   ,
                'INFA_XPWD'        : 'self.ib.rep_xpwd'   ,
                'DOMAIN'           : 'self.ib.dom_name'   ,
                'INT_SERV'         : 'self.ib.IS'         , 
                'INFA_SHARE'       : 'self.ib.shareDir'   ,  
                'INFA_APP_CFG'     : 'self.ib.cfgDir'     ,   
                'INFA_APP_LCK'     : 'self.ib.lckDir'     ,   
                'INFA_APP_CTL'     : 'self.ib.ctlDir'     ,             
               }
    def __init__(self):
        super(finExchRateCan,self).__init__()
        self.landDir    = 'SrcFiles/finance'
        self.incFileSet = []    # Incoming Files. Contains full path name.
        self.incFiles   = []
        self.workFiles  = []    # Files that were moved to the working dir (ideally same than incSetFile). 
        
        self.RowCnt      = -1
        self.srcFile  = ('can_xchg_rates.csv',)   # File that Informatica expects. Alphabetical.
        self.ib.fileName = 'CAN_EXCHANGE_RATES.csv'
        self.checkNextRunFlg  = False
        self.runWkfFlowFlg    = False
        
        self.fileDate   = ''          
        self.FILE_SET_LEN = 1   
        
        self.ts        =  su.getTimeSTamp()

        # Allowable commands for this application. Make sure to Set 
        self.cmdStep = { 'A' : self.getLock          ,
                         'B' : self.isWorkDayWarn    ,
                         'C' : self.getFtpFiles      ,
                         'D' : self.getIncFiles      ,
                         'E' : self.cpSrcToTgtFiles  ,
                         'F' : self.archFilesTS      ,
                         'G' : self.chkNextRunFlg    ,
                         'H' : self.procFinExchRate  , 
                      }
     
        # Infa Environmental variables/
        self.infaEnvVar   = {
                'PMCMD'            : 'mg.pmcmd'           ,
                'INFA_USER'        : 'self.ib.rep_user'   ,
                'INFA_XPWD'        : 'self.ib.rep_xpwd'   ,
                'DOMAIN'           : 'self.ib.dom_name'   ,
                'INT_SERV'         : 'self.ib.IS'         , 
                'INFA_SHARE'       : 'self.ib.shareDir'   ,  
                'INFA_APP_CFG'     : 'self.ib.cfgDir'     ,   
                'INFA_APP_LCK'     : 'self.ib.lckDir'     ,   
                'INFA_APP_CTL'     : 'self.ib.ctlDir'     ,          
               }
        
        # FTP is expecting the following env variables, which should not be in a config file.
        # First Set of files from Mainframe. 
        # 
        os.environ['FILE'     ] =  ('CAN_EXCHANGE_RATES.csv') 
        os.environ['RXFILE'   ] =  ('None')    # 
    def __init__(self):
        super(EmpLaborDistMthly,self).__init__()
        self.landDir    = 'SrcFiles/employee'
        self.incFileSet = []    # Incoming Files. Contains full path name.
        self.incFiles   = []
        self.workFiles  = []    # Files that were moved to the working dir (ideally same than incSetFile). 
        
        self.RowCnt     = -1
        self.srcFile     = ('hp580d40.dat','hr_lbr_distr.csv','hr_payroll_jobs_pos.csv')               # File that Informatica expects. Alphabetical.
        self.ib.fileName = r"'P.HP580D40',HR_Lbr_Distr.csv,Sales HR Payroll Jobs and Positions.csv"
        self.checkNextRunFlg  = False
        self.runWkfFlowFlg    = False
        
        self.fileDate   = ''          
        self.FILE_SET_LEN = 1   
        
        self.ts        =  su.getTimeSTamp()

        # Allowable commands for this application. Make sure to Set 
        self.cmdStep = { 'A' : self.getLock          ,
                         'B' : self.isWorkDayWarn    ,
                         'C' : self.getFtpFiles      ,
                         'D' : self.getFtpFiles2     ,
                         'E' : self.getIncSetFiles   ,
                         'F' : self.copyFilesWorkDir ,
                         'G' : self.archFilesTS      ,
                         'H' : self.chkNextRunFlg    ,
                         'I' : self.procEmpLaborDist , 
                      }
     
        # Infa Environmental variables/
        self.infaEnvVar   = {
                'PMCMD'            : 'mg.pmcmd'           ,
                'INFA_USER'        : 'self.ib.rep_user'   ,
                'INFA_XPWD'        : 'self.ib.rep_xpwd'   ,
                'DOMAIN'           : 'self.ib.dom_name'   ,
                'INT_SERV'         : 'self.ib.IS'         , 
                'INFA_SHARE'       : 'self.ib.shareDir'   ,  
                'INFA_APP_CFG'     : 'self.ib.cfgDir'     ,   
                'INFA_APP_LCK'     : 'self.ib.lckDir'     ,   
                'INFA_APP_CTL'     : 'self.ib.ctlDir'     ,          
               }
        
        # FTP is expecting the following env variables, which should not be in a config file.
        # First Set of files from Mainframe. 
        # 
        os.environ['RXFILE'   ] =  ('None')    # 
Exemple #18
0
 def __init__(self):
     super(VehMasterData,self).__init__()
     self.landDir    = 'SrcFiles/vehicle'
     self.incFileSet = []    # Incoming Files. Contains full path name.
     self.incFiles   = []
     self.workFiles  = []    # Files that were moved to the working dir (ideally same than incSetFile). 
     self.trigFiles  = []      # Incoming Trigger File.
     
     self.RowCnt     = -1
     self.ib.fileName = r"'P.PO230D15.VPODATA(0)'"
     self.checkNextRunFlg  = False
     self.runWkfFlowFlg    = False
     
     self.fileDate   = ''          
     self.FILE_SET_LEN = 1   
     
     self.ts        =  su.getTimeSTamp()
     # Allowable commands for this application. 
      
     # Allowable commands for this application
     self.cmdStep = { 'A' : self.getLock       ,
                      'B' : self.getTrigFiles  ,
                      'C' : self.wStgSAMCurr   ,
                      'D' : self.wStgSAMRefCDC ,
                      'E' : self.wStgSAMCDC    ,
                      'F' : self.wVMDStgRef    ,
                      'G' : self.wVMDStg       ,
                      'H' : self.wStgSAMPrev   ,
                      'I' : self.wVMDNRVTab    ,
                      'J' : self.wVMDNRVVinVal ,
                      'K' : self.wLoadETLCTRLAudit,
                      'L' : self.txDataFile    ,  
                      'M' : self.txTrigFile    ,                        
                     }
    
     # Infa Environmental variables/
     self.infaEnvVar   = {
             'PMCMD'            : 'mg.pmcmd'           ,
             'INFA_USER'        : 'self.ib.rep_user'   ,
             'INFA_XPWD'        : 'self.ib.rep_xpwd'   ,
             'DOMAIN'           : 'self.ib.dom_name'   ,
             'INT_SERV'         : 'self.ib.IS'         , 
             'INFA_SHARE'       : 'self.ib.shareDir'   ,  
             'INFA_APP_CFG'     : 'self.ib.cfgDir'     ,   
             'INFA_APP_LCK'     : 'self.ib.lckDir'     ,   
            }
Exemple #19
0
    def __init__(self):
        super(EmpBenefitonDem, self).__init__()
        self.landDir = "SrcFiles/employee"
        self.incFileSet = []  # Incoming Files. Contains full path name.
        self.incFiles = []
        self.workFiles = []  # Files that were moved to the working dir (ideally same than incSetFile).

        self.RowCnt = -1
        self.srcFile = ("hp400jnm_sap_dwext.dat", "hrcoord5.csv")  # File that Informatica expects. Alphabetical.
        self.ib.fileName = r"'P.HP400JNM.SAP.DW.EXTRACT',hrcoord5.csv"
        self.checkNextRunFlg = False
        self.runWkfFlowFlg = False

        self.fileDate = ""
        self.FILE_SET_LEN = 1

        self.ts = su.getTimeSTamp()

        # Allowable commands for this application. Make sure to Set
        self.cmdStep = {
            "A": self.getLock,
            "B": self.getFtpFiles,  # MF edwetl
            "C": self.getFtpFiles2,  # MF INFAHR
            "D": self.getIncSetFiles,
            "E": self.copyFilesWorkDir,
            "F": self.archFilesTS,
            "G": self.procEmpBenefit,
        }

        # Infa Environmental variables/
        self.infaEnvVar = {
            "PMCMD": "mg.pmcmd",
            "INFA_USER": "******",
            "INFA_XPWD": "self.ib.rep_xpwd",
            "DOMAIN": "self.ib.dom_name",
            "INT_SERV": "self.ib.IS",
            "INFA_SHARE": "self.ib.shareDir",
            "INFA_APP_CFG": "self.ib.cfgDir",
            "INFA_APP_LCK": "self.ib.lckDir",
            "INFA_APP_CTL": "self.ib.ctlDir",
        }

        # FTP is expecting the following env variables, which should not be in a config file.
        # First Set of files from Mainframe.
        #
        os.environ["RXFILE"] = "None"  #
Exemple #20
0
   def __init__(self):
       super(AssetPartEdi,self).__init__()
       self.landDir    = 'SrcFiles/asset'
       self.incFileSet = []    # Incoming Files. Contains full path name.
       self.incFiles   = []
       self.workFiles  = []    # Files that were moved to the working dir (ideally same than incSetFile). 
       
       self.RowCnt     = -1
 
       self.srcFile    = ('ei111d03.dat', 'ei112d02.dat','ei112d02_frtl_can.dat','ei112d02_mvprefrd.dat','ei112d02_mvprf_can.dat','ei112d02_nav_can.dat',)  # File that Informatica expects. Alphabetical.
       self.ib.fileName = r"'P.EI111D03.DATAW','P.EI114JBM.EI112D02.DATAW','P.EI114JBM.EI112D02.DATAW.FRTL.CAN','P.EI114JBM.EI112D02.DATAW.MVPREFRD','P.EI114JBM.EI112D02.DATAW.MVPRF.CAN','P.EI114JBM.EI112D02.DATAW.NAV.CAN'"
       
       self.FILE_SET_LEN = 1   
       
       self.ts        =  su.getTimeSTamp()
       # Allowable commands for this application. Make sure to Set 
       self.cmdStep = { 'A' : self.getLock          ,
                        'B' : self.isWorkDayWarn    ,
                        'C' : self.getFtpFiles      ,  # Sets self.incFileSet
                        'D' : self.getIncSetFiles   , 
                        'E' : self.copyFilesWorkDir ,
                        'F' : self.archFilesTS      ,
                        'G' : self.chkNextRunFlg    ,   
                        'H' : self.procAssetPartEDI ,           
                       }
      
       # Infa Environmental variables/
       self.infaEnvVar   = {
               'PMCMD'            : 'mg.pmcmd'           ,
               'INFA_USER'        : 'self.ib.rep_user'   ,
               'INFA_XPWD'        : 'self.ib.rep_xpwd'   ,
               'DOMAIN'           : 'self.ib.dom_name'   ,
               'INT_SERV'         : 'self.ib.IS'         , 
               'INFA_SHARE'       : 'self.ib.shareDir'   ,  
               'INFA_APP_CFG'     : 'self.ib.cfgDir'     ,   
               'INFA_APP_LCK'     : 'self.ib.lckDir'     ,   
               'INFA_APP_CTL'     : 'self.ib.ctlDir'     ,         
 
              }
       
       # FTP is expecting the following env variables, which should not be in a config file.
       #os.environ['FILE'     ] =  (r"\'P.PO870D30.WHOUSE.COMP.STD\'")    # 
       os.environ['FILE'     ] =  (r"\'P.EI111D03.DATAW\',\'P.EI114JBM.EI112D02.DATAW\',\'P.EI114JBM.EI112D02.DATAW.FRTL.CAN\',\'P.EI114JBM.EI112D02.DATAW.MVPREFRD\',\'P.EI114JBM.EI112D02.DATAW.MVPRF.CAN\',\'P.EI114JBM.EI112D02.DATAW.NAV.CAN\'")    # 
       os.environ['RXFILE'   ] =  ('None')    # 
   def __init__(self):
       super(VehSPOHistMthly,self).__init__()
       self.landDir    = 'SrcFiles/vehicle'
       self.incFileSet = []    # Incoming Files. Contains full path name.
       self.incFiles   = []
       self.workFiles  = []    # Files that were moved to the working dir (ideally same than incSetFile). 
       
       self.RowCnt     = -1
 
       self.srcFile = ('po436s10_detcu.dat','po436s10_pgeu1.dat','po436s10_pgeu2.dat','po436s10_pgeu3.dat','po436s10_rvdtu.dat','po436s10_spou.dat')     # File that Informatica expects. Alphabetical.
       self.ib.fileName = r"'P.PO436S10.DETCU(0)','P.PO436S10.PGEU1(0)','P.PO436S10.PGEU2(0)','P.PO436S10.PGEU3(0)','P.PO436S10.RVDTU(0)','P.PO436S10.SPOU(0)'"
       
       self.FILE_SET_LEN = 1   
       
       self.ts        =  su.getTimeSTamp()
       # Allowable commands for this application. Make sure to Set 
       self.cmdStep = { 'A' : self.getLock          ,
                        'B' : self.isWorkDayWarn    ,                        
                        'C' : self.getFtpFiles      ,  # Sets self.incFileSet
                        'D' : self.getIncSetFiles   , 
                        'E' : self.copyFilesWorkDir ,
                        'F' : self.archFilesTS      ,
                        'G' : self.procSPOHist      ,           
                       }
      
       # Infa Environmental variables/
       self.infaEnvVar   = {
               'PMCMD'            : 'mg.pmcmd'           ,
               'INFA_USER'        : 'self.ib.rep_user'   ,
               'INFA_XPWD'        : 'self.ib.rep_xpwd'   ,
               'DOMAIN'           : 'self.ib.dom_name'   ,
               'INT_SERV'         : 'self.ib.IS'         , 
               'INFA_SHARE'       : 'self.ib.shareDir'   ,  
               'INFA_APP_CFG'     : 'self.ib.cfgDir'     ,   
               'INFA_APP_LCK'     : 'self.ib.lckDir'     ,   
               'INFA_APP_CTL'     : 'self.ib.ctlDir'     ,         
 
              }
       
       # FTP is expecting the following env variables, which should not be in a config file.
       os.environ['FILE'     ] =  (r"\'P.PO436S10.DETCU(0)\',\'P.PO436S10.PGEU1(0)\',\'P.PO436S10.PGEU2(0)\',\'P.PO436S10.PGEU3(0)\',\'P.PO436S10.RVDTU(0)\',\'P.PO436S10.SPOU(0)\'")    # 
       os.environ['RXFILE'   ] =  ('None')    # 
Exemple #22
0
    def __init__(self):
        super(IMSSftyLoc, self).__init__()
        self.landDir = "SrcFiles/IMS"
        #        self.incFileSet = []    # Incoming Files. Contains full path name.
        #        self.workFiles  = []    # Files that were moved to the working dir (ideally same than incFiles).

        self.ib.fld = "IMS"
        self.ib.wkf = "wkf_IMS_sfty_dim_loc"
        self.ib.srcFile = ("ims_sfty_location.csv",)  # File that Informatica expects. Alphabetical.

        self.checkNextRunFlg = False
        self.verifyCSVFlg = False
        self.runWkfFlowFlg = False

        self.fileDate = ""
        self.ts = su.getTimeSTamp()

        # Allowable commands for this application. Make sure to Set
        self.cmdStep = {
            "A": self.getLock,
            "B": self.chkIncFilesWarn,  # Wrapper for getIncFiles. Populates self.incSetFiles. Incoming Files.
            "C": self.cpFileToWorkDir,  # Populates self.workFiles
            "D": self._archFiles,  # ARCH and Moves files.
            "E": self.chkNextRunFlg,
            "F": self.verCSVFlg,  # Verify CSV contents, columns
            "G": self.procIncFiles,
        }

        # Infa Environmental variables/
        self.infaEnvVar = {
            "PMCMD": "mg.pmcmd",
            "INFA_USER": "******",
            "INFA_XPWD": "self.ib.rep_xpwd",
            "DOMAIN": "self.ib.dom_name",
            "INT_SERV": "self.ib.IS",
            "INFA_SHARE": "self.ib.shareDir",
            "INFA_APP_CFG": "self.ib.cfgDir",
            "INFA_APP_LCK": "self.ib.lckDir",
            "INFA_APP_CTL": "self.ib.ctlDir",
        }
    def __init__(self):
        super(BeerStCodeOvrd,self).__init__()
        self.landDir    = 'SrcFiles/BeerStore'
#        self.incFileSet = []    # Incoming Files. Contains full path name.
#        self.workFiles  = []    # Files that were moved to the working dir (ideally same than incFiles). 
        
        self.ib.fld     = 'BeerStore'
        self.ib.wkf     = 'wkf_elctr_inv_trdng_prtnr_maint_cd_ovrrd'    
        self.ib.srcFile = ( 'PMCodeOverride.csv',)    # File that Informatica expects. Alphabetical.
             
        self.checkNextRunFlg  = False
        self.verifyCSVFlg     = False
        self.runWkfFlowFlg    = False
        
        self.fileDate   = ''   
        self.ts        =  su.getTimeSTamp()

        # Allowable commands for this application. Make sure to Set 
        self.cmdStep = { 'A' : self.getLock          ,
                         'B' : self.chkIncFilesWarn  ,  # Wrapper for getIncFiles. Populates self.incSetFiles. Incoming Files.
                         'C' : self.cpFileToWorkDir  ,  # Populates self.workFiles
                         'D' : self._archFiles        ,  # ARCH and Moves files.
                         'F' : self.verCSVFlg        ,  # Verify CSV contents, columns
                         'G' : self.procIncFiles     ,     
                        }
       
        # Infa Environmental variables/
        self.infaEnvVar   = {
                'PMCMD'            : 'mg.pmcmd'           ,
                'INFA_USER'        : 'self.ib.rep_user'   ,
                'INFA_XPWD'        : 'self.ib.rep_xpwd'   ,
                'DOMAIN'           : 'self.ib.dom_name'   ,
                'INT_SERV'         : 'self.ib.IS'         , 
                'INFA_SHARE'       : 'self.ib.shareDir'   ,  
                'INFA_APP_CFG'     : 'self.ib.cfgDir'     ,   
                'INFA_APP_LCK'     : 'self.ib.lckDir'     ,   
                'INFA_APP_CTL'     : 'self.ib.ctlDir'     ,         
               }
Exemple #24
0
    def checkFileCols(self,flst,FLD_SEP,strp=' \t\n\r'):
        rc = 0
        for fnp in flst:
            bfnm   = fu.getFileBaseName(fnp)  
            colc   = self.ib.FileColCnt.get(bfnm)
            self.log.debug('fkey = %s colc= %s fp = %s ' %(bfnm,colc,fnp))
            if colc is not None:
                    x,b = fu.readCSV(fnp,colc,FLD_SEP,strp)
                    if len(b) < 1 : 
                        self.log.debug('Columns number [%d] match on file %s ' % (colc,fnp)) 
                    else :
                        rc += 1         
                        badf = '%s/%s%s.bad' % (self.ib.badDir,bfnm,su.getTimeSTamp())
                        f = fu.createFile(badf,b)
                        if f == 0 : self.log.error('Columns number (%d) did not match on %s.\nPlease see Bad file %s .' % (colc,fnp,badf))
                        else      :
                            self.log.error('Columns number (%d) did not match on %s.\n.COULD NOT  create file  %s .' % (colc,fnp,badf))
                            self.log.error('BAD Rows===========\n', b)     
            else:
                rc += 1
                self.log.error("Did not find Column Count for %s. Unable to verify Column Numbers !" % bfnm)   

        return rc
Exemple #25
0
    def __init__(self):
        super(VehOrdStatWkly, self).__init__()
        self.landDir = "SrcFiles/vehicle"
        self.incFileSet = []  # Incoming Files. Contains full path name.
        self.incFiles = []
        self.workFiles = []  # Files that were moved to the working dir (ideally same than incSetFile).
        self.trigFiles = []  # Incoming Trigger File.

        self.RowCnt = -1
        self.checkNextRunFlg = False
        self.runWkfFlowFlg = False

        self.fileDate = ""
        self.FILE_SET_LEN = 1

        self.ts = su.getTimeSTamp()
        # Allowable commands for this application. Make sure to Set
        self.cmdStep = {
            "A": self.getLock,
            "B": self.chkNextRunFlg,
            "C": self.getTrigFiles,
            "D": self.verTrigFileDate,
            "E": self.procVehOSWkly,
        }

        # Infa Environmental variables/
        self.infaEnvVar = {
            "PMCMD": "mg.pmcmd",
            "INFA_USER": "******",
            "INFA_XPWD": "self.ib.rep_xpwd",
            "DOMAIN": "self.ib.dom_name",
            "INT_SERV": "self.ib.IS",
            "INFA_SHARE": "self.ib.shareDir",
            "INFA_APP_CFG": "self.ib.cfgDir",
            "INFA_APP_LCK": "self.ib.lckDir",
            "INFA_APP_CTL": "self.ib.ctlDir",
        }
Exemple #26
0
    def __init__(self):
        #_InfaBaseApp.__init__(self)
        super(ProcElectBill,self).__init__()

        self.landDir   = 'SrcFiles'
        self.ebFilestoProc  = []                           # Ebill Text Files to Process. Send to provider.
        self.ebFilesRecv    = []                           # Ebill Files Received from provider (xml and pdf.
        self.cdrFilestoGet  = []                           # CDR Files to get from provider based on sent docs.
        self.cdrZipFiles    = []                           # CDR Zip Files to Process, Incoming from Sunat.
        self.cdrFilestoProc = []                           # CDR Uncompress Files to Process, Incoming from Sunat.
        self.ts             =  su.getTimeSTamp()
        
        # Allowable commands for this application
        self.cmdStep = { 'A' : self.getLock          ,
                         'B' : self.getBillsToProc   ,
                         'C' : self.trimBillBlank    , 
                         'D' : self.procBillFiles    ,
                         'E' : self.mvBillFiles      ,
                         'F' : self.getCDRToProc     ,
                         'G' : self.trimCDRBlank     ,
                         'H' : self.getCDRfromVendor ,
                         'I' : self.getZipCDRToProc  ,
                         'J' : self.unzipCDRFiles    ,
                         'K' : self.getXMLtoProcess  ,
                         'L' : self.procXMLFiles     ,
                       }

 
        # Infa Environmental variables/
        self.infaEnvVar   = {
                'CFG_FILE'        : 'self.ib.configFile' ,  
                'INFA_SHARE'      : 'self.ib.shareDir'   ,  
                'INFA_SCRIPT'     : 'self.ib.scriptDir'  ,
                'INFA_PROV_DATA'  : 'self.ib.provData'   ,
                'INFA_APP_CFG'    : 'self.ib.cfgDir'     ,   
                'INFA_APP_LCK'    : 'self.ib.lckDir'     ,   
               }
Exemple #27
0
    def __init__(self):
        super(EmpHeadCnt,self).__init__()
        self.landDir    = 'SrcFiles/employee'
        self.incFileSet = []    # Incoming Files. Contains full path name.
        self.incFiles   = []
        self.workFiles  = []    # Files that were moved to the working dir (ideally same than incSetFile). 
        
        self.RowCnt     = -1
        self.checkNextRunFlg  = False
        
        self.fileDate   = ''          
        self.FILE_SET_LEN = 1   
        
        self.ts        =  su.getTimeSTamp()

        # Allowable commands for this application. Make sure to Set 
        self.cmdStep = { 'A' : self.getLock             ,
                         'B' : self.getTrigFiles        ,
                         'C' : self.mvTrigFileToArchDir ,
                         'D' : self.chkNextRunFlg       ,
                         'E' : self.procEmpHeadCnt      , 
                         'N' : self.notifyUsers         ,
                        }
        
        # Infa Environmental variables/
        self.infaEnvVar   = {
                'PMCMD'            : 'mg.pmcmd'           ,
                'INFA_USER'        : 'self.ib.rep_user'   ,
                'INFA_XPWD'        : 'self.ib.rep_xpwd'   ,
                'DOMAIN'           : 'self.ib.dom_name'   ,
                'INT_SERV'         : 'self.ib.IS'         , 
                'INFA_SHARE'       : 'self.ib.shareDir'   ,  
                'INFA_APP_CFG'     : 'self.ib.cfgDir'     ,   
                'INFA_APP_LCK'     : 'self.ib.lckDir'     ,   
                'INFA_APP_CTL'     : 'self.ib.ctlDir'     ,          
               }
Exemple #28
0
    def wFinDetail(self):
        
        # Update State File, for next run. Wkf has a final command task that wilol UPdate the file to RUN.
        # If cmd task does not ran we know wkf is not successful and should not start.
        
        fn = '%s/%s.state' % (self.ib.ctlDir, self.appName)
        dt = '%s-EXECUTING' % su.getTimeSTamp('%d%02d%02d:%02d:%02d')
        self.log.debug("fn = %s Updating TO ==> dt = %s" % (fn,dt))
        rc = fu.updFile(fn,dt)
        self.log.info('Updating state returned %s' % rc)
        cmd = '%s/pstate.sh findetailmf  EXECUTING' % self.ib.appDir
        p.runSync(cmd,self.log)

        
        # Start WKF execution
        self.ib.fld     = 'Financial'
        self.ib.wkf     = 'wkf_FIN_DETAIL'
        
        rc = pi.runWkflWait(self.ib,self.log) 
        if rc != 0 : 
            self.log.error('Running  %s.%s rc = %s' % (self.ib.fld,self.ib.wkf,rc))
        else : 
            self.log.info('Running  %s.%s rc = %s' % (self.ib.fld,self.ib.wkf,rc))
        return rc
Exemple #29
0
 def archTgtFiles(self):
     self.ib.archDir = '%s/%s/%s' % (self.ib.shareDir, self.tgtDir,self.ib.archDirName)
     fls = ('%s/%s/%s' % (self.ib.shareDir,self.tgtDir ,self.tgtFiles[0]),)
     return self.archGenFiles(fls,su.getTimeSTamp())
Exemple #30
0
    def __init__(self):
        super(TalentMap, self).__init__()
        self.landDir = "SrcFiles/talentmap"
        self.incFileSet = []  # Incoming Files. Contains full path name.
        self.workFiles = []  # Files that were moved to the working dir (ideally same than incFiles).

        self.RowCnt = -1
        self.ib.fld = "TalentMap"
        self.ib.wkf = "wkf_talentMap"
        self.ib.srcFile = (
            "All_Training.txt",
            "All_Training_Providers.txt",
            "Transcripts_OpsRegion_Canada.txt",
            "Transcripts_OpsRegion_Central.txt",
            "Transcripts_OpsRegion_Northeast.txt",
            "Transcripts_OpsRegion_Southeast.txt",
            "Transcripts_OpsRegion_West.txt",
        )  # File that Informatica expects. Alphabetical.
        self.ib.FileColCnt = {
            "All_Training.txt": 12,
            "All_Training_Providers.txt": 2,
            "Transcripts_OpsRegion_Canada.txt": 18,
            "Transcripts_OpsRegion_Central.txt": 18,
            "Transcripts_OpsRegion_Northeast.txt": 18,
            "Transcripts_OpsRegion_Southeast.txt": 18,
            "Transcripts_OpsRegion_West.txt": 18,
            "Tops_Plan_Current.csv": 13,
            "FMS_Qualifications.csv": 8,
        }
        self.ib.opsRegHdrRow = ""

        self.fileDate = ""
        self.FILE_SET_LEN = 4
        self.procCort = {}
        self.procBuReg = {}

        self.renameFtpFilesTgtFlg = False

        self.ts = su.getTimeSTamp()
        # Allowable commands for this application. Make sure to Set
        self.cmdStep = {
            "A": self.getLock,
            "B": self.renFtpFilesTgtFlg,
            "C": self.getTMapftpFiles,  # FTP Files based on regex.
            "D": self.getIncSetFiles,  # Populates self.incSetFiles. Incoming Files.
            "E": self.setIncFilePvt,  # Run after setting self.incFiles
            "F": self.cpFileToWorkDir,  # Copies FileSet and sets self.workFiles (full path)
            "G": self.archFiles,
            "H": self.chkFileColsFlg,
            "I": self.preProcTMapFiles,  # Check that headers/record count, number of fields.
            "J": self.procTMapFiles,
            "K": self.procCustFiles,
            "L": self.crtTrigFile,
            "M": self.wkfTalentMapProc,
        }
        # Infa Environmental variables/
        self.infaEnvVar = {
            "PMCMD": "mg.pmcmd",
            "INFA_USER": "******",
            "INFA_XPWD": "self.ib.rep_xpwd",
            "DOMAIN": "self.ib.dom_name",
            "INT_SERV": "self.ib.IS",
            "INFA_SHARE": "self.ib.shareDir",
            "INFA_APP_CFG": "self.ib.cfgDir",
            "INFA_APP_LCK": "self.ib.lckDir",
            "INFA_APP_CTL": "self.ib.ctlDir",
        }

        self.fnd = su.getTodayDtStr("%m_%d_%Y")
        # FTP is expecting the following env variables, which should not be in a config file.
        # os.environ['RXFILE'   ] =  '.*_[0-9]*_[0-9]*_[0-9]*_[0-9]*_[0-9]*_[0-9]*.TXT'  # data file(s). Use for MGET
        os.environ["FILE"] = "Name of control file"  # data file(s). Use for GET
        os.environ["RXFILE"] = (
            "Transcripts_OpsRegion_.*_[0-9]*_%s_[0-9]*_[0-9]*.TXT" % self.fnd
        )  # data file(s). Use for MGET
Exemple #31
0
 def archFiles(self):
     return self.archGenFiles(self.incFiles, su.getTimeSTamp())