".$path_output."/uiu_tares.".$nomeFornitura.".dat"; passthru($comand_schede, $result); $result = 0; $comand_schede ="awk -F '|' -f ".$path_awk."/identificativi_uiu_tares.awk ".$path_input."/".$file_pl; $comand_schede.=" > ".$path_output."/identificativi_uiu_tares.".$nomeFornitura.".dat"; passthru($comand_schede, $result); $result = 0; $comand_schede ="awk -F '|' -f ".$path_awk."/indirizzi_tares.awk ".$path_input."/".$file_pl; $comand_schede.=" > ".$path_output."/indirizzi_tares.".$nomeFornitura.".dat"; passthru($comand_schede, $result); $result = 0; $comand_schede ="awk -F '|' -f ".$path_awk."/dati_metrici_tares.awk ".$path_input."/".$file_pl; $comand_schede.=" > ".$path_output."/dati_metrici_tares.".$nomeFornitura.".dat"; passthru($comand_schede, $result); $result = 0; $comand_schede ="awk -F '|' -f ".$path_awk."/soggetti_tares_pf.awk ".$path_input."/".$file_pl; $comand_schede.=" > ".$path_output."/soggetti_tares_pf.".$nomeFornitura.".dat"; passthru($comand_schede, $result); $result = 0; $comand_schede ="awk -F '|' -f ".$path_awk."/soggetti_tares_pnf.awk ".$path_input."/".$file_pl; $comand_schede.=" > ".$path_output."/soggetti_tares_pnf.".$nomeFornitura.".dat"; passthru($comand_schede, $result); //TODO PROVO A PARSIFICARE I DATI NUOVI NON RELATIVI AGLI INDIRIZZI $result = 0; $comand_schede ="awk -F '|' -f ".$path_awk."/dati_nuovi_tares.awk ".$path_input."/".$file_pl; $comand_schede.=" > ".$path_output."/dati_nuovi_tares.".$nomeFornitura.".dat"; passthru($comand_schede, $result); } $arrCod = getCodComSezFile($path_output."/uiu_tares.".$nomeFornitura.".dat"); $arrCod['sez'] = ''; $codCom = $arrCod['codcom']; $codSez = $arrCod['sez']; $ti07_codstato = ''; list($err,$arrTi07Prot)= getSelectProtocollo ( $conn, array( 'codcom' => $codCom, 'sez' => $codSez, 'tipocatasto' => 'F' ) ); $ti07_protocollo_staging = getTaresProt($arrTi07Prot); //controllo validita data fornitura if ($err == 'NODATA' || $ti07_protocollo_staging == '') { //nuova funzione inserimento protocollo staging $arrPrm =array( 'keycom' => $codCom, 'keysez' => $codSez, 'periodo_da' => '', 'periodo_a' => $dataOracle, 'tipo_fornitura' => 'E', 'tipo_processo' => 'F', 'nome_fornitura' => $nomeFornitura ); $arrNewStag = newStag($conn,$arrPrm); if ($arrNewStag['err'] == '') { $err = $arrNewStag['err']; $numProt = $arrNewStag['protocollo']; $ti07_protocollo_staging = $arrNewStag['protocollo_stag']; $ti07_tipo_fornitura = $arrNewStag['tipo_fornitura']; $ti07_periodo_da = $arrNewStag['periodo_da']; $ti07_periodo_a = $arrNewStag['periodo_a']; } else { jError('E011',$err,0); js_redirect ("LSTV_file_frame.php"); exit(); } $arrArgErrlog = array( 'TCW17_STEP' => 1, 'TCW17_DESCR_ERR' => 'IMPDBERR', 'TCW17_LAST_RECORD' => 1, 'TCW17_DATE' => $dataOracle, 'TCW17_PROTOCOLLO' => $ti07_protocollo_staging); unset($err); $err = insetTcw17_errlog($conn,$arrArgErrlog); if($err != '') { jError('E008',$err,1); } } elseif($err != '') { //errore db jError('E001',$err,1); }else { $tabelle_vuote = isEmpty_table($conn,$ti07_protocollo_staging,3); unset($arrTcw17); $arrTcw17 = getTcw17_errlog($conn,$ti07_protocollo_staging); if (!isset($arrTcw17['err'])) { $arrtmp = returnLastErrLog($arrTcw17); $cod_tabella = $arrTcw17[0]['TCW17_STEP']; $cod_err = $arrTcw17[0]['TCW17_DESCR_ERR']; $rec_err = $arrTcw17[0]['TCW17_LAST_RECORD']; $date_err = $arrTcw17[0]['TCW17_DATE']; } elseif($arrTcw17['err'] != 'NODATA') { jError($arrTcw17['err'],$arrTcw17['message'],1); } $flagDelete = protIsDeleted($conn,$ti07_protocollo_staging); if ($flagDelete) { $agg_errore_del ="UPDATE tcw17_errlog SET TCW17_DESCR_ERR = 'IMPDBERR',TCW17_DATE=$form_data"; $agg_errore_del .=" WHERE TCW17_DESCR_ERR='IMPDBDELETE' and tcw17_protocollo = $ti07_protocollo_staging"; list ($stmt, $ocierr) = exec_sql($conn, $agg_errore_del,1); } //richiesto ripristino 1 //ripristino effettuato 2 if ($ripristina_staging == 1) { //stringhe SQL $stringa_lancio_ripristino ="LSTV_tares.php?gl_ripr=1&ripristino=1&awk=1"; $stringa_lancio_ripristino .="&ripristina_staging=2&num_file_input=$cod_tabella"; $stringa_lancio_ripristino .="&num_rec=$rec_err&ti07_protocollo_staging=$ti07_protocollo_staging"; $stringa_lancio_ripristino .="&fileselected=$req_fileselected"; $agg_errore_del="UPDATE tcw17_errlog SET TCW17_DESCR_ERR = 'IMPDBDELETE',"; $agg_errore_del .="TCW17_DATE=$form_data WHERE TCW17_DESCR_ERR='IMPDBERR'"; $agg_errore_del .=" and tcw17_protocollo = $ti07_protocollo_staging"; //28/05/2004 12.33 AGGIUNTO PROTOCOLLO STAGING $agg_errore_rip="UPDATE tcw17_errlog SET TCW17_DESCR_ERR = 'IMPDBRIPR',"; $agg_errore_rip.=" TCW17_DATE=$form_data WHERE TCW17_DESCR_ERR='IMPDBERR'"; $agg_errore_rip.=" and tcw17_protocollo = $ti07_protocollo_staging"; //28/05/2004 12.33 AGGIUNTO PROTOCOLLO STAGING $new_rec_err="insert into tcw17_errlog values "; $new_rec_erri.="($cod_tabella,'IMPDBERR', $rec_err,$form_data,$ti07_protocollo_staging)"; ?>

Impianto DB - STAGING


Intervallo Record in elaborazione:     

________________________________________________________________

Tabelle staging:
Tabella evidenziata in corso di elaborazione