DEFINITION Vrai_660003959 1
DEFINITION Faux_660003959 0
DEFINITION NUMTAB_660003959 1
DEFINITION ZONEMETRO_660003959 7
DEFINITION MODULE_DISTR_660003959 0xA000
DEFINITION ERR_DUPL_660003959 0x0D0
DEFINITION EFFICACE_660003959 0x01
DEFINITION STCK_KO_660003959 0x00
DEFINITION FORMAT_ECC_660003959 "Format_ECC"
DEFINITION ERR_DISTR_660003959 0x110
DEFINITION TD_Imsi_660003959 0x00
REGISTRE ENTIER gmt_date_cra_660003959
REGISTRE ENTIER erreur_660003959
REGISTRE ENTIER code_rejet_660003959
REGISTRE ENTIER indice_660003959
REGISTRE ENTIER indice2_660003959
REGISTRE ENTIER date_fin_660003959
REGISTRE ENTIER date_cra_660003959
REGISTRE ENTIER res_660003959
REGISTRE ENTIER ic_network_660003959
REGISTRE ENTIER ic_dataVolumeIN_660003959
REGISTRE ENTIER ic_dataVolumeOU_660003959
REGISTRE ENTIER ic_RecEntType_660003959
REGISTRE ENTIER ic_RecEntId_660003959
REGISTRE ENTIER ic_charge_660003959
REGISTRE ENTIER ic_chargeable_660003959
REGISTRE ENTIER ic_charged_660003959
REGISTRE ENTIER ic_useQosDelay_660003959
REGISTRE ENTIER ic_useQosMeanput_660003959
REGISTRE ENTIER ic_useQosPeakput_660003959
REGISTRE ENTIER ic_useQosPrecdnc_660003959
REGISTRE ENTIER ic_useQosReliabl_660003959
REGISTRE ENTIER ic_gprsUsageTime_660003959
REGISTRE ENTIER ic_gprsUTCOfCode_660003959
REGISTRE ENTIER val_ttCallDuration_660003959
REGISTRE ENTIER val_champ_660003959
REGISTRE ENTIER val_charge_660003959
REGISTRE ENTIER val_RecEntType_660003959
REGISTRE ENTIER val_PdpType_660003959
REGISTRE ENTIER val_causeTerm_660003959
REGISTRE ENTIER val_typeCtrlNode_660003959
REGISTRE ENTIER val_locationArea_660003959
REGISTRE ENTIER val_charginID_660003959
REGISTRE ENTIER val_cellID_660003959
REGISTRE ENTIER val_netIniPDPCtxt_660003959
REGISTRE ENTIER val_useQosDelay_660003959
REGISTRE ENTIER val_useQosMeanput_660003959
REGISTRE ENTIER val_useQosPeakput_660003959
REGISTRE ENTIER val_useQosPrecdnc_660003959
REGISTRE ENTIER val_useQosReliabl_660003959
REGISTRE ENTIER val_gprsUTCOfCode_660003959
REGISTRE ENTIER SGSNAddress_OK_660003959
REGISTRE ENTIER useQosDelay_OK_660003959
REGISTRE ENTIER useQosMeanput_OK_660003959
REGISTRE ENTIER useQosPeakput_OK_660003959
REGISTRE ENTIER useQosPrecdnc_OK_660003959
REGISTRE ENTIER useQosReliabl_OK_660003959
REGISTRE ENTIER dataVolumeIN_OK_660003959
REGISTRE ENTIER dataVolumeOU_OK_660003959
REGISTRE ENTIER gprsUsageTime_OK_660003959
REGISTRE ENTIER gprsUTCOfCode_OK_660003959
REGISTRE ENTIER PREMIER_SGSNAddress_IPV6_660003959
REGISTRE ENTIER SGSNAddress_IPV6_660003959
REGISTRE ENTIER GGSNAddress_OK_660003959
REGISTRE ENTIER GGSNAddress_IPV6_660003959
REGISTRE ENTIER PDPAddress_IPV6_660003959
REGISTRE ENTIER nb_SGSNAddress_IPV6_660003959
REGISTRE ENTIER UTCOffcode_660003959
REGISTRE ENTIER chargeSM_00_660003959
REGISTRE ENTIER instECC_660003959
REGISTRE ENTIER instanceECC_660003959
REGISTRE ENTIER nombreECC_660003959
REGISTRE ENTIER instMSFDCH_660003959
REGISTRE ENTIER instNVDDCH_660003959
REGISTRE ENTIER instFEDCH_660003959
REGISTRE ENTIER instVDIDCH_660003959
REGISTRE ENTIER instOLADCH_660003959
REGISTRE ENTIER instOL2DCH_660003959
REGISTRE ENTIER instOL3DCH_660003959
REGISTRE ENTIER instOR5DCH_660003959
REGISTRE ENTIER instCMODCH_660003959
REGISTRE ENTIER instM1GDCH_660003959
REGISTRE ENTIER instCOMDCH_660003959
REGISTRE ENTIER instFRCDCH_660003959
REGISTRE ENTIER instNVCDCH_660003959
REGISTRE ENTIER b_COMESI_660003959
REGISTRE ENTIER FILTRE_TYPE_80_660003959
REGISTRE ENTIER b_Filtrage_MMSsortant_660003959
REGISTRE ENTIER b_Filtrage_nonMMSortant_660003959
REGISTRE ENTIER TYPE_82_660003959
REGISTRE ENTIER TYPE_84_660003959
REGISTRE ENTIER TYPE_86_660003959
REGISTRE ENTIER TYPE_88_660003959
REGISTRE ENTIER TYPE_88_1_660003959
REGISTRE ENTIER TYPE_88_2_660003959
REGISTRE ENTIER TYPE_88_3_660003959
REGISTRE ENTIER longInteger1_L_660003959
REGISTRE ENTIER longInteger2_L_660003959
REGISTRE ENTIER val_qosDelay1_660003959
REGISTRE ENTIER val_qosMeanThrput1_660003959
REGISTRE ENTIER val_qosPeakThrput1_660003959
REGISTRE ENTIER val_qosPrecedence1_660003959
REGISTRE ENTIER val_qosReliablity1_660003959
REGISTRE ENTIER CORIOLIS_660003959
REGISTRE ENTIER DISE_Entreprise_660003959
REGISTRE ENTIER MVNO_postpaid_660003959
REGISTRE ENTIER MVNO_prepaye_660003959
REGISTRE ENTIER app_dest_660003959
REGISTRE ENTIER b_FILTRE_tabExt_DchApnTrt_660003959
REGISTRE ENTIER b_FE_Eligible_COME_660003959
REGISTRE POINTEUR pt_IMSI_660003959
REGISTRE POINTEUR pt_Min_DCB_660003959
REGISTRE POINTEUR pt_PDPAddress_660003959
REGISTRE POINTEUR pt_RemotePDPAddress_660003959
REGISTRE POINTEUR pt_Address_660003959
REGISTRE POINTEUR pt_terme_660003959
REGISTRE POINTEUR pt_ic_dataVolumeIN_660003959
REGISTRE POINTEUR pt_ic_dataVolumeOU_660003959
REGISTRE POINTEUR pt_ic_RecEntType_660003959
REGISTRE POINTEUR pt_ic_RecEntId_660003959
REGISTRE POINTEUR pt_ic1_charge_660003959
REGISTRE POINTEUR pt_ic2_charge_660003959
REGISTRE POINTEUR pt_ic3_charge_660003959
REGISTRE POINTEUR pt_ic_charge_660003959
REGISTRE POINTEUR pt_ic_useQosDelay_660003959
REGISTRE POINTEUR pt_ic_useQosMeanput_660003959
REGISTRE POINTEUR pt_ic_useQosPeakput_660003959
REGISTRE POINTEUR pt_ic_useQosReliabl_660003959
REGISTRE POINTEUR pt_ic_gprsUsageTime_660003959
REGISTRE POINTEUR pt_ic_gprsUTCOfCode_660003959
REGISTRE POINTEUR pt_ic_UsedQoSDelay_660003959
REGISTRE POINTEUR pt_ic_UsedQoSMean_660003959
REGISTRE POINTEUR pt_ic_UsedQoSPeak_660003959
REGISTRE POINTEUR pt_ic_UsedQoSPrec_660003959
REGISTRE POINTEUR pt_ic_UsedQoSRelia_660003959
REGISTRE POINTEUR pt_ic_DataVolumeInc_660003959
REGISTRE POINTEUR pt_ic_DataVolumeOut_660003959
REGISTRE POINTEUR pt_ic_GPRS_UsageTp_660003959
REGISTRE POINTEUR pt_ic_useQosPrecdnc_660003959
REGISTRE POINTEUR pt_ic_UTC_Time_Off_660003959
REGISTRE POINTEUR pt_indice_660003959
REGISTRE POINTEUR pt_RecEntId_660003959
REGISTRE POINTEUR pt_ChargedItem_660003959
REGISTRE POINTEUR pt_ttCallDuration_660003959
REGISTRE POINTEUR pt_resultat_660003959
REGISTRE POINTEUR pt_chargeType_660003959
REGISTRE POINTEUR pt_PdpType_660003959
REGISTRE POINTEUR pt_typeCtrlNode_660003959
REGISTRE POINTEUR pt_causeTerm_660003959
REGISTRE POINTEUR pt1_causeTerm_660003959
REGISTRE POINTEUR pt_charginID_660003959
REGISTRE POINTEUR pt_locationArea_660003959
REGISTRE POINTEUR pt_cellID_660003959
REGISTRE POINTEUR pt1_netIniPDPCtxt_660003959
REGISTRE POINTEUR pt_netIniPDPCtxt_660003959
REGISTRE POINTEUR pt_localDatePtr_660003959
REGISTRE POINTEUR pt_localDateRes_660003959
REGISTRE POINTEUR pt_acesPointNamNI_660003959
REGISTRE POINTEUR pt_acesPointNameOI_660003959
REGISTRE POINTEUR pt_IMEI_660003959
REGISTRE POINTEUR pt_SGSNAddress_IPV6_660003959
REGISTRE POINTEUR pt_GGSNAddress_IPV6_660003959
REGISTRE POINTEUR pt_gprsUsageTime_660003959
REGISTRE POINTEUR pt_useQosDelay_660003959
REGISTRE POINTEUR pt_useQosMeanput_660003959
REGISTRE POINTEUR pt_useQosPeakput_660003959
REGISTRE POINTEUR pt_useQosReliabl_660003959
REGISTRE POINTEUR pt_useQosPrecdnc_660003959
REGISTRE POINTEUR ptval_dataVolumeOU_660003959
REGISTRE POINTEUR ptval_dataVolumeIN_660003959
REGISTRE POINTEUR ptval_TotalDataVolOut_660003959
REGISTRE POINTEUR ptval_TotalDataVolInc_660003959
REGISTRE POINTEUR ptsom_TotalUPDown_660003959
REGISTRE POINTEUR pt_TYPE_88_1_660003959
REGISTRE POINTEUR pt_TYPE_88_2_660003959
REGISTRE POINTEUR pt_TYPE_88_3_660003959
REGISTRE POINTEUR pt_longInteger1_660003959
REGISTRE POINTEUR pt_longInteger2_660003959
REGISTRE POINTEUR pt_qosDelay1_660003959
REGISTRE POINTEUR pt_qosMeanThrput1_660003959
REGISTRE POINTEUR pt_qosPeakThrput1_660003959
REGISTRE POINTEUR pt_qosPrecedence1_660003959
REGISTRE POINTEUR pt_qosReliablity1_660003959
REGISTRE POINTEUR pt_ic1_chargeable_660003959
REGISTRE POINTEUR pt_ic2_chargeable_660003959
REGISTRE POINTEUR pt_ic3_chargeable_660003959
REGISTRE POINTEUR pt_ic_chargeable_660003959
REGISTRE POINTEUR pt_chargeableMB_660003959
REGISTRE POINTEUR pt_chargeable_660003959
REGISTRE POINTEUR pt_ic1_charged_660003959
REGISTRE POINTEUR pt_ic2_charged_660003959
REGISTRE POINTEUR pt_ic3_charged_660003959
REGISTRE POINTEUR pt_ic_charged_660003959
REGISTRE POINTEUR pt_chargedMB_660003959
REGISTRE POINTEUR pt_charged_660003959
REGISTRE POINTEUR pt_seuilVolGPRS_660003959
REGISTRE POINTEUR pt_TotalDataVol_660003959
REGISTRE POINTEUR pt_chargeableSM_00_660003959
REGISTRE POINTEUR pt_chargedSM_00_660003959
REGISTRE POINTEUR ptval_charged_660003959
REGISTRE POINTEUR ptval_chargeable_660003959
REGISTRE POINTEUR pt_LibelleAlarme_660003959
REGISTRE POINTEUR pt_NameOfFile_660003959
REGISTRE POINTEUR ptchp_format_660003959
REGISTRE ENTIER IMSI_Transnational_M2M_660003959
REGISTRE ENTIER REDIST_IMSI_Transnational_M2M_660003959
REGISTRE POINTEUR pt_MCCMNCx_660003959
REGISTRE POINTEUR pt_IMSIy_660003959
REGISTRE POINTEUR str_conteneur_660003959
REGISTRE POINTEUR ptr_res_660003959
REGISTRE POINTEUR pt_buf1_660003959
###########################################################################################################
#  - Pcode du module de distribution : CRAE GPRS article : Tcrae_gprs
#  - creation le 06/10/2006
#  - Auteur : SDX
#
#  Ttapin80, Ttapin82, Ttapin84, Ttapin86, Ttapin88
#  g_iartin  : Tcrae_gprs
#  g_iartout  = TAP2++, Ttapin80
#  g_iartout5 = TAP2.5, Ttapin80
#  g_iartout2 = Ttapin82 (Tap2++ et Tap2.5)
#  g_iartout3 = Conv_URS
#  g_iartout4 = Ttapin84 (Tap2++ et Tap2.5)
#  g_iartout6 = Ttapin86 (Tap2++ et Tap2.5)
#  g_iartout7 = Ttapin86 (Tap2++ et Tap2.5)
#  g_iartout8 = Ttapin86 (Tap2++ et Tap2.5)
#  g_iartout9 = Ttapin86 (Tap2++ et Tap2.5)
#  g_iartout10= Ttapin88 (Tap2++ et Tap2.5)
#  g_iartout11= Ttapin88 (Tap2++ et Tap2.5)
#  g_iartout12= Ttapin88 (Tap2++ et Tap2.5)
#  g_iartout12= rejet
#
# HISTORIQUE:
# creation : 06/10/2006
#  21/12/2006: FO 381 decalage du mapping de TAPIN80/UTCTimeOffCode
#  09/02/2007: FO 381 annulee
#  09/04/2007: FE0069 S-MMS en roaming out
#  22/06/2007: FE0072 renommage table LISTE_APN_DCB
#  24/10/2007: TT 0044
#  21/12/2007 : URS G1R6 : retrait ADV-VI et PANEL
#  21/02/2008 : URS G1R6 : report G1R5 (SOFRECOM 3.0/586)
#  30/04/2008 : URS G1R7 : item roaming postpaid
#  15/05/2008 : URS G1R7 : FO (numero ???) SOFRECOM filtrage DISE
#  08/07/2008 : URS G1R7 : reprise Defect 95 (G3R0C597)
#  19/08/2008 - URS - Param ME-G1R9
#  08/09/2008 - URS - Param ME-G1R9 QC184
#  24:11/2008 - DECI - G2R1 lot2  Transmission des CRAs vers FE
#  05/12/2008 - DECI - G2R1 Correction QC272 mauvais aiguillage vers FEDCH et MSFDCH
#  01/12/2009 - DECI - G2R6 JLGTHE item NFF
#  18/12/2009 - DECI - G2R6 QC516 ptval_TotalDataVolInc affectation incorrecte, initialisation de ptsom_TotalUPDown
#  23/12/2009 - DECI - G2R6 QC367 : (report G2R3C7) le mapping se fait maintenant dans le pcode IECC
#  18/06/2010 - DECI - G3R1 QC490 + mise a jour longeur (alarme 1444) complement
#  14/01/2011 - DECI - G3R1lot4 Verification/Correction des variables (constantes, entiers, pointeurs)
#  17/08/2011 - DECI - G3R4 lot3 QC852, CRAE enrichissement du libelle des alarmes par le nom du fichier collecte
#  05/09/2011 - DECI - G3R4 evol suite non-reg G3R2C3, G3R3C9 : reinit pt et modif des fcts Ajuster_taille
#  04/10/2011 - DECI - G3R4 QC913 interrogation du referentiel a tort en LocalTime au lieu de GmtTime
#  01/12/2011 - DECI - G3R5 lot1 Facturation B2B DCB MVNO
#  28/12/2011 - DECI - QC986 Correction format date pour evaluer le filtre FILTRE_DCB_ROUT_MVNO
#  04/02/2013 - DECI - G3R9 lot2 item COME
#  27/03/2013 - DECI - G3R9 QC1191
#  25/07/2013 - DECI - G3R10 lot4 Item "4G Arrivee DCB et gestion des APN"
#  08/08/2014 - JLG  - G5R2 lot2 : Ajout variables fonctionnelles MCCMNCx, IMSIy, IMSI_Transnational_M2M, Ajout controle sur Imsi, Filtrage des IMSIs inconnus vers NVDDCH (au lieu de ECDDCH) si IMSI transnational
#  06/11/2014 - JLG  - G5R2 : contournement core sur verbe pcode i_adequation_chaine_expreg (QC1441)
#  03/03/2015 - DERS/JLG  - Suppression du suffixe dans le nom de la fonction Stockage_Article laisse a tort
#  03/03/2015 - DERS/JLG  - G4R5lot2 suppresion de VPF
###########################################################################################################

##### Declaration Des Constantes #####

#QC913


##### Declaration Des Variables #####
#QC913

#G5R4lot2 Suppression VPF


# G5R2lot2
#/G5R2lot2



##### Initialisation Des Variables #####

erreur_660003959 = 0
code_rejet_660003959 = 0
ic_network_660003959 = 0
ic_dataVolumeIN_660003959 = 0
ic_dataVolumeOU_660003959 = 0
ic_RecEntType_660003959 = 0
ic_RecEntId_660003959 = 0
ic_charge_660003959 = 0
ic_chargeable_660003959 = 0
ic_charged_660003959 = 0
ic_useQosDelay_660003959 = 0
ic_useQosMeanput_660003959 = 0
ic_useQosPeakput_660003959 = 0
ic_useQosPrecdnc_660003959 = 0
ic_useQosReliabl_660003959 = 0
ic_gprsUsageTime_660003959 = 0
ic_gprsUTCOfCode_660003959 = 0
val_ttCallDuration_660003959 = 0
val_champ_660003959 = 0
val_charge_660003959 = 0

val_RecEntType_660003959 = 0
val_PdpType_660003959 = 0
val_causeTerm_660003959 = 0
val_typeCtrlNode_660003959 = 0
val_locationArea_660003959 = 0
val_charginID_660003959 = 0
val_cellID_660003959 = 0
val_netIniPDPCtxt_660003959 = 0
val_useQosDelay_660003959 = 0
val_useQosMeanput_660003959 = 0
val_useQosPeakput_660003959 = 0
val_useQosPrecdnc_660003959 = 0
val_useQosReliabl_660003959 = 0
val_gprsUTCOfCode_660003959 = 0
SGSNAddress_OK_660003959 = 0
PREMIER_SGSNAddress_IPV6_660003959 = 0
SGSNAddress_IPV6_660003959 = 0
GGSNAddress_OK_660003959 = 0
GGSNAddress_IPV6_660003959 = 0
PDPAddress_IPV6_660003959 = 0
nb_SGSNAddress_IPV6_660003959 = 0
UTCOffcode_660003959 = 0
TYPE_82_660003959 = 0
TYPE_84_660003959 = 0
TYPE_86_660003959 = 0
TYPE_88_660003959 = 0
FILTRE_TYPE_80_660003959 = 0
#b_Filtrage_MMSsortant = 0
instECC_660003959 = 0
instanceECC_660003959 = 0
nombreECC_660003959 = 0
instMSFDCH_660003959 = 0
instNVDDCH_660003959 = 0
instFEDCH_660003959 = 0
instVDIDCH_660003959 = 0
instOLADCH_660003959 = 0
instOL2DCH_660003959 = 0
instOL3DCH_660003959 = 0
instOR5DCH_660003959 = 0
instCMODCH_660003959 = 0
instM1GDCH_660003959 = 0
instCOMDCH_660003959 = 0
instFRCDCH_660003959 = 0

val_qosDelay1_660003959 = 0
val_qosMeanThrput1_660003959 = 0
val_qosPeakThrput1_660003959 = 0
val_qosPrecedence1_660003959 = 0
val_qosReliablity1_660003959 = 0

# G1R7
CORIOLIS_660003959 = 0
DISE_Entreprise_660003959 = 0
MVNO_postpaid_660003959 = 0
#FILTRE_DCB_RINT_ENT = 0
#b_FILTRE_tabExt_DchApnTrt = 0
#FILTRE_DCB_RINT_GP = 0
#FILTRE_DCB_RINT_MVNO = 0

#G3R5 lot1
MVNO_prepaye_660003959 = 0
#FILTRE_DCB_ROUT_MVNO = 0

# allocations memoire

pt_buf1_660003959="pt_buf1_ent_acesPointNamNI01234567890123456789012345678901234567890123456781ent"
i_strcpy(pt_buf1_660003959, "")
pt_IMSI_660003959 = "IMSI456789012345"
pt_Min_DCB_660003959 = "Min_DCB01234567"
pt_PDPAddress_660003959 = "PDPAddress01234567890123456789012345678"
pt_RemotePDPAddress_660003959 = "RemotePDPAddress01234567890123456789012"
pt_Address_660003959 = "Address01234567890123456789012345678901"
pt_terme_660003959 = "terme0123"
pt_ic_dataVolumeIN_660003959 = "dataVolumeIN1234"
pt_ic_dataVolumeOU_660003959 = "dataVolumeOU1234"
pt_ic_RecEntType_660003959 = "RecEntType1002"
pt_ic_RecEntId_660003959 = "RecEntId1987"
pt_ic1_charge_660003959 = "ic1_charge"
pt_ic2_charge_660003959 = "ic2_charge"
pt_ic3_charge_660003959 = "ic3_charge"
pt_ic_charge_660003959 = "charge1_1011"
pt_ic_useQosDelay_660003959 = "useQosDelay1234"
pt_ic_useQosMeanput_660003959 = "useQosMeanput1234"
pt_ic_useQosPeakput_660003959 = "useQosPeakput1234"
pt_ic_useQosReliabl_660003959 = "useQosReliabl1234"
pt_ic_gprsUsageTime_660003959 = "pt_ic_gprsUsageTimegprsUsageTime1"
pt_ic_gprsUTCOfCode_660003959 = "gprsUTCOfCode1234"
pt_ic_UsedQoSDelay_660003959 ="UsedQoSDelay_1234"
pt_ic_UsedQoSMean_660003959 = "UsedQoSMean_1234"
pt_ic_UsedQoSPeak_660003959 = "UsedQoSPeak_1234"
pt_ic_UsedQoSPrec_660003959 = "UsedQoSPrec_1234"
pt_ic_UsedQoSRelia_660003959 = "UsedQoSRelia_1234"
pt_ic_DataVolumeInc_660003959 = "DataVolumeInc_1234"
pt_ic_DataVolumeOut_660003959 = "DataVolumeOut_1234"
pt_ic_GPRS_UsageTp_660003959 = "GPRS_UsageTp_1234"
pt_ic_useQosPrecdnc_660003959 = "useQosPrecdnc_1234"
pt_ic_UTC_Time_Off_660003959 = "pt_ic_UTC_Time_Off_1"
pt_indice_660003959 = "indice123"
pt_RecEntId_660003959 = "RecEntId01234567890123456789012345678901"
pt_ChargedItem_660003959 = "ChargedItemZ"
pt_ttCallDuration_660003959 = "ttCallDuration45"

pt_resultat_660003959 = "resultat012345678901234567890"

pt_chargeType_660003959 = "chargeType0124"
pt_PdpType_660003959 = "PdpType0"
pt_typeCtrlNode_660003959 = "typeCtrlNode0"
pt_causeTerm_660003959 = "causeTerm01234567"
pt1_causeTerm_660003959 = "causeTerm0"
pt_charginID_660003959 = "charginID0123456789"
pt_locationArea_660003959 = "locationArea01234"

pt_cellID_660003959 = "cellI01234"

pt1_netIniPDPCtxt_660003959 = "netIniPDPCtxt0"
pt_netIniPDPCtxt_660003959 = "netIniPDPCtx01234567"
pt_localDatePtr_660003959 = "localDatePtr225102412"
pt_localDateRes_660003959 = "localDateRes142"
pt_acesPointNamNI_660003959 =  "acesPointNamNI012345678901234567890123456789012345678901234567812345678901"
# OGA 564
pt_acesPointNameOI_660003959 = "acesPointNameOI0123456789012345678901acesPointNameOI0123456789012345678901"
# /OGA 564
pt_IMEI_660003959 = "IMEI0123456789012"
pt_SGSNAddress_IPV6_660003959 = "SGSNAddress_IPV6_1234567890123456789012"
pt_GGSNAddress_IPV6_660003959 = "GGSNAddress_IPV6_1234567890123456789012"
pt_gprsUsageTime_660003959 = "gprsUsageTime20061030"
pt_useQosDelay_660003959 = "useQosDelay7"
pt_useQosMeanput_660003959 = "useQosMeanput7"

pt_useQosPeakput_660003959 = "useQosPeakput7"
pt_useQosReliabl_660003959 = "useQosReliabl7"
pt_useQosPrecdnc_660003959 = "useQosPrecdnc7"
pt_TYPE_88_1_660003959 = "TYPE_88_10"
pt_TYPE_88_2_660003959 = "TYPE_88_20"
pt_TYPE_88_3_660003959 = "TYPE_88_30"
pt_qosDelay1_660003959 = "pt_qosDelay0123"
pt_qosMeanThrput1_660003959 = "pt_qosMeanThrput0123"
pt_qosPeakThrput1_660003959 = "pt_qosPeakThrput0123"
pt_qosPrecedence1_660003959 = "pt_qosPrecedence0123"
pt_qosReliablity1_660003959 = "pt_qosReliablity0123"
pt_ic1_chargeable_660003959 = "ic1_chargeable"
pt_ic2_chargeable_660003959 = "ic2_chargeable"
pt_ic3_chargeable_660003959 = "ic3_chargeable"
pt_ic_chargeable_660003959 = "pt_ic_chargeable0123456"
pt_chargeableMB_660003959 = "pt_chargeableMB0123456"
pt_chargeable_660003959 = "pt_chargeable0123456"
pt_ic1_charged_660003959 = "ic1_charged01234"
pt_ic2_charged_660003959 = "ic2_charged01234"
pt_ic3_charged_660003959 = "ic3_charged01234"
pt_ic_charged_660003959 = "pt_ic_charged0123456"
pt_chargedMB_660003959 = "pt_chargedMB012345678"
pt_charged_660003959 = "pt_charged01234569870987012345"
#pt_DateFiltMMS = "20070409131400"
pt_seuilVolGPRS_660003959 = "000001024"
pt_TotalDataVol_660003959 = "pt_TotalDataVol10905190401234567"

ptval_dataVolumeOU_660003959=   "ptval_dataVolumeOU0123456"
ptval_dataVolumeIN_660003959=   "ptval_dataVolumeIN0123456"
ptval_TotalDataVolOut_660003959="ptval_TotalDataVolOut0123"
#QC516 : ptval_TotalDataVolInc affectation incorrecte
ptval_TotalDataVolInc_660003959="ptval_TotalDataVolInc0123"
pt_chargeableSM_00_660003959=   "pt_chargeableSM_000123456"
pt_chargedSM_00_660003959=      "pt_chargedSM_000123456789"
ptval_charged_660003959=        "ptval_charged012345678901"
ptval_chargeable_660003959=     "ptval_chargeable012345678"
ptsom_TotalUPDown_660003959=    "ptsomeupdown5242424252525"


pt_longInteger1_660003959="LongInteger1__________24+"
longInteger1_L_660003959=24

pt_longInteger2_660003959="LongInteger2_________24+"
longInteger2_L_660003959=24

pt_LibelleAlarme_660003959="pt_LibelleAlarme_111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111"
i_strcpy(pt_LibelleAlarme_660003959,"")
pt_NameOfFile_660003959="NameOfFile0123456780111111111111189012345678901234567890123456789012345672345678190123456789012345678901234567890123456789012345"
i_strcpy(pt_NameOfFile_660003959,"")
ptchp_format_660003959="ptchp_formatptchp_format"

erreur_660003959 = i_cree_art("Conv_URS",g_iartout3)

# initialisation des pointeurs
i_strcpy(pt_IMSI_660003959,"")
i_strcpy(pt_PDPAddress_660003959,"")
i_strcpy(pt_RemotePDPAddress_660003959,"")
i_strcpy(pt_Address_660003959,"")
i_strcpy(pt_PDPAddress_660003959,"")
i_strcpy(pt_terme_660003959,"")
i_strcpy(pt_ic1_charged_660003959,"")
i_strcpy(pt_ic2_charged_660003959,"")
i_strcpy(pt_chargeableSM_00_660003959,"")
i_strcpy(pt_chargedSM_00_660003959,"")
i_strcpy(ptval_charged_660003959,"")
i_strcpy(ptval_chargeable_660003959,"")
i_strcpy(pt_ic1_charge_660003959,"")
i_strcpy(pt_ic2_charge_660003959,"")
i_strcpy(pt_indice_660003959,"")
i_strcpy(pt_RecEntId_660003959,"")
i_strcpy(pt_ChargedItem_660003959,"")
i_strcpy(pt_chargeType_660003959,"")
i_strcpy(pt_PdpType_660003959,"")
i_strcpy(pt_typeCtrlNode_660003959,"")
i_strcpy(pt1_causeTerm_660003959,"")
i_strcpy(pt_charginID_660003959,"")
i_strcpy(pt1_netIniPDPCtxt_660003959,"")
#i_strcpy(pt_acesPointNamNI,"") fait plus bas
i_strcpy(pt_IMEI_660003959,"")
i_strcpy(pt_SGSNAddress_IPV6_660003959,"")
i_strcpy(pt_GGSNAddress_IPV6_660003959,"")
i_strcpy(pt_useQosDelay_660003959,"")
i_strcpy(pt_useQosPeakput_660003959,"")
i_strcpy(pt_useQosReliabl_660003959,"")
i_strcpy(pt_useQosPrecdnc_660003959,"")
i_strcpy(ptval_dataVolumeOU_660003959,"")
i_strcpy(ptval_dataVolumeIN_660003959,"")
i_strcpy(ptval_TotalDataVolOut_660003959,"")
i_strcpy(ptval_TotalDataVolInc_660003959,"")

i_strcpy(pt_TYPE_88_1_660003959,"")
i_strcpy(pt_TYPE_88_2_660003959,"")
i_strcpy(pt_TYPE_88_3_660003959,"")
#i_strcpy(pt_longInteger1,"") #affectation et initialisation plus bas
#i_strcpy(pt_longInteger2,"") #affectation et initialisation plus bas
i_strcpy(pt_qosDelay1_660003959,"")
i_strcpy(pt_qosMeanThrput1_660003959,"")
i_strcpy(pt_qosPeakThrput1_660003959,"")
i_strcpy(pt_qosPrecedence1_660003959,"")
i_strcpy(pt_qosReliablity1_660003959,"")
i_strcpy(pt_ic1_chargeable_660003959,"")
i_strcpy(pt_ic2_chargeable_660003959,"")

# G5R2lot2
IMSI_Transnational_M2M_660003959 = 0
REDIST_IMSI_Transnational_M2M_660003959 = 0
pt_MCCMNCx_660003959 = "pt_MCCMNCx12"
i_strcpy(pt_MCCMNCx_660003959,"")
pt_IMSIy_660003959   = "pt_IMSIy1234"
i_strcpy(pt_IMSIy_660003959,"")
str_conteneur_660003959 = "str_conteneur123456789"
i_strcpy(str_conteneur_660003959,"")
ptr_res_660003959    = "ptr_res12345"
i_strcpy(ptr_res_660003959,"")
#/G5R2lot2


trace("   -------------------------------------------------"   )
trace("  |  TCRAE_GPRS :DEBUT PCODE DE DISTRIBUTION GPRS   |"  )
trace("   -------------------------------------------------"   )

# G3R4 QC852
erreur_660003959 = i_get_art_str(g_iartin, $Tcrae_gprs::NameOfFile, pt_NameOfFile_660003959)
# /G3R4 QC852

date_cra_660003959 = i_get_art_field(g_iartin, $Tcrae_gprs::ddebut)
#QC913
gmt_date_cra_660003959 = i_DHgetCe2gTime(NUMTAB_660003959,ZONEMETRO_660003959,date_cra_660003959)


# MAJ du champ IMSI

SI (i_valid_field_n(g_iartin, $Tcrae_gprs::IMSI))
ALORS
  trace("<<<__LINE__<<<__FILE__<<< MAJ du champ <IMSI> avec le champ IMSI  d entree")
  erreur_660003959 = i_get_art_str(g_iartin,$Tcrae_gprs::IMSI, pt_IMSI_660003959)
SINON
  trace("<<<__LINE__<<<__FILE__<<< MAJ du champ <IMSI> avec le champ Min d entree")
  erreur_660003959 = i_get_art_str(g_iartin,$Tcrae_gprs::Min, pt_IMSI_660003959)
FINSI

# G5R2 lot2
# calcul de pt_MCCMNCx, pt_IMSIy, IMSI_Transnational_M2M
i_get_sub_str(pt_IMSI_660003959, 0, 5, pt_MCCMNCx_660003959)
i_get_sub_str(pt_IMSI_660003959, 6, 6, pt_IMSIy_660003959)
erreur_660003959 = i_format_str2(str_conteneur_660003959, "%s%s", "M2M_", pt_MCCMNCx_660003959)
i_strcpy(ptr_res_660003959, i_get_tab_field("MVNO", date_cra_660003959, str_conteneur_660003959))
# equivallent a QC1441 : anomalie core de i_adequation_chaine_expreg
SI (i_strcmp(pt_IMSIy_660003959, "") != 0 && i_strcmp(ptr_res_660003959, "") != 0)
ALORS
  SI ( i_strcmp(ptr_res_660003959,"Tous") == 0 || i_adequation_chaine_expreg(ptr_res_660003959, pt_IMSIy_660003959) == 0)
  ALORS
    IMSI_Transnational_M2M_660003959 = Vrai_660003959
  SINON
    IMSI_Transnational_M2M_660003959 = Faux_660003959
  FINSI
SINON
  IMSI_Transnational_M2M_660003959 = Faux_660003959
FINSI
#/QC1441

erreur_660003959 = i_conv_ascii_dcb(pt_IMSI_660003959 , pt_Min_DCB_660003959)
erreur_660003959 = i_EnvoiReqConsTabDist(TD_Imsi_660003959, gmt_date_cra_660003959, pt_Min_DCB_660003959, 8, 0, 1)

trace1("Retour de i_EnvoiReqConsTabDist TD_Imsi = <%d>",erreur_660003959)

SI (erreur_660003959 != 0)
ALORS
  # IMSI inconnu
  SI IMSI_Transnational_M2M_660003959
  ALORS
    REDIST_IMSI_Transnational_M2M_660003959 = 1
  SINON
    SAUT REDISTRIB
  FINSI
FINSI
#/G5R2 lot2
#------------------------------- DEBUT DE DUPLICATION ------------------------------

#########################################################
# Duplication du Tcrae_gprs vers Ttapin80   #
#########################################################

# g_iartout => TYPE 80 (Tap2++)
# g_iartout5 => TYPE 80 (Tap2.5) cf duplication plus bas dans le pcode

trace("DUPLICATION DU TYPE 80")

erreur_660003959 = i_dup_art_dest(g_iartin , g_iartout, "Ttapin80")

SI (erreur_660003959 !=0)
ALORS
  trace("Tcrae_gprs, erreur de duplication vers le format Ttapin80")
  code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DUPL_660003959 + EFFICACE_660003959
  erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "Ttapin80", pt_NameOfFile_660003959)
  erreur_660003959 = i_PlvMessEmettre(8892, 2, g_iartout, "", 3, code_rejet_660003959, "Tcrae_gprs", pt_LibelleAlarme_660003959)
  SAUT STOCKE_ERRONE
FINSI

#### MAJ PCODE DES CHAMPS ####

# MAJ du champ RecordType

trace("Ttapin80 : MAJ du champ <RecordType>")
erreur_660003959 = i_memcpy_art_field_n(g_iartout , $Ttapin80::RecordType, "80", 2)

# MAJ du champ TotalCallEvDu

SI (i_valid_field_n(g_iartin, $Tcrae_gprs::ttCallDuration))
ALORS
  trace("Ttapin80 : MAJ du champ <TotalCallEvDu>")
  val_ttCallDuration_660003959 = i_get_art_field(g_iartin, $Tcrae_gprs::ttCallDuration)
  SI (val_ttCallDuration_660003959 < 999999)
  ALORS
    i_strcpy(pt_ttCallDuration_660003959,"")
    erreur_660003959 = Ajuster_taille_entier2_660003942(val_ttCallDuration_660003959, 6, pt_ttCallDuration_660003959)
    trace2("pt_ttCallDuration : <%s>", pt_ttCallDuration_660003959, 0)
    erreur_660003959 = i_memcpy_art_field(g_iartout, "TotalCallEvDu", pt_ttCallDuration_660003959 , 6)
  SINON
    erreur_660003959 = i_memcpy_art_field(g_iartout, "TotalCallEvDu", "999999", 6)
  FINSI
FINSI

# MAJ du champ NetworkType

trace("Ttapin80 : MAJ du champ <NetworkType>")
erreur_660003959 = i_get_art_field(g_iartin, $Tcrae_gprs::NetworkType)
SI ( erreur_660003959 == 0)
ALORS
  ic_network_660003959 = $Tcrae_gprs::gprsNetworkType
SINON
  ic_network_660003959 = $Tcrae_gprs::NetworkType
FINSI

erreur_660003959 = i_get_art_field(g_iartin, ic_network_660003959)
SI (erreur_660003959 == 1)
ALORS
  trace("NetworkType prend pour valeur A")
  erreur_660003959 = i_memcpy_art_field_n(g_iartout, $Ttapin80::NetworkType, "A", 1)
SINON
  SI (erreur_660003959 == 2)
  ALORS
    trace("NetworkType prend pour valeur B")
    erreur_660003959 = i_memcpy_art_field_n(g_iartout, $Ttapin80::NetworkType, "B", 1)
  FINSI
FINSI



trace2("pt_IMSI : <%s>", pt_IMSI_660003959, 0)
erreur_660003959 = i_memcpy_art_field_n(g_iartout, $Ttapin80::IMSI, pt_IMSI_660003959, i_strlen(pt_IMSI_660003959))
SI (erreur_660003959!=0)
ALORS
  trace("Tcrae_gprs , erreur de mise a jour du champ <IMSI>")
  code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DUPL_660003959 + EFFICACE_660003959
  SAUT STOCKE_ERRONE
FINSI

# MAJ du champ PDPType

SI (i_valid_field_n(g_iartin, $Tcrae_gprs::PdpType))
ALORS
  trace("Ttapin80 : MAJ du champ <PDPType>")
  val_PdpType_660003959 = i_get_art_field(g_iartin, $Tcrae_gprs::PdpType)
  erreur_660003959 = i_EntierToString(val_PdpType_660003959, pt_PdpType_660003959, 4)
  trace2("pt_PdpType : <%s>", pt_PdpType_660003959, 0)
  erreur_660003959 = i_memcpy_art_field(g_iartout, "PDPType", pt_PdpType_660003959 , 1)
FINSI

# MAJ du champ PDPAddress

trace("Ttapin80 : MAJ du champ <PDPAddress>")
SI (i_valid_field_n(g_iartin, $Tcrae_gprs::PdpAddress))
ALORS
  erreur_660003959 = i_get_field_str(g_iartin, "PdpAddress", pt_Address_660003959)
  erreur_660003959 = i_recupererValeur(pt_Address_660003959, pt_terme_660003959, 4, ':')
  SI (i_strlen(pt_Address_660003959) != 0)
  ALORS
    erreur_660003959 = i_recupererValeur(pt_Address_660003959, pt_terme_660003959, 4, ':')
    SI (i_strlen(pt_Address_660003959) != 0)
    ALORS
      trace("Le champ PDPAddress de sortie est vide car address IPV6")
      PDPAddress_IPV6_660003959 = 1
    SINON
      trace("Le champ PdpAddress est une address IPV4")
      erreur_660003959 = i_get_field_str(g_iartin, "PdpAddress", pt_PDPAddress_660003959)
      trace2("pt_PDPAddress : <%s>", pt_PDPAddress_660003959, 0)
      erreur_660003959 = i_memcpy_art_field_n(g_iartout, $Ttapin80::PDPAddress, pt_PDPAddress_660003959, i_strlen(pt_PDPAddress_660003959))
    FINSI
  FINSI
FINSI

# MAJ du champ TypeOfConNode

SI (i_valid_field_n(g_iartin, $Tcrae_gprs::typeCtrlNode))
ALORS
  trace("Ttapin80 : MAJ du champ <TypeOfConNode>")
  val_typeCtrlNode_660003959 = i_get_art_field(g_iartin, $Tcrae_gprs::typeCtrlNode)
  erreur_660003959 = i_EntierToString(val_typeCtrlNode_660003959, pt_typeCtrlNode_660003959, 4)
  trace2("pt_typeCtrlNode : <%s>", pt_typeCtrlNode_660003959, 0)
  erreur_660003959 = i_memcpy_art_field(g_iartout, "TypeOfConNode", pt_typeCtrlNode_660003959 , 1)
FINSI

# MAJ du champ CauseForTerm

SI (i_valid_field_n(g_iartin, $Tcrae_gprs::causeTerm))
ALORS
  trace("Ttapin80 : MAJ du champ <CauseForTerm>")
  val_causeTerm_660003959 = i_get_art_field(g_iartin, $Tcrae_gprs::causeTerm)
  SI (val_causeTerm_660003959 < 10)
  ALORS
    erreur_660003959 = i_EntierToString(val_causeTerm_660003959, pt1_causeTerm_660003959, 4)
    erreur_660003959 = i_format_str2(pt_causeTerm_660003959, "%s%s", "0", pt1_causeTerm_660003959)
  SINON
    erreur_660003959 = i_EntierToString(val_causeTerm_660003959, pt_causeTerm_660003959, 8)
  FINSI
  trace2("pt_causeTerm : <%s>", pt_causeTerm_660003959, 0)
  erreur_660003959 = i_memcpy_art_field(g_iartout, "CauseForTerm", pt_causeTerm_660003959 , 2)
FINSI

# MAJ du champ ChargedItem

trace("Ttapin80 : MAJ du champ <ChargedItem>")
SI (i_valid_field_n(g_iartin, $Tcrae_gprs::chargedItem1))
ALORS
  erreur_660003959 = i_get_field_str(g_iartin, "chargedItem1", pt_ChargedItem_660003959)
  trace2("pt_ChargedItem : <%s>", pt_ChargedItem_660003959, 0)
  erreur_660003959 = i_memcpy_art_field_n(g_iartout, $Ttapin80::ChargedItem, pt_ChargedItem_660003959, 1)

# MAJ du champ ServiceCode
  trace("Ttapin80 : MAJ du champ <ServiceCode>")
  SI (i_strcmp(pt_ChargedItem_660003959,"V") == 0)
  ALORS
    erreur_660003959 = i_memcpy_art_field_n(g_iartout, $Ttapin80::ServiceCode, "50", 2)
  SINON
    SI (i_strcmp(pt_ChargedItem_660003959,"W") == 0)
    ALORS
      erreur_660003959 = i_memcpy_art_field_n(g_iartout, $Ttapin80::ServiceCode, "51", 2)
    SINON
      SI (i_strcmp(pt_ChargedItem_660003959,"D") == 0)
      ALORS
        erreur_660003959 = i_memcpy_art_field_n(g_iartout, $Ttapin80::ServiceCode, "52", 2)
      SINON
        SI (i_strcmp(pt_ChargedItem_660003959,"X") == 0)
        ALORS
          erreur_660003959 = i_memcpy_art_field_n(g_iartout, $Ttapin80::ServiceCode, "53", 2)
        FINSI
      FINSI
    FINSI
  FINSI
FINSI

# Somme_VolumeDOWN
# MAJ du champ TotalDataVolInc, variable fonctionnelle Somme_VolumeDOWN = ptval_TotalDataVolInc

trace("Ttapin80 : MAJ du champ <TotalDataVolInc>")
indice_660003959 = 1


longInteger1_L_660003959=24
longInteger2_L_660003959=24

erreur_660003959 = i_EntierToString(0, ptval_TotalDataVolInc_660003959, 24)

POINT SOM_dataVolumeIN
erreur_660003959 = i_EntierToString(indice_660003959, pt_indice_660003959, 4)
erreur_660003959 = i_format_str2(pt_ic_dataVolumeIN_660003959, "%s%s", "dataVolumeIN", pt_indice_660003959)

trace2("Tcrae_gprs: pour le champ :<%s>",pt_ic_dataVolumeIN_660003959, 0)
ic_dataVolumeIN_660003959 = i_get_field_num(g_iartin, pt_ic_dataVolumeIN_660003959)

trace1("ic_dataVolumeIN : %d", ic_dataVolumeIN_660003959)
SI ( ic_dataVolumeIN_660003959 != -1)
ALORS
  erreur_660003959=Entier8Bytes_660003942(g_iartin, ic_dataVolumeIN_660003959, ptval_dataVolumeIN_660003959)
  trace2("val_dataVolumeIN : %s", ptval_dataVolumeIN_660003959,0)

  SI (erreur_660003959==0)
  ALORS
    erreur_660003959= i_largeIntegersAdd(ptval_TotalDataVolInc_660003959,longInteger1_L_660003959,ptval_dataVolumeIN_660003959,longInteger2_L_660003959)
  FINSI
SINON
  SAUT FIN_SOM_dataVolumeIN
FINSI

SI (indice_660003959 < 9)
ALORS
  indice_660003959 = indice_660003959 +1
  SAUT SOM_dataVolumeIN
FINSI

POINT FIN_SOM_dataVolumeIN

trace2("La somme des dataVolumeIN est de : %s", ptval_TotalDataVolInc_660003959,0)
SI (i_strlen(ptval_TotalDataVolInc_660003959)>9)
ALORS
  erreur_660003959 = i_memcpy_art_field(g_iartout , "TotalDataVolInc", "999999999", 9)
SINON

  erreur_660003959 = Ajuster_taille_string_2_660003942(ptval_TotalDataVolInc_660003959, 9)
  i_strcpy(pt_resultat_660003959, ptval_TotalDataVolInc_660003959)
  trace2("TotalDataVolInc pt_resultat : <%s>", pt_resultat_660003959, 0)
  erreur_660003959 = i_memcpy_art_field(g_iartout , "TotalDataVolInc", pt_resultat_660003959, 9)
FINSI

# MAJ des champs SGSNAddress et GGSNAddress

trace("Ttapin80 : MAJ des champs <SGSNAddress> et <GGSNAddress>")
indice_660003959 = 1

POINT MAJ_SGSN_GGSN

trace1("indice : %d",indice_660003959)
SI ( indice_660003959 < 10)
ALORS
  erreur_660003959 = i_EntierToString(indice_660003959, pt_indice_660003959, 4)
SINON
  erreur_660003959 = i_EntierToString(indice_660003959, pt_indice_660003959, 4)
FINSI
erreur_660003959 = i_format_str2(pt_ic_RecEntType_660003959, "%s%s", "RecEntType", pt_indice_660003959)
erreur_660003959 = i_format_str2(pt_ic_RecEntId_660003959, "%s%s", "RecEntId", pt_indice_660003959)

ic_RecEntType_660003959 = i_get_field_num(g_iartin, pt_ic_RecEntType_660003959)
ic_RecEntId_660003959 = i_get_field_num(g_iartin, pt_ic_RecEntId_660003959)

SI ( (ic_RecEntType_660003959 == -1) || (ic_RecEntId_660003959 == -1) )
ALORS
  SAUT FIN_MAJ_SGSN_GGSN
FINSI

SI ( (i_valid_field_n(g_iartin, ic_RecEntType_660003959)) && (i_valid_field_n(g_iartin, ic_RecEntId_660003959)) )
ALORS
  val_RecEntType_660003959 = i_get_art_field(g_iartin, ic_RecEntType_660003959)
  erreur_660003959 = i_get_field_str(g_iartin, pt_ic_RecEntId_660003959, pt_RecEntId_660003959)

  trace1("val_RecEntType : %d", val_RecEntType_660003959)
  SI (val_RecEntType_660003959 == 4)
  ALORS
    erreur_660003959 = i_recupererValeur(pt_RecEntId_660003959, pt_terme_660003959, 4, ':')
    SI (i_strlen(pt_RecEntId_660003959) != 0)
    ALORS
      erreur_660003959 = i_recupererValeur(pt_RecEntId_660003959, pt_terme_660003959, 4, ':')
      SI (i_strlen(pt_RecEntId_660003959) != 0)
      ALORS
        SI (SGSNAddress_OK_660003959 == 0)
        ALORS
          SGSNAddress_OK_660003959 = 1
          PREMIER_SGSNAddress_IPV6_660003959 = indice_660003959
          erreur_660003959 = i_get_field_str(g_iartin, pt_ic_RecEntId_660003959, pt_SGSNAddress_IPV6_660003959)
        SINON
          SGSNAddress_IPV6_660003959 = SGSNAddress_IPV6_660003959 + 1
        FINSI
        trace2("le champ <%s> contient une address SGSN IPV6", pt_ic_RecEntId_660003959, 0)
      SINON
        SI (SGSNAddress_OK_660003959 == 0)
        ALORS
          SGSNAddress_OK_660003959 = 1
          trace("IPV4 pour la premiere address SGSN")
          erreur_660003959 = i_get_field_str(g_iartin, pt_ic_RecEntId_660003959, pt_RecEntId_660003959)
          trace2("pt_RecEntId : <%s>", pt_RecEntId_660003959, 0)
          erreur_660003959 = i_memcpy_art_field_n(g_iartout, $Ttapin80::SGSNAddress, pt_RecEntId_660003959, i_strlen(pt_RecEntId_660003959))
        FINSI
      FINSI
    FINSI
  SINON
    SI (val_RecEntType_660003959 == 3)
    ALORS
      erreur_660003959 = i_recupererValeur(pt_RecEntId_660003959, pt_terme_660003959, 4, ':')
      SI (i_strlen(pt_RecEntId_660003959) != 0)
      ALORS
        erreur_660003959 = i_recupererValeur(pt_RecEntId_660003959, pt_terme_660003959, 4, ':')
        SI (i_strlen(pt_RecEntId_660003959) != 0)
        ALORS
          SI (GGSNAddress_OK_660003959 == 0)
          ALORS
            GGSNAddress_OK_660003959 = 1
            GGSNAddress_IPV6_660003959 = 1
            erreur_660003959 = i_get_field_str(g_iartin, pt_ic_RecEntId_660003959, pt_GGSNAddress_IPV6_660003959)
          FINSI
          trace2("le champ <%s> contient une address GGSN IPV6", pt_ic_RecEntId_660003959, 0)
        SINON
          SI (GGSNAddress_OK_660003959 == 0)
          ALORS
            GGSNAddress_OK_660003959 = 1
            trace("IPV4 pour la premiere address GGSN")
            erreur_660003959 = i_get_field_str(g_iartin, pt_ic_RecEntId_660003959, pt_RecEntId_660003959)
            trace2("pt_RecEntId : <%s>", pt_RecEntId_660003959, 0)
            erreur_660003959 = i_memcpy_art_field_n(g_iartout, $Ttapin80::GGSNAddress, pt_RecEntId_660003959, i_strlen(pt_RecEntId_660003959))
          FINSI
        FINSI
      FINSI
    FINSI
  FINSI
SINON
  SAUT FIN_MAJ_SGSN_GGSN
FINSI

SI (indice_660003959 < 10)
ALORS
  indice_660003959 = indice_660003959 + 1
  SAUT MAJ_SGSN_GGSN
FINSI

POINT FIN_MAJ_SGSN_GGSN

# MAJ du champ ChargingID

SI (i_valid_field_n(g_iartin, $Tcrae_gprs::charginID))
ALORS
  trace("Ttapin80 : MAJ du champ <ChargingID>")
  SI ( i_get_art_fieldtab(g_iartin, $Tcrae_gprs::charginID, 4) > 0x7F )
  ALORS
    trace("## entier long => SAUT AUTRE_MAJ_charginID")
    SAUT AUTRE_MAJ_charginID
  FINSI

  val_charginID_660003959 = (i_get_art_fieldtab(g_iartin, $Tcrae_gprs::charginID, 7)+
  (i_get_art_fieldtab(g_iartin, $Tcrae_gprs::charginID, 6)*(16*16))+
  (i_get_art_fieldtab(g_iartin, $Tcrae_gprs::charginID, 5)*(16*16*16*16))+
  (i_get_art_fieldtab(g_iartin, $Tcrae_gprs::charginID, 4)*(16*16*16*16*16*16)) )
  trace1("val_charginID : %d", val_charginID_660003959)
  erreur_660003959 = i_EntierToString(val_charginID_660003959, pt_charginID_660003959, 10)
  erreur_660003959 = Ajuster_taille_string_2_660003942(pt_charginID_660003959, 10)
  i_strcpy(pt_resultat_660003959, pt_charginID_660003959)
  trace2("ChargingID pt_resultat : <%s>", pt_resultat_660003959, 0)
  erreur_660003959 = i_memcpy_art_field(g_iartout , "ChargingID", pt_resultat_660003959, 10)

  SAUT FIN_MAJ_charginID
# FINSI

  POINT AUTRE_MAJ_charginID

  pt_longInteger1_660003959="LongInteger1__________24+"
  longInteger1_L_660003959=24

  pt_longInteger2_660003959="LongInteger2_________24+"
  longInteger2_L_660003959=24
# initialiser a "0"
  erreur_660003959 = i_EntierToString(0,pt_longInteger1_660003959,longInteger1_L_660003959)

# premier octet
  erreur_660003959 = erreur_660003959 + i_EntierToString(i_get_art_fieldtab(g_iartin,$Tcrae_gprs::charginID,0),pt_longInteger2_660003959,longInteger2_L_660003959)
  erreur_660003959 = erreur_660003959 + i_largeIntegersAdd(pt_longInteger1_660003959,longInteger1_L_660003959,pt_longInteger2_660003959,longInteger2_L_660003959)

# second octet
  erreur_660003959 = erreur_660003959 + i_EntierToString(256,pt_longInteger2_660003959,longInteger2_L_660003959)
  erreur_660003959 = erreur_660003959 + i_largeIntegersMultiply(pt_longInteger1_660003959,longInteger1_L_660003959,pt_longInteger2_660003959,longInteger2_L_660003959)
  erreur_660003959 = erreur_660003959 + i_EntierToString(i_get_art_fieldtab(g_iartin,$Tcrae_gprs::charginID,1),pt_longInteger2_660003959,longInteger2_L_660003959)
  erreur_660003959 = erreur_660003959 + i_largeIntegersAdd(pt_longInteger1_660003959,longInteger1_L_660003959,pt_longInteger2_660003959,longInteger2_L_660003959)

# troisieme octet
  erreur_660003959 =  erreur_660003959 + i_EntierToString(256,pt_longInteger2_660003959,longInteger2_L_660003959)
  erreur_660003959 =  erreur_660003959 + i_largeIntegersMultiply(pt_longInteger1_660003959,longInteger1_L_660003959,pt_longInteger2_660003959,longInteger2_L_660003959)
  erreur_660003959 =  erreur_660003959 + i_EntierToString(i_get_art_fieldtab(g_iartin,$Tcrae_gprs::charginID,2),pt_longInteger2_660003959,longInteger2_L_660003959)
  erreur_660003959 =  erreur_660003959 + i_largeIntegersAdd(pt_longInteger1_660003959,longInteger1_L_660003959,pt_longInteger2_660003959,longInteger2_L_660003959)

# quatrieme octet
  erreur_660003959 =  erreur_660003959 + i_EntierToString(256,pt_longInteger2_660003959,longInteger2_L_660003959)
  erreur_660003959 =  erreur_660003959 + i_largeIntegersMultiply(pt_longInteger1_660003959,longInteger1_L_660003959,pt_longInteger2_660003959,longInteger2_L_660003959)
  erreur_660003959 =  erreur_660003959 + i_EntierToString(i_get_art_fieldtab(g_iartin,$Tcrae_gprs::charginID,3),pt_longInteger2_660003959,longInteger2_L_660003959)
  erreur_660003959 =  erreur_660003959 + i_largeIntegersAdd(pt_longInteger1_660003959,longInteger1_L_660003959,pt_longInteger2_660003959,longInteger2_L_660003959)

# cinquieme octet
  erreur_660003959 =  erreur_660003959 + i_EntierToString(256,pt_longInteger2_660003959,longInteger2_L_660003959)
  erreur_660003959 =  erreur_660003959 + i_largeIntegersMultiply(pt_longInteger1_660003959,longInteger1_L_660003959,pt_longInteger2_660003959,longInteger2_L_660003959)
  erreur_660003959 =  erreur_660003959 + i_EntierToString(i_get_art_fieldtab(g_iartin,$Tcrae_gprs::charginID,4),pt_longInteger2_660003959,longInteger2_L_660003959)
  erreur_660003959 =  erreur_660003959 + i_largeIntegersAdd(pt_longInteger1_660003959,longInteger1_L_660003959,pt_longInteger2_660003959,longInteger2_L_660003959)

# sixieme octet
  erreur_660003959 =  erreur_660003959 + i_EntierToString(256,pt_longInteger2_660003959,longInteger2_L_660003959)
  erreur_660003959 =  erreur_660003959 + i_largeIntegersMultiply(pt_longInteger1_660003959,longInteger1_L_660003959,pt_longInteger2_660003959,longInteger2_L_660003959)
  erreur_660003959 =  erreur_660003959 + i_EntierToString(i_get_art_fieldtab(g_iartin,$Tcrae_gprs::charginID,5),pt_longInteger2_660003959,longInteger2_L_660003959)
  erreur_660003959 =  erreur_660003959 + i_largeIntegersAdd(pt_longInteger1_660003959,longInteger1_L_660003959,pt_longInteger2_660003959,longInteger2_L_660003959)

# septieme octet
  erreur_660003959 =  erreur_660003959 + i_EntierToString(256,pt_longInteger2_660003959,longInteger2_L_660003959)
  erreur_660003959 =  erreur_660003959 + i_largeIntegersMultiply(pt_longInteger1_660003959,longInteger1_L_660003959,pt_longInteger2_660003959,longInteger2_L_660003959)
  erreur_660003959 =  erreur_660003959 + i_EntierToString(i_get_art_fieldtab(g_iartin,$Tcrae_gprs::charginID,6),pt_longInteger2_660003959,longInteger2_L_660003959)
  erreur_660003959 =  erreur_660003959 + i_largeIntegersAdd(pt_longInteger1_660003959,longInteger1_L_660003959,pt_longInteger2_660003959,longInteger2_L_660003959)

# huitieme octet
  erreur_660003959 =  erreur_660003959 + i_EntierToString(256,pt_longInteger2_660003959,longInteger2_L_660003959)
  erreur_660003959 =  erreur_660003959 + i_largeIntegersMultiply(pt_longInteger1_660003959,longInteger1_L_660003959,pt_longInteger2_660003959,longInteger2_L_660003959)
  erreur_660003959 =  erreur_660003959 + i_EntierToString(i_get_art_fieldtab(g_iartin,$Tcrae_gprs::charginID,7),pt_longInteger2_660003959,longInteger2_L_660003959)
  erreur_660003959 =  erreur_660003959 + i_largeIntegersAdd(pt_longInteger1_660003959,longInteger1_L_660003959,pt_longInteger2_660003959,longInteger2_L_660003959)

  SI (erreur_660003959 == 0)
  ALORS
    trace("MAJ CharginId")
    trace2("pt_longInteger1 : <%s>", pt_longInteger1_660003959, 0)
    erreur_660003959 = i_memcpy_art_field(g_iartout, "ChargingID", pt_longInteger1_660003959 , 10)
  FINSI
FINSI

POINT FIN_MAJ_charginID

# MAJ du champ LocationArea

SI (i_valid_field_n(g_iartin, $Tcrae_gprs::locationArea))
ALORS
  trace("Ttapin80 : MAJ du champ <LocationArea>")
  val_locationArea_660003959 = i_get_art_field(g_iartin, $Tcrae_gprs::locationArea)

  SI ( (val_locationArea_660003959 >= 0) && (val_locationArea_660003959 <= 99999) )
  ALORS
    i_strcpy(pt_locationArea_660003959,"")
    erreur_660003959 = Ajuster_taille_entier2_660003942(val_locationArea_660003959, 5, pt_locationArea_660003959)
    trace2("pt_locationArea : <%s>", pt_locationArea_660003959, 0)
    erreur_660003959 = i_memcpy_art_field(g_iartout, "LocationArea", pt_locationArea_660003959 , 5)
  SINON
    erreur_660003959 = i_memcpy_art_field(g_iartout, "LocationArea", "99999", 5)
  FINSI
SINON
  erreur_660003959 = i_memcpy_art_field(g_iartout, "LocationArea", "99999", 5)
FINSI

# MAJ du champ CellId

SI (i_valid_field_n(g_iartin, $Tcrae_gprs::cellID))
ALORS
  trace("Ttapin80 : MAJ du champ <CellId>")
  val_cellID_660003959 = i_get_art_field(g_iartin, $Tcrae_gprs::cellID)
  SI ( (val_cellID_660003959 >= 0) && (val_cellID_660003959 <= 99999) )
  ALORS
    i_strcpy(pt_cellID_660003959,"")
    erreur_660003959 = Ajuster_taille_entier2_660003942(val_cellID_660003959, 5, pt_cellID_660003959)
    trace2("pt_cellID : <%s>", pt_cellID_660003959, 0)
    erreur_660003959 = i_memcpy_art_field(g_iartout, "CellId", pt_cellID_660003959,5)
  SINON
    erreur_660003959 = i_memcpy_art_field(g_iartout, "CellId", "99999", 5)
  FINSI
SINON
  erreur_660003959 = i_memcpy_art_field(g_iartout, "CellId", "99999", 5)
FINSI

# MAJ du champ ChgStartDateTim

SI (!i_valid_field_n(g_iartin, $Tcrae_gprs::CLocalTime))
ALORS
  trace("Ttapin80 : MAJ du champ <ChgStartDateTim> avec le champ CESLocalTime")
  pt_localDatePtr_660003959 = i_get_art_fieldptr(g_iartin, $Tcrae_gprs::CESLocalTime)
  i_get_sub_str(pt_localDatePtr_660003959, 2, 13, pt_localDateRes_660003959)
  trace2("pt_localDateRes : <%s>", pt_localDateRes_660003959, 0)
  erreur_660003959 = i_memcpy_art_field(g_iartout, "ChgStartDateTim", pt_localDateRes_660003959, 12)
FINSI

# MAJ du champ UTCTimeOffCode

trace("Ttapin80 : MAJ du champ <UTCTimeOffCode>")
UTCOffcode_660003959 = i_get_art_field(g_iartin, $Tcrae_gprs::COffsetCode)

SI (UTCOffcode_660003959 == -1)
ALORS
  UTCOffcode_660003959 = i_get_art_field(g_iartin, $Tcrae_gprs::CESOffsetCode)
FINSI

#QC367
# mapping offssetCode TLV - >TAPIN
SI (UTCOffcode_660003959 != -1)
ALORS
  erreur_660003959 = i_memset_field_n(g_iartout ,$Ttapin80::UTCTimeOffCode, UTCOffcode_660003959)
SINON
  trace("Pas de MAJ du UTCTimeOffCode")
FINSI
#/QC367

# MAJ du champ NetworkInPDPCon

SI (i_valid_field_n(g_iartin, $Tcrae_gprs::netIniPDPCtxt))
ALORS
  trace("Ttapin80 : MAJ du champ <NetworkInPDPCon>")
  val_netIniPDPCtxt_660003959 = i_get_art_field(g_iartin, $Tcrae_gprs::netIniPDPCtxt)

  SI (val_netIniPDPCtxt_660003959 < 10)
  ALORS
    erreur_660003959 = i_EntierToString(val_netIniPDPCtxt_660003959, pt1_netIniPDPCtxt_660003959, 4)
    erreur_660003959 = i_format_str2(pt_netIniPDPCtxt_660003959, "%s%s", "0", pt1_netIniPDPCtxt_660003959)
  SINON
    erreur_660003959 = i_EntierToString(val_netIniPDPCtxt_660003959, pt_netIniPDPCtxt_660003959, 8)
  FINSI
  trace2("pt_netIniPDPCtxt : <%s>", pt_netIniPDPCtxt_660003959, 0)
#QC490 mise a jour longeur (alarme 1444)
  erreur_660003959 = i_memcpy_art_field(g_iartout, "NetworkInPDPCon", pt_netIniPDPCtxt_660003959 , 1)
FINSI

# calcul des charges pour tous les chargeItem confondus
trace("Ttapin80 : MAJ du champ <charge>")

indice2_660003959 = 1
chargeSM_00_660003959 = 0

#  SI pas de T3t27.1_charge , ne pas faire des calculs

SI (i_valid_field_n(g_iartin, $Tcrae_gprs::chargedItem1-4))
ALORS

  POINT  SOM_CHARGE_LIST

  indice_660003959 = 10
  erreur_660003959 = i_EntierToString(indice2_660003959 ,pt_ic1_charge_660003959,1)

  POINT  SOM_CHARGES

  erreur_660003959 = i_EntierToString(indice_660003959,pt_ic2_charge_660003959,4)
  erreur_660003959 = i_format_str2(pt_ic3_charge_660003959,"%s_%s", pt_ic1_charge_660003959, pt_ic2_charge_660003959)
  erreur_660003959  = i_format_str2(pt_ic_charge_660003959, "%s%s", "charge", pt_ic3_charge_660003959)
  trace2("**Tcrae_gprs ,charge nom :<%s>",pt_ic_charge_660003959, 0)
  ic_charge_660003959 = i_get_field_num(g_iartin, pt_ic_charge_660003959)

  SI ( ic_charge_660003959 != -1)
  ALORS
    val_charge_660003959 = i_get_art_field(g_iartin, ic_charge_660003959)
    trace1("Tcrae_gprs ,val_charge <%d>", val_charge_660003959)
    trace1("Tcrae_gprs ,ic_charge <%d>", ic_charge_660003959)
    erreur_660003959 = i_get_art_str(g_iartin, ic_charge_660003959 +3, pt_chargeType_660003959)
    trace2("pt_chargeType : %s",pt_chargeType_660003959 ,0)
# calcul des charges dont le charge type est a 00

    SI ( (i_strcmp(pt_chargeType_660003959, "00")==0) || (i_strcmp(pt_chargeType_660003959, "0")==0) || (i_strcmp(pt_chargeType_660003959, "000")==0))

    ALORS
      chargeSM_00_660003959 = chargeSM_00_660003959 +  val_charge_660003959
      trace1("Tcrae_gprs ,chargeSM_00 <%d>", chargeSM_00_660003959)
    FINSI
  FINSI

  SI (indice_660003959 <19 )
  ALORS
    indice_660003959 = indice_660003959 +1
    SAUT SOM_CHARGES
  FINSI

  indice2_660003959 = indice2_660003959 +1

  SI (indice2_660003959 <= 4)
  ALORS
    SAUT  SOM_CHARGE_LIST
  FINSI
  i_strcpy(pt_resultat_660003959,"")
  erreur_660003959  = Ajuster_taille_entier2_660003942(chargeSM_00_660003959, 9, pt_resultat_660003959)
  trace2("Charge pt_resultat : <%s>", pt_resultat_660003959, 0)
  erreur_660003959 = i_memcpy_art_field(g_iartout , "Charge", pt_resultat_660003959, 9)
FINSI

# MAJ du champ ExchgRateCode

trace("Ttapin80 : MAJ du champ <ExchgRateCode>")
SI (chargeSM_00_660003959 != 0)
ALORS
  erreur_660003959 = i_memset_field(g_iartout,"ExchgRateCode", 0x45)
FINSI

# Somme_VolumeUP
# MAJ du champ TotalDataVolOut, variable fonctionnelle Somme_VolumeUP = ptval_TotalDataVolOut

trace("Ttapin80 : MAJ du champ <TotalDataVolOut>")
indice_660003959 = 1

# Initialisation de la variable ptval_TotalDataVolOut

erreur_660003959 = i_EntierToString(0,ptval_TotalDataVolOut_660003959,24)
longInteger1_L_660003959 = 24
longInteger2_L_660003959 = 24

POINT SOM_dataVolumeOU

erreur_660003959 = i_EntierToString(indice_660003959, pt_indice_660003959, 4)
erreur_660003959 = i_format_str2(pt_ic_dataVolumeOU_660003959, "%s%s", "dataVolumeOU", pt_indice_660003959)
ic_dataVolumeOU_660003959 = i_get_field_num(g_iartin, pt_ic_dataVolumeOU_660003959)

SI ( ic_dataVolumeOU_660003959 != -1)
ALORS
  SI (i_valid_field_n(g_iartin, ic_dataVolumeOU_660003959))
  ALORS
    erreur_660003959=Entier8Bytes_660003942(g_iartin ,ic_dataVolumeOU_660003959, ptval_dataVolumeOU_660003959)
    trace2("Tcrae_gprs: pour le champ :<%s>",pt_ic_dataVolumeOU_660003959, 0)
    trace2("val_dataVolumeOU : <%s>", ptval_dataVolumeOU_660003959, 0)
    SI ( erreur_660003959 == 0)
    ALORS
      erreur_660003959 = i_largeIntegersAdd (ptval_TotalDataVolOut_660003959,longInteger1_L_660003959,ptval_dataVolumeOU_660003959,longInteger2_L_660003959)
    FINSI
  FINSI
FINSI

SI (indice_660003959 < 9)
ALORS
  indice_660003959 = indice_660003959 +1
  SAUT SOM_dataVolumeOU
FINSI

trace2("La somme des dataVolumeOUT est de : %s", ptval_TotalDataVolOut_660003959,0)

SI (i_strlen(ptval_TotalDataVolOut_660003959)>9)
ALORS
  erreur_660003959 = i_memcpy_art_field(g_iartout , "TotalDataVolOut", "999999999", 9)
SINON
  erreur_660003959 = Ajuster_taille_string2_2_660003942(ptval_TotalDataVolOut_660003959,9)
  i_strcpy(pt_resultat_660003959, ptval_TotalDataVolOut_660003959)
  trace2("TotalDataVolOut pt_resultat : <%s>", pt_resultat_660003959, 0)
  erreur_660003959 = i_memcpy_art_field(g_iartout , "TotalDataVolOut", pt_resultat_660003959, 9)
FINSI

# MAJ du champ IdCrae


SI (i_valid_field_n(g_iartin, $Tcrae_gprs::idCrae))
ALORS
  trace("Ttapin80 : MAJ du champ <IdCrae>")
  erreur_660003959 = i_memcpy_art_field(g_iartout, "IdCrae", g_iartin.idCrae[], 8)
FINSI

# Duplication de g_iartout(TAP2++) dans g_iartout5 (TAP2.5)

erreur_660003959 = i_dup_art_id(g_iartout, g_iartout5)

trace("Ttapin80 => Tap2++ : MAJ du champ <ChargeableUnits>")

# calcul des ChargeableUnits pour tous les chargeItem confondus

indice2_660003959 = 1
erreur_660003959 = i_EntierToString(0, pt_chargeableSM_00_660003959, 24)

#SI pas de T3t27.1_charge , ne pas faire des calculs

SI (i_valid_field_n(g_iartin, $Tcrae_gprs::chargedItem1-4))
ALORS

  POINT  SOM_CHARGEABLE_LIST

  indice_660003959 = 10
  erreur_660003959 = i_EntierToString(indice2_660003959 ,pt_ic1_chargeable_660003959,1)

  POINT  SOM_CHARGEABLES

  erreur_660003959 = i_EntierToString(indice_660003959,pt_ic2_chargeable_660003959,4)
  erreur_660003959 = i_format_str2(pt_ic3_chargeable_660003959,"%s_%s", pt_ic1_chargeable_660003959, pt_ic2_chargeable_660003959)
  erreur_660003959  = i_format_str2(pt_ic_chargeable_660003959, "%s%s", "chgblUnits", pt_ic3_chargeable_660003959)
  trace2("**Tcrae_gprs ,chargeable nom :<%s>",pt_ic_chargeable_660003959, 0)
  ic_chargeable_660003959 = i_get_field_num(g_iartin, pt_ic_chargeable_660003959)

  SI ( ic_chargeable_660003959 != -1)
  ALORS
    erreur_660003959=Entier8Bytes_660003942(g_iartin, ic_chargeable_660003959, ptval_chargeable_660003959)
    trace2("Tcrae_gprs ,ptval_chargeable <%s>", ptval_chargeable_660003959, 0)
    trace1("Tcrae_gprs ,ic_chargeable <%d>", ic_chargeable_660003959)
    erreur_660003959 = i_get_art_str(g_iartin, ic_chargeable_660003959 +2, pt_chargeType_660003959)
    trace2("pt_chargeType : %s",pt_chargeType_660003959 ,0)
# calcul des chargeables dont le charge type est a 00

    SI ( (i_strcmp(pt_chargeType_660003959, "00")==0) || (i_strcmp(pt_chargeType_660003959, "0")==0) || (i_strcmp(pt_chargeType_660003959, "000")==0))

    ALORS
      erreur_660003959=i_largeIntegersAdd(pt_chargeableSM_00_660003959,longInteger1_L_660003959,ptval_chargeable_660003959,longInteger2_L_660003959)
      trace2("Tcrae_gprs ,pt_chargeableSM_00 <%s>", pt_chargeableSM_00_660003959, 0)
    FINSI
  FINSI

  SI (indice_660003959 <19 )
  ALORS
    indice_660003959 = indice_660003959 +1
    SAUT SOM_CHARGEABLES
  FINSI

  indice2_660003959 = indice2_660003959 +1

  SI (indice2_660003959 <= 4)
  ALORS
    SAUT  SOM_CHARGEABLE_LIST
  FINSI

  erreur_660003959  = Ajuster_taille_string2_2_660003942(pt_chargeableSM_00_660003959, 9)
  i_strcpy(pt_resultat_660003959, pt_chargeableSM_00_660003959)
  i_get_sub_str(pt_resultat_660003959, 0, 2, pt_chargeableMB_660003959)
  i_get_sub_str(pt_resultat_660003959, 3, 8, pt_chargeable_660003959)
  trace2("Chargeable : <%s>", pt_chargeable_660003959, 0)
  erreur_660003959 = i_memcpy_art_field(g_iartout , "ChargeableUnits", pt_chargeable_660003959, 6)
  trace("Ttapin80 => Tap2.5 : MAJ du champ <ChgUnMBCount>")
  trace2("ChargeableMB : <%s>", pt_chargeableMB_660003959, 0)
  erreur_660003959 = i_memcpy_art_field(g_iartout, "ChgUnMBCount", pt_chargeableMB_660003959 , 3)

FINSI

trace("Ttapin80 => Tap2.5 : MAJ du champ <ChargeableUnits>")

# calcul des chargedUnits pour tous les chargeItem confondus
longInteger1_L_660003959=24
longInteger2_L_660003959=24
indice2_660003959 = 1
erreur_660003959 = i_EntierToString(0,pt_chargedSM_00_660003959,24)

# SI pas de T3t27.1_charge , ne pas faire des calculs

SI (i_valid_field_n(g_iartin, $Tcrae_gprs::chargedItem1-4))
ALORS

  POINT  SOM_CHARGED_LIST

  indice_660003959 = 10
  erreur_660003959 = i_EntierToString(indice2_660003959 ,pt_ic1_charged_660003959,1)

  POINT  SOM_CHARGEDS

  erreur_660003959 = i_EntierToString(indice_660003959,pt_ic2_charged_660003959,4)
  erreur_660003959 = i_format_str2(pt_ic3_charged_660003959,"%s_%s", pt_ic1_charged_660003959, pt_ic2_charged_660003959)
  erreur_660003959  = i_format_str2(pt_ic_charged_660003959, "%s%s", "chargedUn", pt_ic3_charged_660003959)
  trace2("**Tcrae_gprs ,charged nom :<%s>",pt_ic_charged_660003959, 0)
  ic_charged_660003959 = i_get_field_num(g_iartin, pt_ic_charged_660003959)

  SI ( ic_charged_660003959 != -1)
  ALORS
    erreur_660003959=Entier8Bytes_660003942(g_iartin, ic_charged_660003959, ptval_charged_660003959)
    trace2("Tcrae_gprs ,ptval_charged <%d>",ptval_charged_660003959,0)
    trace1("Tcrae_gprs ,ic_charged <%d>", ic_charged_660003959)

    erreur_660003959 = i_get_art_str(g_iartin, ic_charged_660003959 +1, pt_chargeType_660003959)
    trace2("pt_chargeType : %s",pt_chargeType_660003959 ,0)
# calcul des chargeds dont le charge type est a 00

    SI ( (i_strcmp(pt_chargeType_660003959, "00")==0) || (i_strcmp(pt_chargeType_660003959, "0")==0) || (i_strcmp(pt_chargeType_660003959, "000")==0))
    ALORS
      erreur_660003959=i_largeIntegersAdd(pt_chargedSM_00_660003959,longInteger1_L_660003959,ptval_charged_660003959,longInteger2_L_660003959)
    FINSI
  FINSI

  SI (indice_660003959 <19 )
  ALORS
    indice_660003959 = indice_660003959 +1
    SAUT SOM_CHARGEDS
  FINSI

  indice2_660003959 = indice2_660003959 +1

  SI (indice2_660003959 <= 4)
  ALORS
    SAUT  SOM_CHARGED_LIST
  FINSI

  erreur_660003959 = Ajuster_taille_string2_2_660003942(pt_chargedSM_00_660003959, 9)
  i_strcpy(pt_resultat_660003959, pt_chargedSM_00_660003959)
  i_get_sub_str(pt_resultat_660003959, 0, 2, pt_chargedMB_660003959)
  i_get_sub_str(pt_resultat_660003959, 3, 8, pt_charged_660003959)
  trace2("Charged : <%s>", pt_charged_660003959, 0)
  erreur_660003959 = i_memcpy_art_field(g_iartout5 , "ChargeableUnits", pt_charged_660003959, 6)
  trace("Ttapin80 => Tap2.5 : MAJ du champ <ChgUnMBCount>")
  trace2("ChargedMB : <%s>", pt_chargedMB_660003959, 0)
  erreur_660003959 = i_memcpy_art_field(g_iartout5, "ChgUnMBCount", pt_chargedMB_660003959 , 3)
FINSI

#########################################################
# Duplication du Tcrae_gprs vers Ttapin82   #
#########################################################

# g_iartout2 => TYPE 82 (Tap2++ et Tap2.5)

SI ( ( i_valid_field_n(g_iartin, $Tcrae_gprs::acesPointNamNI) ) ||
  ( i_valid_field_n(g_iartin, $Tcrae_gprs::acesPointNameOI) ) ||
  ( i_valid_field_n(g_iartin, $Tcrae_gprs::IMEI) ) )
ALORS
  trace("DUPLICATION DU TYPE 82")

  TYPE_82_660003959 = 1

  erreur_660003959 = i_dup_art_dest(g_iartin , g_iartout2, "Ttapin82")

# MAJ du champ RecordType

  trace("Ttapin82 : MAJ du champ <RecordType>")
  erreur_660003959 = i_memcpy_art_field_n(g_iartout2, $Ttapin82::RecordType, "82", 2)

# MAJ du champ IMSI

  trace("Ttapin82 : MAJ du champ <IMSI>")
  trace("IMSI maj avec le champ IMSI du Ttapin80")
  erreur_660003959 = i_get_field_str(g_iartout, "IMSI", pt_IMSI_660003959)
  erreur_660003959 = i_memcpy_art_field_n(g_iartout2, $Ttapin82::IMSI, pt_IMSI_660003959, i_strlen(pt_IMSI_660003959))

# MAJ du champ APNNetworkId

  SI ( i_valid_field_n(g_iartin, $Tcrae_gprs::acesPointNamNI) )
  ALORS
    trace("Ttapin82 : MAJ du champ <APNNetworkId>")
    i_strcpy(pt_acesPointNamNI_660003959,"")
    erreur_660003959 = i_get_field_str(g_iartin, "acesPointNamNI", pt_acesPointNamNI_660003959)
    erreur_660003959 = i_memcpy_art_field_n(g_iartout2, $Ttapin82::APNNetworkId, pt_acesPointNamNI_660003959, i_strlen(pt_acesPointNamNI_660003959))
  FINSI

# MAJ du champ APNOperatorId

  SI ( i_valid_field_n(g_iartin, $Tcrae_gprs::acesPointNameOI) )
  ALORS
    trace("Ttapin82 : MAJ du champ <APNOperatorId>")
    i_get_sub_str(i_get_art_fieldptr(g_iartin, $Tcrae_gprs::acesPointNameOI), 0, i_get_art_field(g_iartin, $Tcrae_gprs::acesPointNameOI-1)-1, pt_acesPointNameOI_660003959)
    erreur_660003959 = i_memcpy_art_field_n(g_iartout2, $Ttapin82::APNOperatorId, pt_acesPointNameOI_660003959, i_strlen(pt_acesPointNameOI_660003959))
  FINSI

# MAJ du champ IMEI

  SI ( i_valid_field_n(g_iartin, $Tcrae_gprs::IMEI) )
  ALORS
    trace("Ttapin82 : MAJ du champ <IMEI>")
    erreur_660003959 = i_get_field_str(g_iartin, "IMEI", pt_IMEI_660003959)
    erreur_660003959 = i_memcpy_art_field_n(g_iartout2, $Ttapin82::IMEI, pt_IMEI_660003959, i_strlen(pt_IMEI_660003959))
  FINSI

# MAJ du champ IdCrae
  SI (i_valid_field_n(g_iartin, $Tcrae_gprs::idCrae))
  ALORS
    trace("Ttapin82 : MAJ du champ <IdCrae>")
    erreur_660003959 = i_memcpy_art_field(g_iartout2, "IdCrae", g_iartin.idCrae[], 8)
  FINSI
SINON
  trace("PAS DE DUPLICATION DU TYPE 82")
FINSI

#########################################################
# Duplication du Tcrae_gprs vers Ttapin84   #
#########################################################

# g_iartout4 => TYPE 84 (Tap2++ et Tap2.5)

SI ( (PREMIER_SGSNAddress_IPV6_660003959 != 0) || (GGSNAddress_IPV6_660003959 == 1) || (PDPAddress_IPV6_660003959 == 1) )
ALORS

  trace("DUPLICATION DU TYPE 84")
  TYPE_84_660003959 = 1

  erreur_660003959 = i_dup_art_dest(g_iartin , g_iartout4, "Ttapin84")

# MAJ du champ RecordType

  trace("Ttapin84 : MAJ du champ <RecordType>")
  erreur_660003959 = i_memcpy_art_field_n(g_iartout4, $Ttapin84::RecordType, "84", 2)

# MAJ du champ IMSI

  trace("Ttapin84 : MAJ du champ <IMSI>")
  trace("IMSI maj avec le champ IMSI du Ttapin80")
  erreur_660003959 = i_get_field_str(g_iartout, "IMSI", pt_IMSI_660003959)
  erreur_660003959 = i_memcpy_art_field_n(g_iartout4, $Ttapin84::IMSI, pt_IMSI_660003959, i_strlen(pt_IMSI_660003959))

# MAJ du champ PDPType

  SI (i_valid_field_n(g_iartin, $Tcrae_gprs::PdpType))
  ALORS
    trace("Ttapin84 : MAJ du champ <PDPType>")
    val_PdpType_660003959 = i_get_art_field(g_iartin, $Tcrae_gprs::PdpType)
    erreur_660003959 = i_EntierToString(val_PdpType_660003959, pt_PdpType_660003959, 4)
    erreur_660003959 = i_memcpy_art_field(g_iartout4, "PDPType", pt_PdpType_660003959 , 1)
  FINSI

# MAJ du champ IpPDPAddress

  SI ( PDPAddress_IPV6_660003959 == 1)
  ALORS
    trace("Ttapin84 : MAJ du champ <IpPDPAddress>")
    erreur_660003959 = i_get_field_str(g_iartin, "PdpAddress", pt_PDPAddress_660003959)
    erreur_660003959 = i_memcpy_art_field_n(g_iartout4, $Ttapin84::IpPDPAddress, pt_PDPAddress_660003959, i_strlen(pt_PDPAddress_660003959))
  FINSI

# MAJ du champ IpGGSNAddress

  SI (GGSNAddress_IPV6_660003959 == 1)
  ALORS
    trace("Ttapin84 : MAJ du champ <IpGGSNAddress>")
    erreur_660003959 = i_memcpy_art_field_n(g_iartout4, $Ttapin84::IpGGSNAddress, pt_GGSNAddress_IPV6_660003959, i_strlen(pt_GGSNAddress_IPV6_660003959))
  FINSI

# MAJ du champ IpSGSNAddress

  SI (PREMIER_SGSNAddress_IPV6_660003959 != 0)
  ALORS
    trace("Ttapin84 : MAJ du champ <IpSGSNAddress>")
    erreur_660003959 = i_memcpy_art_field_n(g_iartout4, $Ttapin84::IpSGSNAddress, pt_SGSNAddress_IPV6_660003959, i_strlen(pt_SGSNAddress_IPV6_660003959))
  FINSI

# MAJ du champ ChargingId

  SI (i_valid_field_n(g_iartout, $Ttapin80::ChargingID))
  ALORS
    trace("Ttapin84 : MAJ du champ <ChargingId>")
    erreur_660003959 = i_get_field_str(g_iartout, "ChargingID", pt_charginID_660003959)
    erreur_660003959 = i_memcpy_art_field_n(g_iartout4, $Ttapin84::ChargingId, pt_charginID_660003959, i_strlen(pt_charginID_660003959))
  FINSI

# MAJ du champ IdCrae

  SI (i_valid_field_n(g_iartin, $Tcrae_gprs::idCrae))
  ALORS
    trace("Ttapin84 : MAJ du champ <IdCrae>")
    erreur_660003959 = i_memcpy_art_field(g_iartout4, "IdCrae", g_iartin.idCrae[], 8)
  FINSI

SINON
  trace("PAS DE DUPLICATION DU TYPE 84")
FINSI

#########################################################
# Duplication du Tcrae_gprs vers Ttapin86   #
#########################################################

# g_iartout6 => TYPE 86 (Tap2++ et Tap2.5)
# g_iartout7 => TYPE 86 (Tap2++ et Tap2.5)
# g_iartout8 => TYPE 86 (Tap2++ et Tap2.5)
# g_iartout9 => TYPE 86 (Tap2++ et Tap2.5)

SI (SGSNAddress_IPV6_660003959 != 0)
ALORS
  trace("DUPLICATION DU TYPE 86")
  TYPE_86_660003959 = 1
  erreur_660003959 = i_dup_art_dest(g_iartin , g_iartout6, "Ttapin86")

# MAJ du champ RecordType

  trace("Ttapin86 : MAJ du champ <RecordType>")
  erreur_660003959 = i_memcpy_art_field_n(g_iartout6, $Ttapin86::RecordType, "86", 2)

# MAJ du champ IMSI

  trace("Ttapin86 : MAJ du champ <IMSI>")
  trace("IMSI maj avec le champ IMSI du Ttapin80")
  erreur_660003959 = i_get_field_str(g_iartout, "IMSI", pt_IMSI_660003959)
  erreur_660003959 = i_memcpy_art_field_n(g_iartout6, $Ttapin86::IMSI, pt_IMSI_660003959, i_strlen(pt_IMSI_660003959))

# MAJ du champ IdCrae

  SI (i_valid_field_n(g_iartin, $Tcrae_gprs::idCrae))
  ALORS
    trace("Ttapin86 : MAJ du champ <IdCrae>")
    erreur_660003959 = i_memcpy_art_field(g_iartout6, "IdCrae", g_iartin.idCrae[], 8)
  FINSI

# MAJ des champs IpSGSNAddress1 et IpSGSNAddress2

  SI ( SGSNAddress_IPV6_660003959 <= 2)
  ALORS
    trace("1 Ttapin86 en SORTIE")
  SINON
    erreur_660003959 = i_dup_art_id(g_iartout6, g_iartout7)
    SI ( SGSNAddress_IPV6_660003959 <= 4)
    ALORS
      trace("2 Ttapin86 en SORTIE")
    SINON
      erreur_660003959 = i_dup_art_id(g_iartout6, g_iartout8)
      SI ( SGSNAddress_IPV6_660003959 <= 6)
      ALORS
        trace("3 Ttapin86 en SORTIE")
      SINON
        erreur_660003959 = i_dup_art_id(g_iartout6, g_iartout9)
        trace("4 Ttapin86 en SORTIE")
      FINSI
    FINSI
  FINSI

  trace("Ttapin86 : MAJ des champs <IpSGSNAddress1> et <IpSGSNAddress2>")
  indice_660003959 = PREMIER_SGSNAddress_IPV6_660003959 + 1

  POINT MAJ_IpSGSNAddress

  SI ( indice_660003959 < 10)
  ALORS
    erreur_660003959 = i_EntierToString(indice_660003959, pt_indice_660003959, 4)
  SINON
    erreur_660003959 = i_EntierToString(indice_660003959, pt_indice_660003959, 4)
  FINSI
  erreur_660003959 = i_format_str2(pt_ic_RecEntType_660003959, "%s%s", "RecEntType", pt_indice_660003959)
  erreur_660003959 = i_format_str2(pt_ic_RecEntId_660003959, "%s%s", "RecEntId", pt_indice_660003959)

  ic_RecEntType_660003959 = i_get_field_num(g_iartin, pt_ic_RecEntType_660003959)
  ic_RecEntId_660003959 = i_get_field_num(g_iartin, pt_ic_RecEntId_660003959)

  SI ( (ic_RecEntType_660003959 == -1) || (ic_RecEntId_660003959 == -1) )
  ALORS
    SAUT FIN_IpSGSNAddress
  FINSI

  SI ( (i_valid_field_n(g_iartin, ic_RecEntType_660003959)) && (i_valid_field_n(g_iartin, ic_RecEntId_660003959)) )
  ALORS
    val_RecEntType_660003959 = i_get_art_field(g_iartin, ic_RecEntType_660003959)
    erreur_660003959 = i_get_field_str(g_iartin, pt_ic_RecEntId_660003959, pt_RecEntId_660003959)

    trace1("val_RecEntType : %d", val_RecEntType_660003959)
    SI (val_RecEntType_660003959 == 4)
    ALORS
      erreur_660003959 = i_recupererValeur(pt_RecEntId_660003959, pt_terme_660003959, 4, ':')
      SI (i_strlen(pt_RecEntId_660003959) != 0)
      ALORS
        erreur_660003959 = i_recupererValeur(pt_RecEntId_660003959, pt_terme_660003959, 4, ':')
        SI (i_strlen(pt_RecEntId_660003959) != 0)
        ALORS
          nb_SGSNAddress_IPV6_660003959 = nb_SGSNAddress_IPV6_660003959 + 1
          erreur_660003959 = i_get_field_str(g_iartin, pt_ic_RecEntId_660003959, pt_SGSNAddress_IPV6_660003959)
          SI (nb_SGSNAddress_IPV6_660003959 == 1)
          ALORS
            erreur_660003959 = i_memcpy_art_field_n(g_iartout6, $Ttapin86::IpSGSNAddress1,
            pt_SGSNAddress_IPV6_660003959, i_strlen(pt_SGSNAddress_IPV6_660003959))
          SINON
            SI (nb_SGSNAddress_IPV6_660003959 == 2)
            ALORS
              erreur_660003959 = i_memcpy_art_field_n(g_iartout6, $Ttapin86::IpSGSNAddress2,
              pt_SGSNAddress_IPV6_660003959, i_strlen(pt_SGSNAddress_IPV6_660003959))
            SINON
              SI (nb_SGSNAddress_IPV6_660003959 == 3)
              ALORS
                erreur_660003959 = i_memcpy_art_field_n(g_iartout7, $Ttapin86::IpSGSNAddress1,
                pt_SGSNAddress_IPV6_660003959, i_strlen(pt_SGSNAddress_IPV6_660003959))
              SINON
                SI (nb_SGSNAddress_IPV6_660003959 == 4)
                ALORS
                  erreur_660003959 = i_memcpy_art_field_n(g_iartout7, $Ttapin86::IpSGSNAddress2,
                  pt_SGSNAddress_IPV6_660003959, i_strlen(pt_SGSNAddress_IPV6_660003959))
                SINON
                  SI (nb_SGSNAddress_IPV6_660003959 == 5)
                  ALORS
                    erreur_660003959 = i_memcpy_art_field_n(g_iartout8, $Ttapin86::IpSGSNAddress1,
                    pt_SGSNAddress_IPV6_660003959, i_strlen(pt_SGSNAddress_IPV6_660003959))
                  SINON
                    SI (nb_SGSNAddress_IPV6_660003959 == 6)
                    ALORS
                      erreur_660003959 = i_memcpy_art_field_n(g_iartout8, $Ttapin86::IpSGSNAddress2,
                      pt_SGSNAddress_IPV6_660003959, i_strlen(pt_SGSNAddress_IPV6_660003959))
                    SINON
                      SI (nb_SGSNAddress_IPV6_660003959 == 7)
                      ALORS
                        erreur_660003959 = i_memcpy_art_field_n(g_iartout9, $Ttapin86::IpSGSNAddress1,
                        pt_SGSNAddress_IPV6_660003959, i_strlen(pt_SGSNAddress_IPV6_660003959))
                      SINON
                        SI (nb_SGSNAddress_IPV6_660003959 == 8)
                        ALORS
                          erreur_660003959 = i_memcpy_art_field_n(g_iartout9, $Ttapin86::IpSGSNAddress2,
                          pt_SGSNAddress_IPV6_660003959, i_strlen(pt_SGSNAddress_IPV6_660003959))
                        FINSI
                      FINSI
                    FINSI
                  FINSI
                FINSI
              FINSI
            FINSI
          FINSI
        FINSI
      FINSI
    FINSI
  SINON
    SAUT FIN_IpSGSNAddress
  FINSI

  SI (indice_660003959 < 10)
  ALORS
    indice_660003959 = indice_660003959 + 1
    SAUT MAJ_IpSGSNAddress
  FINSI

  POINT FIN_IpSGSNAddress

# MAJ du champ RemotePDPAdr

  trace("Ttapin86 : MAJ du champ <RemotePDPAdr>")
  SI (i_valid_field_n(g_iartin, $Tcrae_gprs::remotePdpAddres))
  ALORS
    erreur_660003959 = i_get_field_str(g_iartin, "remotePdpAddres", pt_Address_660003959)
    erreur_660003959 = i_recupererValeur(pt_Address_660003959, pt_terme_660003959, 4, ':')
    SI (i_strlen(pt_Address_660003959) != 0)
    ALORS
      erreur_660003959 = i_recupererValeur(pt_Address_660003959, pt_terme_660003959, 4, ':')
      SI (i_strlen(pt_Address_660003959) != 0)
      ALORS
        trace("Le champ RemotePDPAdr est une address IPV6")
        erreur_660003959 = i_get_field_str(g_iartin, "remotePdpAddres", pt_RemotePDPAddress_660003959)
        erreur_660003959 = i_memcpy_art_field_n(g_iartout6, $Ttapin86::RemotePDPAdr, pt_RemotePDPAddress_660003959, i_strlen(pt_RemotePDPAddress_660003959))
      SINON
        trace("Le champ RemotePDPAdr est une address IPV4")
      FINSI
    FINSI
  FINSI
SINON
  trace("PAS DE DUPLICATION DU TYPE 86")
FINSI

#########################################################
# Duplication du Tcrae_gprs vers Ttapin88   #
#########################################################

# g_iartout10 => TYPE 88 (Tap2++ et Tap2.5)
# g_iartout11 => TYPE 88 (Tap2++ et Tap2.5)
# g_iartout12 => TYPE 88 (Tap2++ et Tap2.5)

TYPE_88_1_660003959 = 0
TYPE_88_2_660003959 = 0
TYPE_88_3_660003959 = 0
indice_660003959 = 1

POINT MAJ_TYPE88

useQosDelay_OK_660003959 = 0
useQosMeanput_OK_660003959 = 0
useQosPeakput_OK_660003959 = 0
useQosPrecdnc_OK_660003959 = 0
useQosReliabl_OK_660003959 = 0
dataVolumeIN_OK_660003959 = 0
dataVolumeOU_OK_660003959 = 0
gprsUsageTime_OK_660003959 = 0
gprsUTCOfCode_OK_660003959 = 0

erreur_660003959 = i_EntierToString(indice_660003959, pt_indice_660003959, 4)

erreur_660003959 = i_format_str2(pt_ic_useQosDelay_660003959, "%s%s", "useQosDelay", pt_indice_660003959)
ic_useQosDelay_660003959 = i_get_field_num(g_iartin, pt_ic_useQosDelay_660003959)
SI ( ic_useQosDelay_660003959 != -1)
ALORS
  SI ( i_valid_field_n(g_iartin, ic_useQosDelay_660003959) )
  ALORS
    val_useQosDelay_660003959 = i_get_art_field(g_iartin, ic_useQosDelay_660003959)
    SI (val_useQosDelay_660003959 != -1)
    ALORS
      useQosDelay_OK_660003959 = 1
    FINSI
  FINSI
FINSI

erreur_660003959 = i_format_str2(pt_ic_useQosMeanput_660003959, "%s%s", "useQosMeanput", pt_indice_660003959)
ic_useQosMeanput_660003959 = i_get_field_num(g_iartin, pt_ic_useQosMeanput_660003959)
SI ( ic_useQosMeanput_660003959 != -1)
ALORS
  SI ( i_valid_field_n(g_iartin, ic_useQosMeanput_660003959) )
  ALORS
    val_useQosMeanput_660003959 = i_get_art_field(g_iartin, ic_useQosMeanput_660003959)
    SI ( val_useQosMeanput_660003959 != -1)
    ALORS
      useQosMeanput_OK_660003959 = 1
    FINSI
  FINSI
FINSI

erreur_660003959 = i_format_str2(pt_ic_useQosPeakput_660003959, "%s%s", "useQosPeakput", pt_indice_660003959)
ic_useQosPeakput_660003959 = i_get_field_num(g_iartin, pt_ic_useQosPeakput_660003959)
SI ( ic_useQosPeakput_660003959 != -1)
ALORS
  SI ( i_valid_field_n(g_iartin, ic_useQosPeakput_660003959) )
  ALORS
    val_useQosPeakput_660003959 = i_get_art_field(g_iartin, ic_useQosPeakput_660003959)
    SI ( val_useQosPeakput_660003959 != -1)
    ALORS
      useQosPeakput_OK_660003959 = 1
    FINSI
  FINSI
FINSI

erreur_660003959 = i_format_str2(pt_ic_useQosPrecdnc_660003959, "%s%s", "useQosPrecdnc", pt_indice_660003959)
ic_useQosPrecdnc_660003959 = i_get_field_num(g_iartin, pt_ic_useQosPrecdnc_660003959)
SI ( ic_useQosPrecdnc_660003959 != -1 )
ALORS
  SI ( i_valid_field_n(g_iartin, ic_useQosPrecdnc_660003959) )
  ALORS
    val_useQosPrecdnc_660003959 = i_get_art_field(g_iartin, ic_useQosPrecdnc_660003959)
    SI ( val_useQosPrecdnc_660003959 != -1)
    ALORS
      useQosPrecdnc_OK_660003959 = 1
    FINSI
  FINSI
FINSI

erreur_660003959 = i_format_str2(pt_ic_useQosReliabl_660003959, "%s%s", "useQosReliabl", pt_indice_660003959)
ic_useQosReliabl_660003959 = i_get_field_num(g_iartin, pt_ic_useQosReliabl_660003959)
SI ( ic_useQosReliabl_660003959 != -1 )
ALORS
  SI ( i_valid_field_n(g_iartin, ic_useQosReliabl_660003959) )
  ALORS
    val_useQosReliabl_660003959 = i_get_art_field(g_iartin, ic_useQosReliabl_660003959)
    SI ( val_useQosReliabl_660003959 != -1 )
    ALORS
      useQosReliabl_OK_660003959 = 1
    FINSI
  FINSI
FINSI

erreur_660003959 = i_format_str2(pt_ic_dataVolumeIN_660003959, "%s%s", "dataVolumeIN", pt_indice_660003959)
ic_dataVolumeIN_660003959 = i_get_field_num(g_iartin, pt_ic_dataVolumeIN_660003959)
SI ( ic_dataVolumeIN_660003959 != -1)
ALORS
  SI ( i_valid_field_n(g_iartin, ic_dataVolumeIN_660003959) )
  ALORS
    erreur_660003959=Entier8Bytes_660003942(g_iartin, ic_dataVolumeIN_660003959, ptval_dataVolumeIN_660003959)
    SI (erreur_660003959 == 0)
    ALORS
      dataVolumeIN_OK_660003959 = 1
    FINSI
  FINSI
FINSI

erreur_660003959 = i_format_str2(pt_ic_dataVolumeOU_660003959, "%s%s", "dataVolumeOU", pt_indice_660003959)
ic_dataVolumeOU_660003959 = i_get_field_num(g_iartin, pt_ic_dataVolumeOU_660003959)
SI ( ic_dataVolumeOU_660003959 != -1)
ALORS
  SI ( i_valid_field_n(g_iartin, ic_dataVolumeOU_660003959) )
  ALORS
    erreur_660003959 = Entier8Bytes_660003942(g_iartin, ic_dataVolumeOU_660003959, ptval_dataVolumeOU_660003959)
    SI (erreur_660003959 ==0)
    ALORS
      dataVolumeOU_OK_660003959 = 1
    FINSI
  FINSI
FINSI

erreur_660003959 = i_format_str2(pt_ic_gprsUsageTime_660003959, "%s%s", "gprsUsageTime", pt_indice_660003959)
ic_gprsUsageTime_660003959 = i_get_field_num(g_iartin, pt_ic_gprsUsageTime_660003959)
SI (ic_gprsUsageTime_660003959 != -1)
ALORS
  SI ( i_valid_field_n(g_iartin, ic_gprsUsageTime_660003959) )
  ALORS
    pt_gprsUsageTime_660003959 = i_get_art_fieldptr(g_iartin, ic_gprsUsageTime_660003959)
    gprsUsageTime_OK_660003959 = 1
  FINSI
FINSI

erreur_660003959 = i_format_str2(pt_ic_gprsUTCOfCode_660003959, "%s%s", "gprsUTCOfCode", pt_indice_660003959)
ic_gprsUTCOfCode_660003959 = i_get_field_num(g_iartin, pt_ic_gprsUTCOfCode_660003959)
SI ( ic_gprsUTCOfCode_660003959 != -1)
ALORS
  SI ( i_valid_field_n(g_iartin, ic_gprsUTCOfCode_660003959) )
  ALORS
    val_gprsUTCOfCode_660003959 = i_get_art_field(g_iartin, ic_gprsUTCOfCode_660003959)
    SI ( val_gprsUTCOfCode_660003959 != -1 )
    ALORS
      gprsUTCOfCode_OK_660003959 = 1
    FINSI
  FINSI
FINSI

SI ( (useQosDelay_OK_660003959 == 1) || (useQosMeanput_OK_660003959 == 1) || (useQosPeakput_OK_660003959 == 1) ||
  (useQosPrecdnc_OK_660003959 == 1) || (useQosReliabl_OK_660003959 == 1) || (dataVolumeIN_OK_660003959 == 1) ||
  (dataVolumeOU_OK_660003959 == 1) || (gprsUsageTime_OK_660003959 == 1) || (gprsUTCOfCode_OK_660003959 == 1) )
ALORS
  SI ( TYPE_88_1_660003959 == 0)
  ALORS
    TYPE_88_660003959 = 1
    TYPE_88_1_660003959 = 1
    trace("Creation d un article de TYPE 88")
    erreur_660003959 = i_dup_art_dest(g_iartin , g_iartout10, "Ttapin88")

    trace("Ttapin88 : MAJ du champ <RecordType>")
    erreur_660003959 = i_memcpy_art_field_n(g_iartout10, $Ttapin88::RecordType, "88", 2)

    trace("Ttapin88 : MAJ du champ <IMSI>")
    trace("IMSI maj avec le champ IMSI du Ttapin80")
    erreur_660003959 = i_get_field_str(g_iartout, "IMSI", pt_IMSI_660003959)
    erreur_660003959 = i_memcpy_art_field_n(g_iartout10, $Ttapin88::IMSI, pt_IMSI_660003959, i_strlen(pt_IMSI_660003959))

    SI (i_valid_field_n(g_iartin, $Tcrae_gprs::idCrae))
    ALORS
      trace("Ttapin88 : MAJ du champ <IdCrae>")
      erreur_660003959 = i_memcpy_art_field(g_iartout10, "idCrae", g_iartin.idCrae[], 8)
    FINSI
  FINSI

  SI ( (TYPE_88_2_660003959 == 0) && (TYPE_88_1_660003959 > 3) )
  ALORS
    TYPE_88_2_660003959 = 1
    trace("Creation du 2ieme article de TYPE 88")
    erreur_660003959 = i_dup_art_dest(g_iartin , g_iartout11, "Ttapin88")

    trace("Ttapin88 : MAJ du champ <RecordType>")
    erreur_660003959 = i_memcpy_art_field_n(g_iartout11, $Ttapin88::RecordType, "88", 2)

    trace("Ttapin88 : MAJ du champ <IMSI>")
    trace("IMSI maj avec le champ IMSI du Ttapin80")
    erreur_660003959 = i_get_field_str(g_iartout, "IMSI", pt_IMSI_660003959)
    erreur_660003959 = i_memcpy_art_field_n(g_iartout11, $Ttapin88::IMSI, pt_IMSI_660003959, i_strlen(pt_IMSI_660003959))

    SI (i_valid_field_n(g_iartin, $Tcrae_gprs::idCrae))
    ALORS
      trace("Ttapin88 : MAJ du champ <IdCrae>")
      erreur_660003959 = i_memcpy_art_field(g_iartout11, "idCrae", g_iartin.idCrae[], 8)
    FINSI
  FINSI

  SI ( (TYPE_88_3_660003959 == 0) && (TYPE_88_2_660003959 > 3) )
  ALORS
    TYPE_88_3_660003959 = 1
    trace("Creation du 3ieme article de TYPE 88")
    erreur_660003959 = i_dup_art_dest(g_iartin , g_iartout12, "Ttapin88")

    trace("Ttapin88 : MAJ du champ <RecordType>")
    erreur_660003959 = i_memcpy_art_field_n(g_iartout12, $Ttapin88::RecordType, "88", 2)

    trace("Ttapin88 : MAJ du champ <IMSI>")
    trace("IMSI maj avec le champ IMSI du Ttapin80")
    erreur_660003959 = i_get_field_str(g_iartout, "IMSI", pt_IMSI_660003959)
    erreur_660003959 = i_memcpy_art_field_n(g_iartout12, $Ttapin88::IMSI, pt_IMSI_660003959, i_strlen(pt_IMSI_660003959))

    SI (i_valid_field_n(g_iartin, $Tcrae_gprs::idCrae))
    ALORS
      trace("Ttapin88 : MAJ du champ <IdCrae>")
      erreur_660003959 = i_memcpy_art_field(g_iartout12, "idCrae", g_iartin.idCrae[], 8)
    FINSI
  FINSI

  SI ( TYPE_88_3_660003959 != 0)
  ALORS
    erreur_660003959 = i_EntierToString(TYPE_88_3_660003959, pt_TYPE_88_3_660003959, 4)
    SI (useQosDelay_OK_660003959 == 1)
    ALORS
      erreur_660003959 = i_format_str2(pt_ic_UsedQoSDelay_660003959, "%s%s", "UsedQoSDelay_", pt_TYPE_88_3_660003959)
      erreur_660003959 = i_EntierToString(val_useQosDelay_660003959, pt_useQosDelay_660003959, 4)
      erreur_660003959 = i_memcpy_art_field(g_iartout12, pt_ic_UsedQoSDelay_660003959, pt_useQosDelay_660003959 , 1)
    FINSI

    SI (useQosMeanput_OK_660003959 == 1)
    ALORS
      erreur_660003959 = i_format_str2(pt_ic_UsedQoSMean_660003959, "%s%s", "UsedQoSMean_", pt_TYPE_88_3_660003959)
      i_strcpy(pt_useQosMeanput_660003959, "")
      erreur_660003959 = Ajuster_taille_entier2_660003942(val_useQosMeanput_660003959, 4, pt_useQosMeanput_660003959)
      erreur_660003959 = i_memcpy_art_field(g_iartout12, pt_ic_UsedQoSMean_660003959, pt_useQosMeanput_660003959 , 2)
    FINSI

    SI (useQosPeakput_OK_660003959 == 1)
    ALORS
      erreur_660003959 = i_format_str2(pt_ic_UsedQoSPeak_660003959, "%s%s", "UsedQoSPeak_", pt_TYPE_88_3_660003959)
      erreur_660003959 = i_EntierToString(val_useQosPeakput_660003959, pt_useQosPeakput_660003959, 4)
      erreur_660003959 = i_memcpy_art_field(g_iartout12, pt_ic_UsedQoSPeak_660003959, pt_useQosPeakput_660003959, 1)
    FINSI

    SI (useQosPrecdnc_OK_660003959 == 1)
    ALORS
      erreur_660003959 = i_format_str2(pt_ic_UsedQoSPrec_660003959, "%s%s", "UsedQoSPrec_", pt_TYPE_88_3_660003959)
      erreur_660003959 = i_EntierToString(val_useQosPrecdnc_660003959, pt_useQosPrecdnc_660003959, 4)
      erreur_660003959 = i_memcpy_art_field(g_iartout12, pt_ic_UsedQoSPrec_660003959, pt_useQosPrecdnc_660003959, 1)
    FINSI

    SI (useQosReliabl_OK_660003959 == 1)
    ALORS
      erreur_660003959 = i_format_str2(pt_ic_UsedQoSRelia_660003959, "%s%s", "UsedQoSRelia_", pt_TYPE_88_3_660003959)
      erreur_660003959 = i_EntierToString(val_useQosReliabl_660003959, pt_useQosReliabl_660003959, 4)
      erreur_660003959 = i_memcpy_art_field(g_iartout12, pt_ic_UsedQoSRelia_660003959, pt_useQosReliabl_660003959, 1)
    FINSI

    SI (dataVolumeIN_OK_660003959 == 1)
    ALORS
      erreur_660003959 = i_format_str2(pt_ic_DataVolumeInc_660003959, "%s%s", "DataVolumeInc_", pt_TYPE_88_3_660003959)
      erreur_660003959 = Ajuster_taille_string_2_660003942(ptval_dataVolumeIN_660003959, 12)
      i_strcpy(pt_resultat_660003959, ptval_dataVolumeIN_660003959)
      trace2("dataVolumeIN pt_resultat : <%s>", pt_resultat_660003959, 0)
      erreur_660003959 = i_memcpy_art_field(g_iartout12, pt_ic_DataVolumeInc_660003959, pt_resultat_660003959, 12)
    FINSI

    SI (dataVolumeOU_OK_660003959 == 1)
    ALORS
      erreur_660003959 = i_format_str2(pt_ic_DataVolumeOut_660003959, "%s%s", "DataVolumeOut_", pt_TYPE_88_3_660003959)

      erreur_660003959 = Ajuster_taille_string_2_660003942(ptval_dataVolumeOU_660003959, 12)
      i_strcpy(pt_resultat_660003959, ptval_dataVolumeOU_660003959)
      trace2("DataVolumeOut pt_resultat : <%s>", pt_resultat_660003959, 0)
      erreur_660003959 = i_memcpy_art_field(g_iartout12, pt_ic_DataVolumeOut_660003959, pt_resultat_660003959 , 12)
    FINSI

    SI (gprsUsageTime_OK_660003959 == 1)
    ALORS
      erreur_660003959 = i_format_str2(pt_ic_GPRS_UsageTp_660003959, "%s%s", "GPRS_UsageTp_", pt_TYPE_88_3_660003959)
      erreur_660003959 = i_memcpy_art_field(g_iartout12, pt_ic_GPRS_UsageTp_660003959, pt_gprsUsageTime_660003959, 14)
    FINSI

    SI (gprsUTCOfCode_OK_660003959 == 1)
    ALORS
      erreur_660003959 = i_format_str2(pt_ic_UTC_Time_Off_660003959, "%s%s", "UTC_Time_Off_", pt_TYPE_88_3_660003959)
      trace("# MAJ champ UTC Time OffsetCode")
#QC367
      SI (val_gprsUTCOfCode_660003959 != -1)
      ALORS
        erreur_660003959 = i_memset_field_n(g_iartout12 ,$Ttapin88::UTC_Time_Off_1, val_gprsUTCOfCode_660003959)
      FINSI
    FINSI
#/QC367

    SI (indice_660003959 < 9)
    ALORS
      TYPE_88_3_660003959 = TYPE_88_3_660003959 +1
      indice_660003959 = indice_660003959 + 1
      SAUT MAJ_TYPE88
    SINON
      SAUT DISTRIBUTION
    FINSI
  SINON
    SI ( TYPE_88_2_660003959 != 0)
    ALORS

      erreur_660003959 = i_EntierToString(TYPE_88_2_660003959, pt_TYPE_88_2_660003959, 4)

      SI (useQosDelay_OK_660003959 == 1)
      ALORS
        erreur_660003959 = i_format_str2(pt_ic_UsedQoSDelay_660003959, "%s%s", "UsedQoSDelay_", pt_TYPE_88_2_660003959)
        erreur_660003959 = i_EntierToString(val_useQosDelay_660003959, pt_useQosDelay_660003959, 4)
        erreur_660003959 = i_memcpy_art_field(g_iartout11, pt_ic_UsedQoSDelay_660003959, pt_useQosDelay_660003959 , 1)
      FINSI

      SI (useQosMeanput_OK_660003959 == 1)
      ALORS
        erreur_660003959 = i_format_str2(pt_ic_UsedQoSMean_660003959, "%s%s", "UsedQoSMean_", pt_TYPE_88_2_660003959)
        i_strcpy(pt_useQosMeanput_660003959, "")
        erreur_660003959 = Ajuster_taille_entier2_660003942(val_useQosMeanput_660003959, 4, pt_useQosMeanput_660003959)
        erreur_660003959 = i_memcpy_art_field(g_iartout11, pt_ic_UsedQoSMean_660003959, pt_useQosMeanput_660003959 , 2)
      FINSI

      SI (useQosPeakput_OK_660003959 == 1)
      ALORS
        erreur_660003959 = i_format_str2(pt_ic_UsedQoSPeak_660003959, "%s%s", "UsedQoSPeak_", pt_TYPE_88_2_660003959)
        erreur_660003959 = i_EntierToString(val_useQosPeakput_660003959, pt_useQosPeakput_660003959, 4)
        erreur_660003959 = i_memcpy_art_field(g_iartout11, pt_ic_UsedQoSPeak_660003959, pt_useQosPeakput_660003959, 1)
      FINSI

      SI (useQosPrecdnc_OK_660003959 == 1)
      ALORS
        erreur_660003959 = i_format_str2(pt_ic_UsedQoSPrec_660003959, "%s%s", "UsedQoSPrec_", pt_TYPE_88_2_660003959)
        erreur_660003959 = i_EntierToString(val_useQosPrecdnc_660003959, pt_useQosPrecdnc_660003959, 4)
        erreur_660003959 = i_memcpy_art_field(g_iartout11, pt_ic_UsedQoSPrec_660003959, pt_useQosPrecdnc_660003959, 1)
      FINSI

      SI (useQosReliabl_OK_660003959 == 1)
      ALORS
        erreur_660003959 = i_format_str2(pt_ic_UsedQoSRelia_660003959, "%s%s", "UsedQoSRelia_", pt_TYPE_88_2_660003959)
        erreur_660003959 = i_EntierToString(val_useQosReliabl_660003959, pt_useQosReliabl_660003959, 4)
        erreur_660003959 = i_memcpy_art_field(g_iartout11, pt_ic_UsedQoSRelia_660003959, pt_useQosReliabl_660003959, 1)
      FINSI

      SI (dataVolumeIN_OK_660003959 == 1)
      ALORS
        erreur_660003959 = i_format_str2(pt_ic_DataVolumeInc_660003959, "%s%s", "DataVolumeInc_", pt_TYPE_88_2_660003959)
        erreur_660003959 = Ajuster_taille_string_2_660003942(ptval_dataVolumeIN_660003959, 12)
        i_strcpy(pt_resultat_660003959, ptval_dataVolumeIN_660003959)
        trace2("dataVolumeIN pt_resultat : <%s>", pt_resultat_660003959, 0)
        erreur_660003959 = i_memcpy_art_field(g_iartout11, pt_ic_DataVolumeInc_660003959, pt_resultat_660003959 , 12)
      FINSI

      SI (dataVolumeOU_OK_660003959 == 1)
      ALORS
        erreur_660003959 = i_format_str2(pt_ic_DataVolumeOut_660003959, "%s%s", "DataVolumeOut_", pt_TYPE_88_2_660003959)
        erreur_660003959 = Ajuster_taille_string_2_660003942(ptval_dataVolumeOU_660003959, 12)
        i_strcpy(pt_resultat_660003959, ptval_dataVolumeOU_660003959)
        trace2("DataVolumeOut pt_resultat : <%s>", pt_resultat_660003959, 0)
        erreur_660003959 = i_memcpy_art_field(g_iartout11, pt_ic_DataVolumeOut_660003959, pt_resultat_660003959 , 12)
      FINSI

      SI (gprsUsageTime_OK_660003959 == 1)
      ALORS
        erreur_660003959 = i_format_str2(pt_ic_GPRS_UsageTp_660003959, "%s%s", "GPRS_UsageTp_", pt_TYPE_88_2_660003959)
        erreur_660003959 = i_memcpy_art_field(g_iartout11, pt_ic_GPRS_UsageTp_660003959, pt_gprsUsageTime_660003959, 14)
      FINSI

      SI (gprsUTCOfCode_OK_660003959 == 1)
      ALORS
        erreur_660003959 = i_format_str2(pt_ic_UTC_Time_Off_660003959, "%s%s", "UTC_Time_Off_", pt_TYPE_88_2_660003959)
        trace("# MAJ champ UTC Time OffsetCode")
#QC367
        SI (val_gprsUTCOfCode_660003959 != -1)
        ALORS
          erreur_660003959 = i_memset_field_n(g_iartout11 ,$Ttapin88::UTC_Time_Off_1, val_gprsUTCOfCode_660003959)
        FINSI
#/QC367
      FINSI

      SI (indice_660003959 < 9)
      ALORS
        TYPE_88_2_660003959 = TYPE_88_2_660003959 +1
        indice_660003959 = indice_660003959 + 1
        SAUT MAJ_TYPE88
      SINON
        SAUT DISTRIBUTION
      FINSI
    SINON
      erreur_660003959 = i_EntierToString(TYPE_88_1_660003959, pt_TYPE_88_1_660003959, 4)

      SI (useQosDelay_OK_660003959 == 1)
      ALORS
        erreur_660003959 = i_format_str2(pt_ic_UsedQoSDelay_660003959, "%s%s", "UsedQoSDelay_", pt_TYPE_88_1_660003959)
        erreur_660003959 = i_EntierToString(val_useQosDelay_660003959, pt_useQosDelay_660003959, 4)
        erreur_660003959 = i_memcpy_art_field(g_iartout10, pt_ic_UsedQoSDelay_660003959, pt_useQosDelay_660003959 , 1)
        SI ( TYPE_88_1_660003959 == 1)
        ALORS
          SI ( i_valid_field_n(g_iartin, $Tcrae_gprs::qosDelay1) )
          ALORS
            val_qosDelay1_660003959 = i_get_art_field(g_iartin, $Tcrae_gprs::qosDelay1)
            SI (val_qosDelay1_660003959 != -1)
            ALORS
              erreur_660003959 = i_EntierToString(val_qosDelay1_660003959, pt_qosDelay1_660003959, 4)
              erreur_660003959 = i_memcpy_art_field(g_iartout10, "RequestedQuoDel", pt_qosDelay1_660003959 , 1)
            FINSI
          FINSI
        FINSI
      FINSI

      SI (useQosMeanput_OK_660003959 == 1)
      ALORS
        erreur_660003959 = i_format_str2(pt_ic_UsedQoSMean_660003959, "%s%s", "UsedQoSMean_", pt_TYPE_88_1_660003959)
        i_strcpy(pt_useQosMeanput_660003959,"")
        erreur_660003959 = Ajuster_taille_entier2_660003942(val_useQosMeanput_660003959, 4, pt_useQosMeanput_660003959)
        erreur_660003959 = i_memcpy_art_field(g_iartout10, pt_ic_UsedQoSMean_660003959, pt_useQosMeanput_660003959 , 2)
        SI ( TYPE_88_1_660003959 == 1)
        ALORS
          SI ( i_valid_field_n(g_iartin, $Tcrae_gprs::qosMeanThrput1) )
          ALORS
            val_qosMeanThrput1_660003959 = i_get_art_field(g_iartin, $Tcrae_gprs::qosMeanThrput1)
            SI (val_qosMeanThrput1_660003959 != -1)
            ALORS
              erreur_660003959 = i_EntierToString(val_qosMeanThrput1_660003959, pt_qosMeanThrput1_660003959, 4)
# QC490 alarme 1444
              res_660003959 = i_strlen(pt_qosMeanThrput1_660003959)
              SI (res_660003959 > 2)
              ALORS
                res_660003959 = 2
              FINSI
              erreur_660003959 = i_memcpy_art_field(g_iartout10, "RequestedQuoMea", pt_qosMeanThrput1_660003959 , res_660003959 )
            FINSI
          FINSI
        FINSI
      FINSI

      SI (useQosPeakput_OK_660003959 == 1)
      ALORS
        erreur_660003959 = i_format_str2(pt_ic_UsedQoSPeak_660003959, "%s%s", "UsedQoSPeak_", pt_TYPE_88_1_660003959)
        erreur_660003959 = i_EntierToString(val_useQosPeakput_660003959, pt_useQosPeakput_660003959, 4)
        erreur_660003959 = i_memcpy_art_field(g_iartout10, pt_ic_UsedQoSPeak_660003959, pt_useQosPeakput_660003959, 1)
        SI ( TYPE_88_1_660003959 == 1)
        ALORS
          SI ( i_valid_field_n(g_iartin, $Tcrae_gprs::qosPeakThrput1) )
          ALORS
            val_qosPeakThrput1_660003959 = i_get_art_field(g_iartin, $Tcrae_gprs::qosPeakThrput1)
            SI (val_qosPeakThrput1_660003959 != -1)
            ALORS
              erreur_660003959 = i_EntierToString(val_qosPeakThrput1_660003959, pt_qosPeakThrput1_660003959, 4)
              erreur_660003959 = i_memcpy_art_field(g_iartout10, "RequestedQuoPea", pt_qosPeakThrput1_660003959 , 1)
            FINSI
          FINSI
        FINSI
      FINSI

      SI (useQosPrecdnc_OK_660003959 == 1)
      ALORS
        erreur_660003959 = i_format_str2(pt_ic_UsedQoSPrec_660003959, "%s%s", "UsedQoSPrec_", pt_TYPE_88_1_660003959)
        erreur_660003959 = i_EntierToString(val_useQosPrecdnc_660003959, pt_useQosPrecdnc_660003959, 4)
        erreur_660003959 = i_memcpy_art_field(g_iartout10, pt_ic_UsedQoSPrec_660003959, pt_useQosPrecdnc_660003959, 1)
        SI ( TYPE_88_1_660003959 == 1)
        ALORS
          SI ( i_valid_field_n(g_iartin, $Tcrae_gprs::qosPrecedence1) )
          ALORS
            val_qosPrecedence1_660003959 = i_get_art_field(g_iartin, $Tcrae_gprs::qosPrecedence1)
            SI (val_qosPrecedence1_660003959 != -1)
            ALORS
              erreur_660003959 = i_EntierToString(val_qosPrecedence1_660003959, pt_qosPrecedence1_660003959, 4)
              erreur_660003959 = i_memcpy_art_field(g_iartout10, "RequestedQuoPre", pt_qosPrecedence1_660003959 , 1)
            FINSI
          FINSI
        FINSI
      FINSI

      SI (useQosReliabl_OK_660003959 == 1)
      ALORS
        erreur_660003959 = i_format_str2(pt_ic_UsedQoSRelia_660003959, "%s%s", "UsedQoSRelia_", pt_TYPE_88_1_660003959)
        erreur_660003959 = i_EntierToString(val_useQosReliabl_660003959, pt_useQosReliabl_660003959, 4)
        erreur_660003959 = i_memcpy_art_field(g_iartout10, pt_ic_UsedQoSRelia_660003959, pt_useQosReliabl_660003959, 1)
        SI ( TYPE_88_1_660003959 == 1)
        ALORS
          SI ( i_valid_field_n(g_iartin, $Tcrae_gprs::qosReliablity1) )
          ALORS
            val_qosReliablity1_660003959 = i_get_art_field(g_iartin, $Tcrae_gprs::qosReliablity1)
            SI (val_qosReliablity1_660003959 != -1)
            ALORS
              erreur_660003959 = i_EntierToString(val_qosReliablity1_660003959, pt_qosReliablity1_660003959, 4)
              erreur_660003959 = i_memcpy_art_field(g_iartout10, "RequestedQuoRel", pt_qosReliablity1_660003959 , 1)
            FINSI
          FINSI
        FINSI
      FINSI

      SI (dataVolumeIN_OK_660003959 == 1)
      ALORS
        erreur_660003959 = i_format_str2(pt_ic_DataVolumeInc_660003959, "%s%s", "DataVolumeInc_", pt_TYPE_88_1_660003959)
        erreur_660003959 = Ajuster_taille_string_2_660003942(ptval_dataVolumeIN_660003959, 12)
        i_strcpy(pt_resultat_660003959, ptval_dataVolumeIN_660003959)
        trace2("dataVolumeIN pt_resultat : <%s>", pt_resultat_660003959, 0)
        erreur_660003959 = i_memcpy_art_field(g_iartout10, pt_ic_DataVolumeInc_660003959, pt_resultat_660003959 , 12)
      FINSI

      SI (dataVolumeOU_OK_660003959 == 1)
      ALORS
        erreur_660003959 = i_format_str2(pt_ic_DataVolumeOut_660003959, "%s%s", "DataVolumeOut_", pt_TYPE_88_1_660003959)
        erreur_660003959 = Ajuster_taille_string_2_660003942(ptval_dataVolumeOU_660003959, 12)
        i_strcpy(pt_resultat_660003959, ptval_dataVolumeOU_660003959)
        trace2("DataVolumeOut pt_resultat : <%s>", pt_resultat_660003959, 0)
        erreur_660003959 = i_memcpy_art_field(g_iartout10, pt_ic_DataVolumeOut_660003959, pt_resultat_660003959 , 12)
      FINSI

      SI (gprsUsageTime_OK_660003959 == 1)
      ALORS
        erreur_660003959 = i_format_str2(pt_ic_GPRS_UsageTp_660003959, "%s%s", "GPRS_UsageTp_", pt_TYPE_88_1_660003959)
        erreur_660003959 = i_memcpy_art_field(g_iartout10, pt_ic_GPRS_UsageTp_660003959, pt_gprsUsageTime_660003959, 14)
      FINSI

      SI (gprsUTCOfCode_OK_660003959 == 1)
      ALORS
        erreur_660003959 = i_format_str2(pt_ic_UTC_Time_Off_660003959, "%s%s", "UTC_Time_Off_", pt_TYPE_88_1_660003959)
#QC367
        trace("# MAJ champ UTC Time OffsetCode")
        SI (val_gprsUTCOfCode_660003959 != -1)
        ALORS
          erreur_660003959 = i_memset_field_n(g_iartout10 ,$Ttapin88::UTC_Time_Off_1, val_gprsUTCOfCode_660003959)
        FINSI
#/QC367
      FINSI
      SI (indice_660003959 < 9)
      ALORS
        TYPE_88_1_660003959 = TYPE_88_1_660003959 +1
        indice_660003959 = indice_660003959 + 1
        SAUT  MAJ_TYPE88
      SINON
        SAUT DISTRIBUTION
      FINSI
    FINSI
  FINSI
SINON
  SAUT DISTRIBUTION
FINSI

#------------------------------- FIN DE DUPLICATION ------------------------------


#------------------------------- DEBUT DE DISTRIBUTION ---------------------------

POINT DISTRIBUTION

# G5R2lot2
SI REDIST_IMSI_Transnational_M2M_660003959
ALORS
  SAUT PT_REDIS_Transnational
FINSI

date_fin_660003959  = i_get_art_field(g_iartin, $Tcrae_gprs::dfin)

erreur_660003959 = i_LireReqConsTabDist()
SI (erreur_660003959 != 0)
ALORS
  # IMSI inconnu
  # G5R2lot2
  SI IMSI_Transnational_M2M_660003959
  ALORS
    REDIST_IMSI_Transnational_M2M_660003959 = 1
    SAUT PT_REDIS_Transnational
  SINON
    SAUT REDISTRIB
  FINSI
FINSI

nombreECC_660003959 = i_LireNombreECC()
trace1(" Retour i_LireNombreECC :<%d>", nombreECC_660003959)
SI (nombreECC_660003959 == 0)
ALORS
  # echec Retour i_LireNombreECC
  SI IMSI_Transnational_M2M_660003959
  ALORS
    REDIST_IMSI_Transnational_M2M_660003959 = 1
    SAUT PT_REDIS_Transnational
  SINON
    SAUT REDISTRIB
  FINSI
FINSI

instECC_660003959 = i_LireEntierECC(0)
SI (instECC_660003959 == -1)
ALORS
  # echec i_LireEntierECC
  SI IMSI_Transnational_M2M_660003959
  ALORS
    REDIST_IMSI_Transnational_M2M_660003959 = 1
    SAUT PT_REDIS_Transnational
  SINON
    SAUT REDISTRIB
  FINSI
FINSI
trace1("Retour de i_LireEntierECC = <%d>",instECC_660003959 )



POINT PT_REDIS_Transnational
# -------------------------------- NVD (NVDDCH), si Transnationnal et IMSI inconnu du referentiel SGRT --------------------------------------

SI REDIST_IMSI_Transnational_M2M_660003959
ALORS
###### APPLICATION NVDDCH #######

#  Enrichissement du CRA par le numero de filter
  ptchp_format_660003959 = i_get_tab_field(FORMAT_ECC_660003959, date_cra_660003959, "NVDDCH")
  SI (i_strplcmp(ptchp_format_660003959, "TLV16", 7, 5) == 0)
  ALORS
    erreur_660003959 = i_ajout_tlv(g_iartin, "T3t3_NumOfFilte", "")
    erreur_660003959 = i_resize_tlv(g_iartin, "T3t3_NumOfFilte", "NumOfFilter", 1)
    SI (erreur_660003959!=0)
    ALORS
      trace("Erreur d'ajout du TLV <T3t3_NumOfFilte>")
      code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
      erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "NumOfFilter", pt_NameOfFile_660003959)
      erreur_660003959 = i_PlvMessEmettre(8889, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
      SAUT STOCKE_ERRONE
    FINSI
    erreur_660003959 = i_set_art_field(g_iartin, $Tcrae_gprs::NumOfFilter, 0x38)
  FINSI

  instNVDDCH_660003959 = i_LireInstanceECC("NVDDCH")
  SI (instNVDDCH_660003959 == -1)
  ALORS
    trace("Pas d'instance : NVDDCH")
    code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
    erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "NVDDCH", pt_NameOfFile_660003959)
    erreur_660003959 = i_PlvMessEmettre(8893, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
    SAUT STOCKE_ERRONE
  FINSI

  trace("<<<__LINE__<<<__FILE__<<< application NVDDCH")
  instanceECC_660003959 = instNVDDCH_660003959

#G3R10 b_FILTRE_tabExt_DchApnTrt
  res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout, g_iartout5, instanceECC_660003959 , ptchp_format_660003959, date_fin_660003959, 80)
  SI (res_660003959 == STCK_KO_660003959)
  ALORS
    trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin80 a l'application NVDDCH")
    code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
    erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "NVDDCH", pt_NameOfFile_660003959)
    erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
    SAUT STOCKE_ERRONE
  FINSI

  SI (TYPE_82_660003959 == 1)
  ALORS
    res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout2, g_iartout2, instanceECC_660003959 , ptchp_format_660003959, date_fin_660003959, 82)
    SI (res_660003959 == STCK_KO_660003959)
    ALORS
      trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin82 a l'application NVDDCH")
      code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
      erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "NVDDCH", pt_NameOfFile_660003959)
      erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
      SAUT STOCKE_ERRONE
    FINSI
  FINSI

  SI (TYPE_84_660003959 == 1)
  ALORS
    res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout4, g_iartout4, instanceECC_660003959 , ptchp_format_660003959, date_fin_660003959, 84)
    SI (res_660003959 == STCK_KO_660003959)
    ALORS
      trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin84 a l'application NVDDCH")
      code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
      erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "NVDDCH", pt_NameOfFile_660003959)
      erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
      SAUT STOCKE_ERRONE
    FINSI
  FINSI

  SI (TYPE_86_660003959 == 1)
  ALORS
    SI (nb_SGSNAddress_IPV6_660003959 >6)
    ALORS
      res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout9, g_iartout9, instanceECC_660003959 , ptchp_format_660003959, date_fin_660003959, 86)
      SI (res_660003959 == STCK_KO_660003959)
      ALORS
        trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin86 a l'application NVDDCH")
        code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
        erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "NVDDCH", pt_NameOfFile_660003959)
        erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
        SAUT STOCKE_ERRONE
      FINSI
    FINSI

    SI (nb_SGSNAddress_IPV6_660003959 >4)
    ALORS
      res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout8, g_iartout8, instanceECC_660003959 , ptchp_format_660003959, date_fin_660003959, 86)
      SI (res_660003959 == STCK_KO_660003959)
      ALORS
        trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin86 a l'application NVDDCH")
        code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
        erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "NVDDCH", pt_NameOfFile_660003959)
        erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
        SAUT STOCKE_ERRONE
      FINSI
    FINSI

    SI (nb_SGSNAddress_IPV6_660003959 >2)
    ALORS
      res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout7, g_iartout7, instanceECC_660003959 , ptchp_format_660003959, date_fin_660003959, 86)
      SI (res_660003959 == STCK_KO_660003959)
      ALORS
        trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin86 a l'application NVDDCH")
        code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
        erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "NVDDCH", pt_NameOfFile_660003959)
        erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
        SAUT STOCKE_ERRONE
      FINSI
    FINSI

    res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout6, g_iartout6, instanceECC_660003959 , ptchp_format_660003959, date_fin_660003959, 86)
    SI (res_660003959 == STCK_KO_660003959)
    ALORS
      trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin86 a l'application NVDDCH")
      code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
      erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "NVDDCH", pt_NameOfFile_660003959)
      erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
      SAUT STOCKE_ERRONE
    FINSI
  FINSI

  SI (TYPE_88_660003959 == 1)
  ALORS
    res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout10, g_iartout10, instanceECC_660003959 , ptchp_format_660003959, date_fin_660003959, 88)
    SI (res_660003959 == STCK_KO_660003959)
    ALORS
      trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin88 a l'application NVDDCH")
      code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
      erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "NVDDCH", pt_NameOfFile_660003959)
      erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
      SAUT STOCKE_ERRONE
    FINSI

    SI (TYPE_88_2_660003959 != 0)
    ALORS
      res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout11, g_iartout11, instanceECC_660003959 , ptchp_format_660003959, date_fin_660003959, 88)
      SI (res_660003959 == STCK_KO_660003959)
      ALORS
        trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin88 a l'application NVDDCH")
        code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
        erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "NVDDCH", pt_NameOfFile_660003959)
        erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
        SAUT STOCKE_ERRONE
      FINSI
    FINSI

    SI (TYPE_88_3_660003959 != 0)
    ALORS
      res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout12, g_iartout12, instanceECC_660003959 , ptchp_format_660003959, date_fin_660003959, 88)
      SI (res_660003959 == STCK_KO_660003959)
      ALORS
        trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin88 a l'application NVDDCH")
        code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
        erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "NVDDCH", pt_NameOfFile_660003959)
        erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
        SAUT STOCKE_ERRONE
      FINSI
    FINSI
  FINSI
  SAUT ECC_SECONDAIRES
FINSI
#/G5R2lot2


# -------------------------------- DISE (MSFDCH), poubelle NVDDCH --------------------------------------
###### APPLICATION MSFDCH #######

SI (instECC_660003959 == i_LireInstanceECC("MSFGSM"))
ALORS
# Debut G1R7
  res_660003959=i_LireInfoECC( instECC_660003959, 0 )
  SI ( res_660003959!=0 )
  ALORS
    app_dest_660003959=i_LireEntierInfo( res_660003959, 1, 2)
    SI (app_dest_660003959==0x3133)
    ALORS
      MVNO_postpaid_660003959=1
    FINSI

    SI (app_dest_660003959==0x3135)
    ALORS
      CORIOLIS_660003959 = 1
    FINSI

    SI (app_dest_660003959==0x3131)
    ALORS
      DISE_Entreprise_660003959 = 1
    FINSI
#G3R5 lot1
    SI (app_dest_660003959==0x3134)
    ALORS
      MVNO_prepaye_660003959 = 1
    FINSI

  FINSI

# Calcul de FILTRE_TYPE_80 vrai si orange.acte ou orangevo.acte
  SI ( i_valid_field_n(g_iartin, $Tcrae_gprs::acesPointNamNI) )
  ALORS
    i_strcpy(pt_acesPointNamNI_660003959,"")
    erreur_660003959 = i_get_field_str(g_iartin, "acesPointNamNI", pt_acesPointNamNI_660003959)
    SI ( (i_strcmp(pt_acesPointNamNI_660003959,"orange.acte") == 0) || (i_strcmp(pt_acesPointNamNI_660003959,"ORANGE.ACTE") == 0) ||
      (i_strcmp(pt_acesPointNamNI_660003959,"orangevo.acte") == 0) || (i_strcmp(pt_acesPointNamNI_660003959,"ORANGEVO.ACTE") == 0) )
    ALORS
      FILTRE_TYPE_80_660003959 = 1
    FINSI
  FINSI

# Calcul de b_FILTRE_tabExt_DchApnTrt selon les cas suivants
  b_FILTRE_tabExt_DchApnTrt_660003959 = 0

  # ent
  SI (DISE_Entreprise_660003959 == 1) || (CORIOLIS_660003959 ==1)
  ALORS
    ##G3R10 lot4
    SI (i_valid_field_n(g_iartin, $Tcrae_gprs::acesPointNamNI))
    ALORS
      i_strcpy(pt_acesPointNamNI_660003959,"")
      erreur_660003959 = i_get_field_str(g_iartin, "acesPointNamNI", pt_acesPointNamNI_660003959)
      erreur_660003959 = i_format_str2(pt_buf1_660003959, "%s%s", "ent_", pt_acesPointNamNI_660003959 )
      SI ( table_exp_reg_660003942(LCASE_660003942(pt_buf1_660003959), "DCH_APN_TRT", date_cra_660003959) == 1)
      ALORS
        b_FILTRE_tabExt_DchApnTrt_660003959 = 1
      FINSI
    FINSI
  FINSI

  # mpo
  SI (MVNO_postpaid_660003959 == 1)
  ALORS
    ##G3R10 lot4
    SI (i_valid_field_n(g_iartin, $Tcrae_gprs::acesPointNamNI))
    ALORS
      i_strcpy(pt_acesPointNamNI_660003959,"")
      erreur_660003959 = i_get_field_str(g_iartin, "acesPointNamNI", pt_acesPointNamNI_660003959)
      erreur_660003959 = i_format_str2(pt_buf1_660003959, "%s%s", "mpo_", pt_acesPointNamNI_660003959 )
      SI ( table_exp_reg_660003942(LCASE_660003942(pt_buf1_660003959), "DCH_APN_TRT", date_cra_660003959) == 1)
      ALORS
        b_FILTRE_tabExt_DchApnTrt_660003959 = 1
      FINSI
    FINSI
  FINSI

  #mpr
  SI (MVNO_prepaye_660003959 == 1)
  ALORS
    ##G3R10 lot4
    SI (i_valid_field_n(g_iartin, $Tcrae_gprs::acesPointNamNI))
    ALORS
      i_strcpy(pt_acesPointNamNI_660003959,"")
      erreur_660003959 = i_get_field_str(g_iartin, "acesPointNamNI", pt_acesPointNamNI_660003959)
      erreur_660003959 = i_format_str2(pt_buf1_660003959, "%s%s", "mpr_", pt_acesPointNamNI_660003959 )
      SI ( table_exp_reg_660003942(LCASE_660003942(pt_buf1_660003959), "DCH_APN_TRT", date_cra_660003959) == 1)
      ALORS
        b_FILTRE_tabExt_DchApnTrt_660003959 = 1
      FINSI
    FINSI
  FINSI


  SI (FILTRE_TYPE_80_660003959 != 1 && b_FILTRE_tabExt_DchApnTrt_660003959 != 1)
  ALORS
    trace("**** DISTIBUTION VERS MSFDCH ****")
    instMSFDCH_660003959 = i_LireInstanceECC("MSFDCH")

    # recherche dans la table externe Format_ECC le format de l'application
    SI (instMSFDCH_660003959 == -1)
    ALORS
      trace("Pas d'instance : MSFDCH")
      code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
      erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "MSFDCH", pt_NameOfFile_660003959)
      erreur_660003959 = i_PlvMessEmettre(8893, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
      SAUT STOCKE_ERRONE
    FINSI
    trace("<<<__LINE__<<<__FILE__<<< application MSFDCH")
    instanceECC_660003959 = instMSFDCH_660003959
    ptchp_format_660003959 = i_get_tab_field(FORMAT_ECC_660003959, date_cra_660003959, "MSFDCH")

    res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout, g_iartout5, instanceECC_660003959 , ptchp_format_660003959, date_fin_660003959, 80)
    SI (res_660003959 == STCK_KO_660003959)
    ALORS
      trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin80 a l'application MSFDCH")
      code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
      erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "MSFDCH", pt_NameOfFile_660003959)
      erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
      SAUT STOCKE_ERRONE
    FINSI
  FINSI

###### APPLICATION NVDDCH #######

#  Enrichissement du CRA par le numero de filter
  ptchp_format_660003959 = i_get_tab_field(FORMAT_ECC_660003959, date_cra_660003959, "NVDDCH")
  SI (i_strplcmp(ptchp_format_660003959, "TLV16", 7, 5) == 0)
  ALORS
    erreur_660003959 = i_ajout_tlv(g_iartin, "T3t3_NumOfFilte", "")
    erreur_660003959 = i_resize_tlv(g_iartin, "T3t3_NumOfFilte", "NumOfFilter", 1)
    SI (erreur_660003959!=0)
    ALORS
      trace("Erreur d'ajout du TLV <T3t3_NumOfFilte>")
      code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
      erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "NumOfFilter", pt_NameOfFile_660003959)
      erreur_660003959 = i_PlvMessEmettre(8889, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
      SAUT STOCKE_ERRONE
    FINSI
    erreur_660003959 = i_set_art_field(g_iartin, $Tcrae_gprs::NumOfFilter, 0x30)
  FINSI

  instNVDDCH_660003959 = i_LireInstanceECC("NVDDCH")
  SI (instNVDDCH_660003959 == -1)
  ALORS
    trace("Pas d'instance : NVDDCH")
    code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
    erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "NVDDCH", pt_NameOfFile_660003959)
    erreur_660003959 = i_PlvMessEmettre(8893, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
    SAUT STOCKE_ERRONE
  FINSI

  trace("<<<__LINE__<<<__FILE__<<< application NVDDCH")
  instanceECC_660003959 = instNVDDCH_660003959

#G3R10 b_FILTRE_tabExt_DchApnTrt
  SI (FILTRE_TYPE_80_660003959 == 1 || b_FILTRE_tabExt_DchApnTrt_660003959 == 1)
  ALORS
    res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout, g_iartout5, instanceECC_660003959 , ptchp_format_660003959, date_fin_660003959, 80)
    SI (res_660003959 == STCK_KO_660003959)
    ALORS
      trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin80 a l'application NVDDCH")
      code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
      erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "NVDDCH", pt_NameOfFile_660003959)
      erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
      SAUT STOCKE_ERRONE
    FINSI
  FINSI

  SI (TYPE_82_660003959 == 1)
  ALORS
    res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout2, g_iartout2, instanceECC_660003959 , ptchp_format_660003959, date_fin_660003959, 82)
    SI (res_660003959 == STCK_KO_660003959)
    ALORS
      trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin82 a l'application NVDDCH")
      code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
      erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "NVDDCH", pt_NameOfFile_660003959)
      erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
      SAUT STOCKE_ERRONE
    FINSI
  FINSI

  SI (TYPE_84_660003959 == 1)
  ALORS
    res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout4, g_iartout4, instanceECC_660003959 , ptchp_format_660003959, date_fin_660003959, 84)
    SI (res_660003959 == STCK_KO_660003959)
    ALORS
      trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin84 a l'application NVDDCH")
      code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
      erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "NVDDCH", pt_NameOfFile_660003959)
      erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
      SAUT STOCKE_ERRONE
    FINSI
  FINSI

  SI (TYPE_86_660003959 == 1)
  ALORS
    SI (nb_SGSNAddress_IPV6_660003959 >6)
    ALORS
      res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout9, g_iartout9, instanceECC_660003959 , ptchp_format_660003959, date_fin_660003959, 86)
      SI (res_660003959 == STCK_KO_660003959)
      ALORS
        trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin86 a l'application NVDDCH")
        code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
        erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "NVDDCH", pt_NameOfFile_660003959)
        erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
        SAUT STOCKE_ERRONE
      FINSI
    FINSI

    SI (nb_SGSNAddress_IPV6_660003959 >4)
    ALORS
      res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout8, g_iartout8, instanceECC_660003959 , ptchp_format_660003959, date_fin_660003959, 86)
      SI (res_660003959 == STCK_KO_660003959)
      ALORS
        trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin86 a l'application NVDDCH")
        code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
        erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "NVDDCH", pt_NameOfFile_660003959)
        erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
        SAUT STOCKE_ERRONE
      FINSI
    FINSI

    SI (nb_SGSNAddress_IPV6_660003959 >2)
    ALORS
      res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout7, g_iartout7, instanceECC_660003959 , ptchp_format_660003959, date_fin_660003959, 86)
      SI (res_660003959 == STCK_KO_660003959)
      ALORS
        trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin86 a l'application NVDDCH")
        code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
        erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "NVDDCH", pt_NameOfFile_660003959)
        erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
        SAUT STOCKE_ERRONE
      FINSI
    FINSI

    res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout6, g_iartout6, instanceECC_660003959 , ptchp_format_660003959, date_fin_660003959, 86)
    SI (res_660003959 == STCK_KO_660003959)
    ALORS
      trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin86 a l'application NVDDCH")
      code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
      erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "NVDDCH", pt_NameOfFile_660003959)
      erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
      SAUT STOCKE_ERRONE
    FINSI
  FINSI

  SI (TYPE_88_660003959 == 1)
  ALORS
    res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout10, g_iartout10, instanceECC_660003959 , ptchp_format_660003959, date_fin_660003959, 88)
    SI (res_660003959 == STCK_KO_660003959)
    ALORS
      trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin88 a l'application NVDDCH")
      code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
      erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "NVDDCH", pt_NameOfFile_660003959)
      erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
      SAUT STOCKE_ERRONE
    FINSI

    SI (TYPE_88_2_660003959 != 0)
    ALORS
      res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout11, g_iartout11, instanceECC_660003959 , ptchp_format_660003959, date_fin_660003959, 88)
      SI (res_660003959 == STCK_KO_660003959)
      ALORS
        trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin88 a l'application NVDDCH")
        code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
        erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "NVDDCH", pt_NameOfFile_660003959)
        erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
        SAUT STOCKE_ERRONE
      FINSI
    FINSI

    SI (TYPE_88_3_660003959 != 0)
    ALORS
      res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout12, g_iartout12, instanceECC_660003959 , ptchp_format_660003959, date_fin_660003959, 88)
      SI (res_660003959 == STCK_KO_660003959)
      ALORS
        trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin88 a l'application NVDDCH")
        code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
        erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "NVDDCH", pt_NameOfFile_660003959)
        erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
        SAUT STOCKE_ERRONE
      FINSI
    FINSI
  FINSI
  SAUT ECC_SECONDAIRES
FINSI
# -------------------------------- COMDCH ou FRCDCH vers poubelle NVCDCH --------------------------------------
#-------------------------------#
# G3R9 lot2 COME
# APPLICATION  COMDCH ou FRCDCH
#-------------------------------#

# calcul de b_COMESI et des ID-instance de COMDCH et sinon FRCDCH
b_COMESI_660003959 =0
SI (instECC_660003959 == i_LireInstanceECC("COMGSM"))
ALORS
  b_COMESI_660003959 = 1
  # calcul ID-instance de COMDCH
  instCOMDCH_660003959 = i_LireInstanceECC("COMDCH")
  SI (instCOMDCH_660003959 == -1)
  ALORS
    trace("Pas d'instance : COMDCH")
    code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
    erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "COMDCH", pt_NameOfFile_660003959)
    erreur_660003959 = i_PlvMessEmettre(8893, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
    SAUT STOCKE_ERRONE
  FINSI
SINON
  SI (instECC_660003959 == i_LireInstanceECC("FRCGSM"))
  ALORS
    b_COMESI_660003959 = 2
    # calcul ID-instance de FRCDCH
    instFRCDCH_660003959 = i_LireInstanceECC("FRCDCH")
    SI (instFRCDCH_660003959 == -1)
    ALORS
      trace("Pas d'instance : FRCDCH")
      code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
      erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "FRCDCH", pt_NameOfFile_660003959)
      erreur_660003959 = i_PlvMessEmettre(8893, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
      SAUT STOCKE_ERRONE
    FINSI
  FINSI
FINSI

SI (b_COMESI_660003959)
ALORS
  trace1("COMGSM ou FRCGSM : instECC = <%d>", instECC_660003959)

  SI ( i_valid_field_n(g_iartin, $Tcrae_gprs::acesPointNamNI) )
  ALORS
    i_strcpy(pt_acesPointNamNI_660003959,"")
    erreur_660003959 = i_get_field_str(g_iartin, "acesPointNamNI", pt_acesPointNamNI_660003959)
    SI (i_strcmp(pt_acesPointNamNI_660003959,"orange.acte") == 0 || i_strcmp(pt_acesPointNamNI_660003959,"ORANGE.ACTE") == 0 ||
      i_strcmp(pt_acesPointNamNI_660003959,"orangevo.acte") == 0 || i_strcmp(pt_acesPointNamNI_660003959,"ORANGEVO.ACTE") == 0)
    ALORS
      FILTRE_TYPE_80_660003959 = 1
    SINON
      FILTRE_TYPE_80_660003959 = 0
    FINSI
  FINSI

  ##G3R10 lot4
  # ent
  b_FILTRE_tabExt_DchApnTrt_660003959 = 0
  SI (i_valid_field_n(g_iartin, $Tcrae_gprs::acesPointNamNI))
  ALORS
    i_strcpy(pt_acesPointNamNI_660003959,"")
    erreur_660003959 = i_get_field_str(g_iartin, "acesPointNamNI", pt_acesPointNamNI_660003959)
    erreur_660003959 = i_format_str2(pt_buf1_660003959, "%s%s", "ent_", pt_acesPointNamNI_660003959 )
    SI ( table_exp_reg_660003942(LCASE_660003942(pt_buf1_660003959), "DCH_APN_TRT", date_cra_660003959) == 1)
    ALORS
      b_FILTRE_tabExt_DchApnTrt_660003959 = 1
    FINSI
  FINSI

  ##############################################

###### APPLICATION COMDCH ou FRCDCH #######
  SI ( !FILTRE_TYPE_80_660003959 && !b_FILTRE_tabExt_DchApnTrt_660003959 )
  ALORS
    SI (b_COMESI_660003959 == 1)
    ALORS
      # vers COMDCH
      trace("**** COMDCH ****")
      # recherche dans la table externe Format_ECC le format de l'application
      ptchp_format_660003959 = i_get_tab_field(FORMAT_ECC_660003959, date_cra_660003959, "COMDCH")

      res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout, g_iartout5, instCOMDCH_660003959, ptchp_format_660003959, date_fin_660003959, 80)
      SI (res_660003959 == STCK_KO_660003959)
      ALORS
        trace("**Tcrae_gprs , erreur d'envoi de l'article a l'application COMDCH")
        code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
        erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "COMDCH", pt_NameOfFile_660003959)
        erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
        SAUT STOCKE_ERRONE
      FINSI
    SINON
      # vers FRCDCH
      trace("**** FRCDCH ****")
      # recherche dans la table externe Format_ECC le format de l'application
      ptchp_format_660003959 = i_get_tab_field(FORMAT_ECC_660003959, date_cra_660003959, "FRCDCH")

      res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout, g_iartout5, instFRCDCH_660003959, ptchp_format_660003959, date_fin_660003959, 80)
      SI (res_660003959 == STCK_KO_660003959)
      ALORS
        trace("**Tcrae_gprs , erreur d'envoi de l'article a l'application FRCDCH")
        code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
        erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "FRCDCH", pt_NameOfFile_660003959)
        erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
        SAUT STOCKE_ERRONE
      FINSI
    FINSI
  FINSI

###### APPLICATION NVCDCH #######
  instNVCDCH_660003959 = i_LireInstanceECC("NVCDCH")
  SI (instNVCDCH_660003959 == -1)
  ALORS
    trace("Pas d'instance : NVCDCH")
    code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
    erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "NVCDCH", pt_NameOfFile_660003959)
    erreur_660003959 = i_PlvMessEmettre(8893, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
    SAUT STOCKE_ERRONE
  FINSI

#  Enrichissement du CRA par le numero de filter
  ptchp_format_660003959 = i_get_tab_field(FORMAT_ECC_660003959, date_cra_660003959, "NVCDCH")
  SI (i_strplcmp(ptchp_format_660003959, "TLV16", 7, 5) == 0)
  ALORS
    erreur_660003959 = i_ajout_tlv(g_iartin, "T3t3_NumOfFilte", "")
    erreur_660003959 = i_resize_tlv(g_iartin, "T3t3_NumOfFilte", "NumOfFilter", 1)
    SI (erreur_660003959!=0)
    ALORS
      trace("Erreur d'ajout du TLV <T3t3_NumOfFilte>")
      code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
      erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "NumOfFilter", pt_NameOfFile_660003959)
      erreur_660003959 = i_PlvMessEmettre(8889, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
      SAUT STOCKE_ERRONE
    FINSI
    erreur_660003959 = i_set_art_field(g_iartin, $Tcrae_gprs::NumOfFilter, 0x37)
  FINSI

  trace("<<<__LINE__<<<__FILE__<<< application NVCDCH")
  SI (FILTRE_TYPE_80_660003959 || b_FILTRE_tabExt_DchApnTrt_660003959)
  ALORS
    res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout, g_iartout5, instNVCDCH_660003959 , ptchp_format_660003959, date_fin_660003959, 80)
    SI (res_660003959 == STCK_KO_660003959)
    ALORS
      trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin80 a l'application NVCDCH")
      code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
      erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "NVCDCH", pt_NameOfFile_660003959)
      erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
      SAUT STOCKE_ERRONE
    FINSI
  FINSI

  SI (TYPE_82_660003959)
  ALORS
    res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout2, g_iartout2, instNVCDCH_660003959 , ptchp_format_660003959, date_fin_660003959, 82)
    SI (res_660003959 == STCK_KO_660003959)
    ALORS
      trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin82 a l'application NVCDCH")
      code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
      erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "NVCDCH", pt_NameOfFile_660003959)
      erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
      SAUT STOCKE_ERRONE
    FINSI
  FINSI

  SI (TYPE_84_660003959)
  ALORS
    res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout4, g_iartout4, instNVCDCH_660003959 , ptchp_format_660003959, date_fin_660003959, 84)
    SI (res_660003959 == STCK_KO_660003959)
    ALORS
      trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin84 a l'application NVCDCH")
      code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
      erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "NVCDCH", pt_NameOfFile_660003959)
      erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
      SAUT STOCKE_ERRONE
    FINSI
  FINSI

  SI (TYPE_86_660003959)
  ALORS
    SI (nb_SGSNAddress_IPV6_660003959 >6)
    ALORS
      res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout9, g_iartout9, instNVCDCH_660003959 , ptchp_format_660003959, date_fin_660003959, 86)
      SI (res_660003959 == STCK_KO_660003959)
      ALORS
        trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin86 a l'application NVCDCH")
        code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
        erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "NVCDCH", pt_NameOfFile_660003959)
        erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
        SAUT STOCKE_ERRONE
      FINSI
    FINSI

    SI (nb_SGSNAddress_IPV6_660003959 >4)
    ALORS
      res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout8, g_iartout8, instNVCDCH_660003959 , ptchp_format_660003959, date_fin_660003959, 86)
      SI (res_660003959 == STCK_KO_660003959)
      ALORS
        trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin86 a l'application NVCDCH")
        code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
        erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "NVCDCH", pt_NameOfFile_660003959)
        erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
        SAUT STOCKE_ERRONE
      FINSI
    FINSI

    SI (nb_SGSNAddress_IPV6_660003959 >2)
    ALORS
      res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout7, g_iartout7, instNVCDCH_660003959 , ptchp_format_660003959, date_fin_660003959, 86)
      SI (res_660003959 == STCK_KO_660003959)
      ALORS
        trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin86 a l'application NVCDCH")
        code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
        erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "NVCDCH", pt_NameOfFile_660003959)
        erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
        SAUT STOCKE_ERRONE
      FINSI
    FINSI

    res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout6, g_iartout6, instNVCDCH_660003959 , ptchp_format_660003959, date_fin_660003959, 86)
    SI (res_660003959 == STCK_KO_660003959)
    ALORS
      trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin86 a l'application NVCDCH")
      code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
      erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "NVCDCH", pt_NameOfFile_660003959)
      erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
      SAUT STOCKE_ERRONE
    FINSI
  FINSI

  SI (TYPE_88_660003959)
  ALORS
    res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout10, g_iartout10, instNVCDCH_660003959 , ptchp_format_660003959, date_fin_660003959, 88)
    SI (res_660003959 == STCK_KO_660003959)
    ALORS
      trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin88 a l'application NVCDCH")
      code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
      erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "NVCDCH", pt_NameOfFile_660003959)
      erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
      SAUT STOCKE_ERRONE
    FINSI

    SI (TYPE_88_2_660003959)
    ALORS
      res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout11, g_iartout11, instNVCDCH_660003959 , ptchp_format_660003959, date_fin_660003959, 88)
      SI (res_660003959 == STCK_KO_660003959)
      ALORS
        trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin88 a l'application NVCDCH")
        code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
        erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "NVCDCH", pt_NameOfFile_660003959)
        erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
        SAUT STOCKE_ERRONE
      FINSI
    FINSI

    SI (TYPE_88_3_660003959)
    ALORS
      res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout12, g_iartout12, instNVCDCH_660003959 , ptchp_format_660003959, date_fin_660003959, 88)
      SI (res_660003959 == STCK_KO_660003959)
      ALORS
        trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin88 a l'application NVCDCH")
        code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
        erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "NVCDCH", pt_NameOfFile_660003959)
        erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
        SAUT STOCKE_ERRONE
      FINSI
    FINSI
  FINSI
  SAUT ECC_SECONDAIRES
FINSI
#/G3R9 lot2 COME

## -------------------------------- FEDCH + (MSFDCH ou FRCDCH) ou poubelle NVDDCH ----------------------------
#-------------------------------#
# G3R9 lot2 FEGSM (Item COME)
# APPLICATION  FEGSM
#-------------------------------#

SI (instECC_660003959 == i_LireInstanceECC("FEGSM"))
ALORS
  trace1("FEGSM instECC = <%d>", instECC_660003959)
  # calcul de SYSFACT (ou app_dest)
  app_dest_660003959 = 0
  res_660003959 = i_LireInfoECC(instECC_660003959, 0)
  app_dest_660003959 = i_LireEntierInfo(res_660003959, 1, 2)
  # Calcul ID-instance FE, NVD avec leurs tests)
  instFEDCH_660003959 = i_LireInstanceECC("FEDCH")
  SI (instFEDCH_660003959 == -1)
  ALORS
    trace("Pas d'instance : FEDCH")
    code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
    erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "FEDCH", pt_NameOfFile_660003959)
    erreur_660003959 = i_PlvMessEmettre(8834, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
    SAUT STOCKE_ERRONE
  FINSI

  instNVDDCH_660003959 = i_LireInstanceECC("NVDDCH")
  SI (instNVDDCH_660003959 == -1)
  ALORS
    trace("Pas d'instance : NVDDCH")
    code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
    erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "NVDDCH", pt_NameOfFile_660003959)
    erreur_660003959 = i_PlvMessEmettre(8834, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
    SAUT STOCKE_ERRONE
  FINSI

  # Calcul variable fonctionnelle b_FE_Eligible_COME
  SI (app_dest_660003959 == 0x3430)
  ALORS
    b_FE_Eligible_COME_660003959 = 1
    # Calcul ID-instance FRCDCH et test
    instFRCDCH_660003959 = i_LireInstanceECC("FRCDCH")
    SI (instFRCDCH_660003959 == -1)
    ALORS
      trace("Pas d'instance : FRCDCH")
      code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
      erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "FRCDCH", pt_NameOfFile_660003959)
      erreur_660003959 = i_PlvMessEmettre(8834, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
      SAUT STOCKE_ERRONE
    FINSI
  SINON
    b_FE_Eligible_COME_660003959 = 0
    # Calcul ID-instance FRCDCH et test
    instMSFDCH_660003959 = i_LireInstanceECC("MSFDCH")
    SI (instMSFDCH_660003959 == -1)
    ALORS
      trace("Pas d'instance : MSFDCH")
      code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
      erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "MSFDCH", pt_NameOfFile_660003959)
      erreur_660003959 = i_PlvMessEmettre(8834, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
      SAUT STOCKE_ERRONE
    FINSI
  FINSI


  SI ( i_valid_field_n(g_iartin, $Tcrae_gprs::acesPointNamNI) )
  ALORS
    i_strcpy(pt_acesPointNamNI_660003959,"")
    erreur_660003959 = i_get_field_str(g_iartin, "acesPointNamNI", pt_acesPointNamNI_660003959)
    SI ( (i_strcmp(pt_acesPointNamNI_660003959,"orange.acte") == 0) || (i_strcmp(pt_acesPointNamNI_660003959,"ORANGE.ACTE") == 0) ||
      (i_strcmp(pt_acesPointNamNI_660003959,"orangevo.acte") == 0) || (i_strcmp(pt_acesPointNamNI_660003959,"ORANGEVO.ACTE") == 0) )
    ALORS
      FILTRE_TYPE_80_660003959 = 1
    SINON
      FILTRE_TYPE_80_660003959 = 0
    FINSI
  FINSI


  ##G3R10 lot4
  b_FILTRE_tabExt_DchApnTrt_660003959 = 0
  # ent
  SI (i_valid_field_n(g_iartin, $Tcrae_gprs::acesPointNamNI))
  ALORS
    i_strcpy(pt_acesPointNamNI_660003959,"")
    erreur_660003959 = i_get_field_str(g_iartin, "acesPointNamNI", pt_acesPointNamNI_660003959)
    erreur_660003959 = i_format_str2(pt_buf1_660003959, "%s%s", "ent_", pt_acesPointNamNI_660003959 )
    SI ( table_exp_reg_660003942(LCASE_660003942(pt_buf1_660003959), "DCH_APN_TRT", date_cra_660003959) == 1)
    ALORS
      b_FILTRE_tabExt_DchApnTrt_660003959 = 1
    FINSI
  FINSI


#QC272
  SI (FILTRE_TYPE_80_660003959 != 1 && b_FILTRE_tabExt_DchApnTrt_660003959 != 1)
  ALORS
    trace("**** DISTIBUTION VERS FEDCH et MSFDCH****")

    trace("<<<__LINE__<<<__FILE__<<< application FEDCH")
    # recherche dans la table externe Format_ECC le format de l'application
    ptchp_format_660003959 = i_get_tab_field(FORMAT_ECC_660003959, date_cra_660003959, "FEDCH")
    res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout, g_iartout5, instFEDCH_660003959 , ptchp_format_660003959, date_fin_660003959, 80)
    SI (res_660003959 == STCK_KO_660003959)
    ALORS
      trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin80 a l'application FEDCH")
      code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
      erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "FEDCH", pt_NameOfFile_660003959)
      erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
      SAUT STOCKE_ERRONE
    FINSI

    SI (b_FE_Eligible_COME_660003959)
    ALORS
      trace ("<<<__LINE__<<<__FILE__<<< application FRCDCH")
      ptchp_format_660003959 = i_get_tab_field(FORMAT_ECC_660003959, date_cra_660003959, "FRCDCH")
      res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout, g_iartout5, instFRCDCH_660003959 , ptchp_format_660003959, date_fin_660003959, 80)
      SI (res_660003959 == STCK_KO_660003959)
      ALORS
        trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin80 a l'application FRCDCH")
        code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
        erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "FRCDCH", pt_NameOfFile_660003959)
        erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
        SAUT STOCKE_ERRONE
      FINSI
    SINON
      trace ("<<<__LINE__<<<__FILE__<<< application MSFDCH")
      ptchp_format_660003959 = i_get_tab_field(FORMAT_ECC_660003959, date_cra_660003959, "MSFDCH")

      res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout, g_iartout5, instMSFDCH_660003959 , ptchp_format_660003959, date_fin_660003959, 80)
      SI (res_660003959 == STCK_KO_660003959)
      ALORS
        trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin80 a l'application MSFDCH")
        code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
        erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "MSFDCH", pt_NameOfFile_660003959)
        erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
        SAUT STOCKE_ERRONE
      FINSI
    FINSI
  FINSI

###### APPLICATION NVDDCH #######

#  Enrichissement du CRA par le numero de filter

  ptchp_format_660003959 = i_get_tab_field(FORMAT_ECC_660003959, date_cra_660003959, "NVDDCH")
  SI (i_strplcmp(ptchp_format_660003959, "TLV16", 7, 5) == 0)
  ALORS
    erreur_660003959 = i_ajout_tlv(g_iartin, "T3t3_NumOfFilte", "")
    erreur_660003959 = i_resize_tlv(g_iartin, "T3t3_NumOfFilte", "NumOfFilter", 1)
    SI (erreur_660003959!=0)
    ALORS
      trace("Erreur d'ajout du TLV <T3t3_NumOfFilte>")
      code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
      erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "NumOfFilter", pt_NameOfFile_660003959)
      erreur_660003959 = i_PlvMessEmettre(8889, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
      SAUT STOCKE_ERRONE
    FINSI

    erreur_660003959 = i_set_art_field(g_iartin, $Tcrae_gprs::NumOfFilter, 0x33)
  FINSI

  trace("<<<__LINE__<<<__FILE__<<< application NVDDCH")

  SI (FILTRE_TYPE_80_660003959 == 1 || b_FILTRE_tabExt_DchApnTrt_660003959 == 1)
  ALORS
    res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout, g_iartout5, instNVDDCH_660003959 , ptchp_format_660003959, date_fin_660003959, 80)
    SI (res_660003959 == STCK_KO_660003959)
    ALORS
      trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin80 a l'application NVDDCH")
      code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
      erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "NVDDCH", pt_NameOfFile_660003959)
      erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
      SAUT STOCKE_ERRONE
    FINSI
  FINSI

  SI (TYPE_82_660003959 == 1)
  ALORS
    res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout2, g_iartout2, instNVDDCH_660003959 , ptchp_format_660003959, date_fin_660003959, 82)
    SI (res_660003959 == STCK_KO_660003959)
    ALORS
      trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin82 a l'application NVDDCH")
      code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
      erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "NVDDCH", pt_NameOfFile_660003959)
      erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
      SAUT STOCKE_ERRONE
    FINSI
  FINSI

  SI (TYPE_84_660003959 == 1)
  ALORS
    res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout4, g_iartout4, instNVDDCH_660003959 , ptchp_format_660003959, date_fin_660003959, 84)
    SI (res_660003959 == STCK_KO_660003959)
    ALORS
      trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin84 a l'application NVDDCH")
      code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
      erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "NVDDCH", pt_NameOfFile_660003959)
      erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
      SAUT STOCKE_ERRONE
    FINSI
  FINSI

  SI (TYPE_86_660003959 == 1)
  ALORS
    SI (nb_SGSNAddress_IPV6_660003959 >6)
    ALORS
      res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout9, g_iartout9, instNVDDCH_660003959 , ptchp_format_660003959, date_fin_660003959, 86)
      SI (res_660003959 == STCK_KO_660003959)
      ALORS
        trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin86 a l'application NVDDCH")
        code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
        erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "NVDDCH", pt_NameOfFile_660003959)
        erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
        SAUT STOCKE_ERRONE
      FINSI
    FINSI

    SI (nb_SGSNAddress_IPV6_660003959 >4)
    ALORS
      res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout8, g_iartout8, instNVDDCH_660003959 , ptchp_format_660003959, date_fin_660003959, 86)
      SI (res_660003959 == STCK_KO_660003959)
      ALORS
        trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin86 a l'application NVDDCH")
        code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
        erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "NVDDCH", pt_NameOfFile_660003959)
        erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
        SAUT STOCKE_ERRONE
      FINSI
    FINSI

    SI (nb_SGSNAddress_IPV6_660003959 >2)
    ALORS
      res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout7, g_iartout7, instNVDDCH_660003959 , ptchp_format_660003959, date_fin_660003959, 86)
      SI (res_660003959 == STCK_KO_660003959)
      ALORS
        trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin86 a l'application NVDDCH")
        code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
        erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "NVDDCH", pt_NameOfFile_660003959)
        erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
        SAUT STOCKE_ERRONE
      FINSI
    FINSI

    res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout6, g_iartout6, instNVDDCH_660003959 , ptchp_format_660003959, date_fin_660003959, 86)
    SI (res_660003959 == STCK_KO_660003959)
    ALORS
      trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin86 a l'application NVDDCH")
      code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
      erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "NVDDCH", pt_NameOfFile_660003959)
      erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
      SAUT STOCKE_ERRONE
    FINSI
  FINSI

  SI (TYPE_88_660003959 == 1)
  ALORS
    res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout10, g_iartout10, instNVDDCH_660003959 , ptchp_format_660003959, date_fin_660003959, 88)
    SI (res_660003959 == STCK_KO_660003959)
    ALORS
      trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin88 a l'application NVDDCH")
      code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
      erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "NVDDCH", pt_NameOfFile_660003959)
      erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
      SAUT STOCKE_ERRONE
    FINSI

    SI (TYPE_88_2_660003959 != 0)
    ALORS
      res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout11, g_iartout11, instNVDDCH_660003959 , ptchp_format_660003959, date_fin_660003959, 88)
      SI (res_660003959 == STCK_KO_660003959)
      ALORS
        trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin88 a l'application NVDDCH")
        code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
        erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "NVDDCH", pt_NameOfFile_660003959)
        erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
        SAUT STOCKE_ERRONE
      FINSI
    FINSI

    SI (TYPE_88_3_660003959 != 0)
    ALORS
      res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout12, g_iartout12, instNVDDCH_660003959 , ptchp_format_660003959, date_fin_660003959, 88)
      SI (res_660003959 == STCK_KO_660003959)
      ALORS
        trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin88 a l'application NVDDCH")
        code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
        erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "NVDDCH", pt_NameOfFile_660003959)
        erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
        SAUT STOCKE_ERRONE
      FINSI
    FINSI
  FINSI
  SAUT ECC_SECONDAIRES
FINSI
#/G3R9 lot2 FEGSM


## -------------------------------- VDA (VDI,OLA,OL2,OL3,OR5) ou poubelle NVADCH ----------------------------
# G5R4lot2 Suppression VPF
SI (instECC_660003959 == i_LireInstanceECC("VDIGSM") || instECC_660003959 == i_LireInstanceECC("OLAGSM") || instECC_660003959 == i_LireInstanceECC("OL2GSM") || instECC_660003959 == i_LireInstanceECC("OL3GSM") || instECC_660003959 == i_LireInstanceECC("OR5GSM"))
ALORS
  # b_Filtrage_MMSsortant
  # filtre_mms
  SI (i_valid_field_n(g_iartin, $Tcrae_gprs::acesPointNamNI))
  ALORS
    i_strcpy(pt_acesPointNamNI_660003959,"")
    erreur_660003959 = i_get_field_str(g_iartin, "acesPointNamNI", pt_acesPointNamNI_660003959)
    erreur_660003959 = i_format_str2(pt_buf1_660003959, "%s%s", "filtre_mms_", pt_acesPointNamNI_660003959 )
    SI ( table_exp_reg_660003942(LCASE_660003942(pt_buf1_660003959), "DCH_APN_TRT", date_cra_660003959) == 1)
    ALORS
      b_Filtrage_MMSsortant_660003959 = 1
      # calculs des volumes
      trace2("<<<__LINE__<<<__FILE__<<< La somme des dataVolumeOUT est : %s", ptval_TotalDataVolOut_660003959,0)
      trace2("<<<__LINE__<<<__FILE__<<< La somme des dataVolumeIN est  : %s", ptval_TotalDataVolInc_660003959,0)
      SI ( (i_strlen(ptval_TotalDataVolInc_660003959)>i_strlen(ptval_TotalDataVolOut_660003959)) ||
        ( (i_strlen(ptval_TotalDataVolInc_660003959)==i_strlen(ptval_TotalDataVolOut_660003959)) &&
        (i_strcmp(ptval_TotalDataVolInc_660003959,ptval_TotalDataVolOut_660003959) >0) ) )
      ALORS
        #som_TotalUPDown = val_TotalDataVolOut + val_TotalDataVolInc
        #QC516 : initialisation de ptsom_TotalUPDown
        i_strcpy(ptsom_TotalUPDown_660003959,"0")
        erreur_660003959 = i_largeIntegersAdd(ptsom_TotalUPDown_660003959,24,ptval_TotalDataVolOut_660003959,24)
        erreur_660003959 = i_largeIntegersAdd(ptsom_TotalUPDown_660003959,24,ptval_TotalDataVolInc_660003959,24)
        i_strcpy(pt_seuilVolGPRS_660003959, i_get_tab_field("VariableContexte", date_cra_660003959, "SEUIL_VOLUMEGPRS"))
        SI(i_strcmp(pt_seuilVolGPRS_660003959, g_inull)!=0)
        ALORS
          i_strcpy(pt_TotalDataVol_660003959, ptsom_TotalUPDown_660003959)
          trace2("Total volume <%s> , Seuil Volume GPRS <%s>", pt_TotalDataVol_660003959,pt_seuilVolGPRS_660003959)
          SI( i_strlen(pt_TotalDataVol_660003959) > i_strlen(pt_seuilVolGPRS_660003959) )
          ALORS
            trace2("Total volume <%s> superieur au seuil <%s>", pt_TotalDataVol_660003959,pt_seuilVolGPRS_660003959)
            b_Filtrage_MMSsortant_660003959 = 0
          SINON
            SI( i_strlen(pt_TotalDataVol_660003959)== i_strlen(pt_seuilVolGPRS_660003959) )
            ALORS
              SI( i_strcmp(pt_TotalDataVol_660003959,pt_seuilVolGPRS_660003959) > 0 )
              ALORS
                trace2("Total volume <%s> superieur au seuil <%s>", pt_TotalDataVol_660003959,pt_seuilVolGPRS_660003959)
                b_Filtrage_MMSsortant_660003959 = 0
              FINSI
            SINON
              trace2("Total volume <%s> inferier au seuil <%s>", pt_TotalDataVol_660003959,pt_seuilVolGPRS_660003959)
            FINSI
          FINSI
        SINON
          # si le volume seuil n'est pas parametre, on desactive le filtre : seuil =0
          trace("Seuil Volume non configure , on prend comme valeur 0 par defaut")
          b_Filtrage_MMSsortant_660003959 = 0
        FINSI
      FINSI
    FINSI
  FINSI

  ##G3R10 lot4
  # grp (grand public), b_Filtrage_nonMMSortant
  b_Filtrage_nonMMSortant_660003959 = 0
  SI (i_valid_field_n(g_iartin, $Tcrae_gprs::acesPointNamNI))
  ALORS
    i_strcpy(pt_acesPointNamNI_660003959,"")
    erreur_660003959 = i_get_field_str(g_iartin, "acesPointNamNI", pt_acesPointNamNI_660003959)
    erreur_660003959 = i_format_str2(pt_buf1_660003959, "%s%s", "grp_", pt_acesPointNamNI_660003959 )
    SI ( table_exp_reg_660003942(LCASE_660003942(pt_buf1_660003959), "DCH_APN_TRT", date_cra_660003959) == 1)
    ALORS
      b_Filtrage_nonMMSortant_660003959 = 1
    FINSI
  FINSI

FINSI


#------------------------------------------------VDIDCH-------------------------------------------------------
# Mise en place du filtre pour l'application VDIDCH
####### APPLICATION VDIDCH #######

SI (instECC_660003959 == i_LireInstanceECC("VDIGSM"))
ALORS
  instVDIDCH_660003959 = i_LireInstanceECC("VDIDCH")
  SI (instVDIDCH_660003959 == -1)
  ALORS
    trace("Pas d'ECC : VDIDCH")
    SAUT STOCKE_ERRONE
  FINSI
  trace("<<<__LINE__<<<__FILE__<<< application VDIDCH")
  # recherche dans la table externe Format_ECC le format de l'application
  ptchp_format_660003959 = i_get_tab_field(FORMAT_ECC_660003959, date_cra_660003959, "VDIDCH")

#G1R7
  SI (b_Filtrage_MMSsortant_660003959 == 0 && b_Filtrage_nonMMSortant_660003959 == 0)
  ALORS
    trace("**** DISTIBUTION VERS VDIDCH ****")
    res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout, g_iartout5, instVDIDCH_660003959 , ptchp_format_660003959, date_fin_660003959, 80)
    SI (res_660003959 == STCK_KO_660003959)
    ALORS
      trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin80 a l'application VDIDCH")
      code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
      erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "VDIDCH", pt_NameOfFile_660003959)
      erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
      SAUT STOCKE_ERRONE
    FINSI
  SINON
    trace("Application VDIDCH: Filtrage MMS en Roaming out")
    erreur_660003959= Stockage_articleNVA_660003942(date_cra_660003959, date_fin_660003959, code_rejet_660003959, FORMAT_ECC_660003959)
    SI (erreur_660003959!=0)
    ALORS
      # Les message d erreurs et les alarmes sont geres dans la fonction
      SAUT STOCKE_ERRONE
    FINSI
  FINSI

  SI ( TYPE_82_660003959 == 1 )
  ALORS
    trace("Application VDIDCH: Filtrage type 82")
    erreur_660003959= Stockage_articleNVA_8X_660003942(date_cra_660003959, date_fin_660003959, code_rejet_660003959, FORMAT_ECC_660003959, g_iartout2, g_iartout2, 82)
    SI (erreur_660003959!=0)
    ALORS
      # Les message d erreurs et les alarmes sont geres dans la fonction
      SAUT STOCKE_ERRONE
    FINSI
  FINSI

  SI ( TYPE_84_660003959 == 1 )
  ALORS
    trace("Application VDIDCH: Filtrage type 84")
    erreur_660003959= Stockage_articleNVA_8X_660003942(date_cra_660003959, date_fin_660003959, code_rejet_660003959, FORMAT_ECC_660003959, g_iartout4, g_iartout4, 84)
    SI (erreur_660003959!=0)
    ALORS
      # Les message d erreurs et les alarmes sont geres dans la fonction
      SAUT STOCKE_ERRONE
    FINSI
  FINSI

  SI (TYPE_86_660003959 == 1)
  ALORS
    SI (nb_SGSNAddress_IPV6_660003959 >6)
    ALORS
      trace("Application VDIDCH: Filtrage type 86")
      erreur_660003959= Stockage_articleNVA_8X_660003942(date_cra_660003959, date_fin_660003959, code_rejet_660003959, FORMAT_ECC_660003959, g_iartout9, g_iartout9, 86)
      SI (erreur_660003959!=0)
      ALORS
        # Les message d erreurs et les alarmes sont geres dans la fonction
        SAUT STOCKE_ERRONE
      FINSI
    FINSI

    SI (nb_SGSNAddress_IPV6_660003959 >4)
    ALORS
      trace("Application VDIDCH: Filtrage type 86")
      erreur_660003959= Stockage_articleNVA_8X_660003942(date_cra_660003959, date_fin_660003959, code_rejet_660003959, FORMAT_ECC_660003959, g_iartout8, g_iartout8, 86)
      SI (erreur_660003959!=0)
      ALORS
        # Les message d erreurs et les alarmes sont geres dans la fonction
        SAUT STOCKE_ERRONE
      FINSI
    FINSI

    SI (nb_SGSNAddress_IPV6_660003959 >2)
    ALORS
      trace("Application VDIDCH: Filtrage type 86")
      erreur_660003959= Stockage_articleNVA_8X_660003942(date_cra_660003959, date_fin_660003959, code_rejet_660003959, FORMAT_ECC_660003959, g_iartout7, g_iartout7, 86)
      SI (erreur_660003959!=0)
      ALORS
        # Les message d erreurs et les alarmes sont geres dans la fonction
        SAUT STOCKE_ERRONE
      FINSI
    FINSI

    trace("Application VDIDCH: Filtrage type 86")
    erreur_660003959= Stockage_articleNVA_8X_660003942(date_cra_660003959, date_fin_660003959, code_rejet_660003959, FORMAT_ECC_660003959, g_iartout6, g_iartout6, 86)
    SI (erreur_660003959!=0)
    ALORS
      # Les message d erreurs et les alarmes sont geres dans la fonction
      SAUT STOCKE_ERRONE
    FINSI
  FINSI

  SI ( TYPE_88_660003959 == 1 )
  ALORS
    trace("Application VDIDCH: Filtrage type 88")
    erreur_660003959= Stockage_articleNVA_8X_660003942(date_cra_660003959, date_fin_660003959, code_rejet_660003959, FORMAT_ECC_660003959, g_iartout10, g_iartout10, 88)
    SI (erreur_660003959!=0)
    ALORS
      # Les message d erreurs et les alarmes sont geres dans la fonction
      SAUT STOCKE_ERRONE
    FINSI

    SI (TYPE_88_2_660003959 != 0)
    ALORS
      trace("Application VDIDCH: Filtrage type 88_2")
      erreur_660003959= Stockage_articleNVA_8X_660003942(date_cra_660003959, date_fin_660003959, code_rejet_660003959, FORMAT_ECC_660003959, g_iartout11, g_iartout11, 88)
      SI (erreur_660003959!=0)
      ALORS
        # Les message d erreurs et les alarmes sont geres dans la fonction
        SAUT STOCKE_ERRONE
      FINSI
    FINSI

    SI (TYPE_88_3_660003959 != 0)
    ALORS
      trace("Application VDIDCH: Filtrage type 88_3")
      erreur_660003959= Stockage_articleNVA_8X_660003942(date_cra_660003959, date_fin_660003959, code_rejet_660003959, FORMAT_ECC_660003959, g_iartout12, g_iartout12, 88)
      SI (erreur_660003959!=0)
      ALORS
        # Les message d erreurs et les alarmes sont geres dans la fonction
        SAUT STOCKE_ERRONE
      FINSI
    FINSI
  FINSI

  SAUT ECC_SECONDAIRES
FINSI

#------------------------------------------------OLADCH-------------------------------------------------------
###### APPLICATION OLADCH #######

SI (instECC_660003959 == i_LireInstanceECC("OLAGSM"))
ALORS
  trace("**** OLADCH ****")
  instOLADCH_660003959 = i_LireInstanceECC("OLADCH")
  SI (instOLADCH_660003959 == -1)
  ALORS
    trace("Pas d'ECC : OLADCH")
    SAUT STOCKE_ERRONE
  FINSI
  trace("application OLADCH")
  # recherche dans la table externe Format_ECC le format de l'application
  ptchp_format_660003959 = i_get_tab_field(FORMAT_ECC_660003959, date_cra_660003959, "OLADCH")

#G1R7
  SI (b_Filtrage_MMSsortant_660003959 == 0 && b_Filtrage_nonMMSortant_660003959 == 0)
  ALORS
    res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout, g_iartout5, instOLADCH_660003959 , ptchp_format_660003959, date_fin_660003959, 80)
    SI (res_660003959 == STCK_KO_660003959)
    ALORS
      trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin80 a l'application OLADCH")
      code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
      erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "OLADCH", pt_NameOfFile_660003959)
      erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
      SAUT STOCKE_ERRONE
    FINSI
  SINON
    trace("Application OLADCH: Filtrage MMS en Roaming out")
    erreur_660003959= Stockage_articleNVA_660003942(date_cra_660003959, date_fin_660003959, code_rejet_660003959, FORMAT_ECC_660003959)
    SI (erreur_660003959!=0)
    ALORS
      # Les message d erreurs et les alarmes sont geres dans la fonction
      SAUT STOCKE_ERRONE
    FINSI
  FINSI

  SI ( TYPE_82_660003959 == 1 )
  ALORS
    trace("Application OLADCH: Filtrage type 82")
    erreur_660003959= Stockage_articleNVA_8X_660003942(date_cra_660003959, date_fin_660003959, code_rejet_660003959, FORMAT_ECC_660003959, g_iartout2, g_iartout2, 82)
    SI (erreur_660003959!=0)
    ALORS
      # Les message d erreurs et les alarmes sont geres dans la fonction
      SAUT STOCKE_ERRONE
    FINSI
  FINSI

  SI ( TYPE_84_660003959 == 1 )
  ALORS
    trace("Application OLADCH: Filtrage type 84")
    erreur_660003959= Stockage_articleNVA_8X_660003942(date_cra_660003959, date_fin_660003959, code_rejet_660003959, FORMAT_ECC_660003959, g_iartout4, g_iartout4, 84)
    SI (erreur_660003959!=0)
    ALORS
      # Les message d erreurs et les alarmes sont geres dans la fonction
      SAUT STOCKE_ERRONE
    FINSI
  FINSI

  SI (TYPE_86_660003959 == 1)
  ALORS
    SI (nb_SGSNAddress_IPV6_660003959 >6)
    ALORS
      trace("Application OLADCH: Filtrage type 86")
      erreur_660003959= Stockage_articleNVA_8X_660003942(date_cra_660003959, date_fin_660003959, code_rejet_660003959, FORMAT_ECC_660003959, g_iartout9, g_iartout9, 86)
      SI (erreur_660003959!=0)
      ALORS
        # Les message d erreurs et les alarmes sont geres dans la fonction
        SAUT STOCKE_ERRONE
      FINSI
    FINSI

    SI (nb_SGSNAddress_IPV6_660003959 >4)
    ALORS
      trace("Application OLADCH: Filtrage type 86")
      erreur_660003959= Stockage_articleNVA_8X_660003942(date_cra_660003959, date_fin_660003959, code_rejet_660003959, FORMAT_ECC_660003959, g_iartout8, g_iartout8, 86)
      SI (erreur_660003959!=0)
      ALORS
        # Les message d erreurs et les alarmes sont geres dans la fonction
        SAUT STOCKE_ERRONE
      FINSI
    FINSI

    SI (nb_SGSNAddress_IPV6_660003959 >2)
    ALORS
      trace("Application OLADCH: Filtrage type 86")
      erreur_660003959= Stockage_articleNVA_8X_660003942(date_cra_660003959, date_fin_660003959, code_rejet_660003959, FORMAT_ECC_660003959, g_iartout7, g_iartout7, 86)
      SI (erreur_660003959!=0)
      ALORS
        # Les message d erreurs et les alarmes sont geres dans la fonction
        SAUT STOCKE_ERRONE
      FINSI
    FINSI

    trace("Application OLADCH: Filtrage type 86")
    erreur_660003959= Stockage_articleNVA_8X_660003942(date_cra_660003959, date_fin_660003959, code_rejet_660003959, FORMAT_ECC_660003959, g_iartout6, g_iartout6, 86)
    SI (erreur_660003959!=0)
    ALORS
      # Les message d erreurs et les alarmes sont geres dans la fonction
      SAUT STOCKE_ERRONE
    FINSI
  FINSI

  SI ( TYPE_88_660003959 == 1 )
  ALORS
    trace("Application OLADCH: Filtrage type 88")
    erreur_660003959= Stockage_articleNVA_8X_660003942(date_cra_660003959, date_fin_660003959, code_rejet_660003959, FORMAT_ECC_660003959, g_iartout10, g_iartout10, 88)
    SI (erreur_660003959!=0)
    ALORS
      # Les message d erreurs et les alarmes sont geres dans la fonction
      SAUT STOCKE_ERRONE
    FINSI

    SI (TYPE_88_2_660003959 != 0)
    ALORS
      trace("Application OLADCH: Filtrage type 88")
      erreur_660003959= Stockage_articleNVA_8X_660003942(date_cra_660003959, date_fin_660003959, code_rejet_660003959, FORMAT_ECC_660003959, g_iartout11, g_iartout11, 88)
      SI (erreur_660003959!=0)
      ALORS
        # Les message d erreurs et les alarmes sont geres dans la fonction
        SAUT STOCKE_ERRONE
      FINSI
    FINSI

    SI (TYPE_88_3_660003959 != 0)
    ALORS
      trace("Application OLADCH: Filtrage type 88")
      erreur_660003959= Stockage_articleNVA_8X_660003942(date_cra_660003959, date_fin_660003959, code_rejet_660003959, FORMAT_ECC_660003959, g_iartout12, g_iartout12, 88)
      SI (erreur_660003959!=0)
      ALORS
        # Les message d erreurs et les alarmes sont geres dans la fonction
        SAUT STOCKE_ERRONE
      FINSI
    FINSI
  FINSI

  SAUT ECC_SECONDAIRES
FINSI

#------------------------------------------------OL2DCH-------------------------------------------------------
###### APPLICATION OL2DCH #######

SI (instECC_660003959 == i_LireInstanceECC("OL2GSM"))
ALORS
  trace("**** OL2DCH ****")
  instOL2DCH_660003959 = i_LireInstanceECC("OL2DCH")

  SI (instOL2DCH_660003959 == -1)
  ALORS
    trace("Pas d'ECC : OL2DCH")
    SAUT STOCKE_ERRONE
  FINSI
  trace("application OL2DCH")
  # recherche dans la table externe Format_ECC le format de l'application
  ptchp_format_660003959 = i_get_tab_field(FORMAT_ECC_660003959, date_cra_660003959, "OL2DCH")

#G1R7
  SI (b_Filtrage_MMSsortant_660003959 == 0 && b_Filtrage_nonMMSortant_660003959 == 0)
  ALORS
    res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout, g_iartout5, instOL2DCH_660003959 , ptchp_format_660003959, date_fin_660003959, 80)
    SI (res_660003959 == STCK_KO_660003959)
    ALORS
      trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin80 a l'application OL2DCH")
      code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
      erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "OL2DCH", pt_NameOfFile_660003959)
      erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
      SAUT STOCKE_ERRONE
    FINSI
  SINON
    trace("Application OL2DCH: Filtrage MMS en Roaming out")
    erreur_660003959= Stockage_articleNVA_660003942(date_cra_660003959, date_fin_660003959, code_rejet_660003959, FORMAT_ECC_660003959)
    SI (erreur_660003959!=0)
    ALORS
      # Les message d erreurs et les alarmes sont geres dans la fonction
      SAUT STOCKE_ERRONE
    FINSI
  FINSI

  SI ( TYPE_82_660003959 == 1 )
  ALORS
    trace("Application OL2DCH: Filtrage type 82")
    erreur_660003959= Stockage_articleNVA_8X_660003942(date_cra_660003959, date_fin_660003959, code_rejet_660003959, FORMAT_ECC_660003959, g_iartout2, g_iartout2, 82)
    SI (erreur_660003959!=0)
    ALORS
      # Les message d erreurs et les alarmes sont geres dans la fonction
      SAUT STOCKE_ERRONE
    FINSI
  FINSI

  SI ( TYPE_84_660003959 == 1 )
  ALORS
    trace("Application OL2DCH: Filtrage type 84")
    erreur_660003959= Stockage_articleNVA_8X_660003942(date_cra_660003959, date_fin_660003959, code_rejet_660003959, FORMAT_ECC_660003959, g_iartout4, g_iartout4, 84)
    SI (erreur_660003959!=0)
    ALORS
      # Les message d erreurs et les alarmes sont geres dans la fonction
      SAUT STOCKE_ERRONE
    FINSI
  FINSI

  SI (TYPE_86_660003959 == 1)
  ALORS
    SI (nb_SGSNAddress_IPV6_660003959 >6)
    ALORS
      trace("Application OL2DCH: Filtrage type 86")
      erreur_660003959= Stockage_articleNVA_8X_660003942(date_cra_660003959, date_fin_660003959, code_rejet_660003959, FORMAT_ECC_660003959, g_iartout9, g_iartout9, 86)
      SI (erreur_660003959!=0)
      ALORS
        # Les message d erreurs et les alarmes sont geres dans la fonction
        SAUT STOCKE_ERRONE
      FINSI
    FINSI

    SI (nb_SGSNAddress_IPV6_660003959 >4)
    ALORS
      trace("Application OL2DCH: Filtrage type 86")
      erreur_660003959= Stockage_articleNVA_8X_660003942(date_cra_660003959, date_fin_660003959, code_rejet_660003959, FORMAT_ECC_660003959, g_iartout8, g_iartout8, 86)
      SI (erreur_660003959!=0)
      ALORS
        # Les message d erreurs et les alarmes sont geres dans la fonction
        SAUT STOCKE_ERRONE
      FINSI
    FINSI

    SI (nb_SGSNAddress_IPV6_660003959 >2)
    ALORS
      trace("Application OL2DCH: Filtrage type 86")
      erreur_660003959= Stockage_articleNVA_8X_660003942(date_cra_660003959, date_fin_660003959, code_rejet_660003959, FORMAT_ECC_660003959, g_iartout7, g_iartout7, 86)
      SI (erreur_660003959!=0)
      ALORS
        # Les message d erreurs et les alarmes sont geres dans la fonction
        SAUT STOCKE_ERRONE
      FINSI
    FINSI

    trace("Application OL2DCH: Filtrage type 86")
    erreur_660003959= Stockage_articleNVA_8X_660003942(date_cra_660003959, date_fin_660003959, code_rejet_660003959, FORMAT_ECC_660003959, g_iartout6, g_iartout6, 86)
    SI (erreur_660003959!=0)
    ALORS
      # Les message d erreurs et les alarmes sont geres dans la fonction
      SAUT STOCKE_ERRONE
    FINSI
  FINSI

  SI ( TYPE_88_660003959 == 1 )
  ALORS
    trace("Application OL2DCH: Filtrage type 88")
    erreur_660003959= Stockage_articleNVA_8X_660003942(date_cra_660003959, date_fin_660003959, code_rejet_660003959, FORMAT_ECC_660003959, g_iartout10, g_iartout10, 88)
    SI (erreur_660003959!=0)
    ALORS
      # Les message d erreurs et les alarmes sont geres dans la fonction
      SAUT STOCKE_ERRONE
    FINSI

    SI (TYPE_88_2_660003959 != 0)
    ALORS
      trace("Application OL2DCH: Filtrage type 88")
      erreur_660003959= Stockage_articleNVA_8X_660003942(date_cra_660003959, date_fin_660003959, code_rejet_660003959, FORMAT_ECC_660003959, g_iartout11, g_iartout11, 88)
      SI (erreur_660003959!=0)
      ALORS
        # Les message d erreurs et les alarmes sont geres dans la fonction
        SAUT STOCKE_ERRONE
      FINSI
    FINSI

    SI (TYPE_88_3_660003959 != 0)
    ALORS
      trace("Application OL2DCH: Filtrage type 88")
      erreur_660003959= Stockage_articleNVA_8X_660003942(date_cra_660003959, date_fin_660003959, code_rejet_660003959, FORMAT_ECC_660003959, g_iartout12, g_iartout12, 88)
      SI (erreur_660003959!=0)
      ALORS
        # Les message d erreurs et les alarmes sont geres dans la fonction
        SAUT STOCKE_ERRONE
      FINSI
    FINSI
  FINSI

  SAUT ECC_SECONDAIRES
FINSI

#------------------------------------------------OL3DCH-------------------------------------------------------
###### APPLICATION OL3DCH #######

SI (instECC_660003959 == i_LireInstanceECC("OL3GSM"))
ALORS
  trace("**** OL3DCH ****")
  instOL3DCH_660003959 = i_LireInstanceECC("OL3DCH")
  SI (instOL3DCH_660003959 == -1)
  ALORS
    trace("Pas d'ECC : OLA3DCH")
    SAUT STOCKE_ERRONE
  FINSI
  trace("application OL3DCH")
  # recherche dans la table externe Format_ECC le format de l'application
  ptchp_format_660003959 = i_get_tab_field(FORMAT_ECC_660003959, date_cra_660003959, "OL3DCH")

#G1R7
  SI (b_Filtrage_MMSsortant_660003959 == 0 && b_Filtrage_nonMMSortant_660003959 == 0)
  ALORS
    res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout, g_iartout5, instOL3DCH_660003959 , ptchp_format_660003959, date_fin_660003959, 80)
    SI (res_660003959 == STCK_KO_660003959)
    ALORS
      trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin80 a l'application OL3DCH")
      code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
      erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "OL3DCH", pt_NameOfFile_660003959)
      erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
      SAUT STOCKE_ERRONE
    FINSI
  SINON
    trace("Application OL3DCH: Filtrage MMS en Roaming out")
    erreur_660003959= Stockage_articleNVA_660003942(date_cra_660003959, date_fin_660003959, code_rejet_660003959, FORMAT_ECC_660003959)
    SI (erreur_660003959!=0)
    ALORS
      # Les message d erreurs et les alarmes sont geres dans la fonction
      SAUT STOCKE_ERRONE
    FINSI
  FINSI

  SI ( TYPE_82_660003959 == 1 )
  ALORS
    trace("Application OL3DCH: Filtrage type 82")
    erreur_660003959= Stockage_articleNVA_8X_660003942(date_cra_660003959, date_fin_660003959, code_rejet_660003959, FORMAT_ECC_660003959, g_iartout2, g_iartout2, 82)
    SI (erreur_660003959!=0)
    ALORS
      # Les message d erreurs et les alarmes sont geres dans la fonction
      SAUT STOCKE_ERRONE
    FINSI
  FINSI

  SI ( TYPE_84_660003959 == 1 )
  ALORS
    trace("Application OL3DCH: Filtrage type 84")
    erreur_660003959= Stockage_articleNVA_8X_660003942(date_cra_660003959, date_fin_660003959, code_rejet_660003959, FORMAT_ECC_660003959, g_iartout4, g_iartout4, 84)
    SI (erreur_660003959!=0)
    ALORS
      # Les message d erreurs et les alarmes sont geres dans la fonction
      SAUT STOCKE_ERRONE
    FINSI
  FINSI

  SI (TYPE_86_660003959 == 1)
  ALORS
    SI (nb_SGSNAddress_IPV6_660003959 >6)
    ALORS
      trace("Application OL3DCH: Filtrage type 86")
      erreur_660003959= Stockage_articleNVA_8X_660003942(date_cra_660003959, date_fin_660003959, code_rejet_660003959, FORMAT_ECC_660003959, g_iartout9, g_iartout9, 86)
      SI (erreur_660003959!=0)
      ALORS
        # Les message d erreurs et les alarmes sont geres dans la fonction
        SAUT STOCKE_ERRONE
      FINSI
    FINSI

    SI (nb_SGSNAddress_IPV6_660003959 >4)
    ALORS
      trace("Application OL3DCH: Filtrage type 86")
      erreur_660003959= Stockage_articleNVA_8X_660003942(date_cra_660003959, date_fin_660003959, code_rejet_660003959, FORMAT_ECC_660003959, g_iartout8, g_iartout8, 86)
      SI (erreur_660003959!=0)
      ALORS
        # Les message d erreurs et les alarmes sont geres dans la fonction
        SAUT STOCKE_ERRONE
      FINSI
    FINSI

    SI (nb_SGSNAddress_IPV6_660003959 >2)
    ALORS
      trace("Application OL3DCH: Filtrage type 86")
      erreur_660003959= Stockage_articleNVA_8X_660003942(date_cra_660003959, date_fin_660003959, code_rejet_660003959, FORMAT_ECC_660003959, g_iartout7, g_iartout7, 86)
      SI (erreur_660003959!=0)
      ALORS
        # Les message d erreurs et les alarmes sont geres dans la fonction
        SAUT STOCKE_ERRONE
      FINSI
    FINSI

    trace("Application OL3DCH: Filtrage type 86")
    erreur_660003959= Stockage_articleNVA_8X_660003942(date_cra_660003959, date_fin_660003959, code_rejet_660003959, FORMAT_ECC_660003959, g_iartout6, g_iartout6, 86)
    SI (erreur_660003959!=0)
    ALORS
      # Les message d erreurs et les alarmes sont geres dans la fonction
      SAUT STOCKE_ERRONE
    FINSI
  FINSI

  SI ( TYPE_88_660003959 == 1 )
  ALORS
    trace("Application OL3DCH: Filtrage type 88")
    erreur_660003959= Stockage_articleNVA_8X_660003942(date_cra_660003959, date_fin_660003959, code_rejet_660003959, FORMAT_ECC_660003959, g_iartout10, g_iartout10, 88)
    SI (erreur_660003959!=0)
    ALORS
      # Les message d erreurs et les alarmes sont geres dans la fonction
      SAUT STOCKE_ERRONE
    FINSI

    SI (TYPE_88_2_660003959 != 0)
    ALORS
      trace("Application OL3DCH: Filtrage type 88")
      erreur_660003959= Stockage_articleNVA_8X_660003942(date_cra_660003959, date_fin_660003959, code_rejet_660003959, FORMAT_ECC_660003959, g_iartout11, g_iartout11, 88)
      SI (erreur_660003959!=0)
      ALORS
        # Les message d erreurs et les alarmes sont geres dans la fonction
        SAUT STOCKE_ERRONE
      FINSI
    FINSI

    SI (TYPE_88_3_660003959 != 0)
    ALORS
      trace("Application OL3DCH: Filtrage type 88")
      erreur_660003959= Stockage_articleNVA_8X_660003942(date_cra_660003959, date_fin_660003959, code_rejet_660003959, FORMAT_ECC_660003959, g_iartout12, g_iartout12, 88)
      SI (erreur_660003959!=0)
      ALORS
        # Les message d erreurs et les alarmes sont geres dans la fonction
        SAUT STOCKE_ERRONE
      FINSI
    FINSI
  FINSI

  SAUT ECC_SECONDAIRES
FINSI

#------------------------------------------------OR5DCH-------------------------------------------------------
###### APPLICATION OR5DCH #######

SI (instECC_660003959 == i_LireInstanceECC("OR5GSM"))
ALORS
  trace("**** OR5DCH ****")
  instOR5DCH_660003959 = i_LireInstanceECC("OR5DCH")
  SI (instOR5DCH_660003959 == -1)
  ALORS
    trace("pas d'instance OR5DCH")
    SAUT STOCKE_ERRONE
  FINSI
  trace("application OR5DCH")
  # recherche dans la table externe Format_ECC le format de l'application
  ptchp_format_660003959 = i_get_tab_field(FORMAT_ECC_660003959, date_cra_660003959, "OR5DCH")

#G1R7
  SI (b_Filtrage_MMSsortant_660003959 == 0 && b_Filtrage_nonMMSortant_660003959 == 0)
  ALORS
    res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout, g_iartout5, instOR5DCH_660003959 , ptchp_format_660003959, date_fin_660003959, 80)
    SI (res_660003959 == STCK_KO_660003959)
    ALORS
      trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin80 a l'application OR5DCH")
      code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
      erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "OR5DCH", pt_NameOfFile_660003959)
      erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
      SAUT STOCKE_ERRONE
    FINSI
  SINON
    trace("Application OR5DCH: Filtrage MMS en Roaming out")
    erreur_660003959= Stockage_articleNVA_660003942(date_cra_660003959, date_fin_660003959, code_rejet_660003959, FORMAT_ECC_660003959)
    SI (erreur_660003959!=0)
    ALORS
      # Les message d erreurs et les alarmes sont geres dans la fonction
      SAUT STOCKE_ERRONE
    FINSI
  FINSI

  SI ( TYPE_82_660003959 == 1 )
  ALORS
    trace("Application OR5DCH: Filtrage type 82")
    erreur_660003959= Stockage_articleNVA_8X_660003942(date_cra_660003959, date_fin_660003959, code_rejet_660003959, FORMAT_ECC_660003959, g_iartout2, g_iartout2, 82)
    SI (erreur_660003959!=0)
    ALORS
      # Les message d erreurs et les alarmes sont geres dans la fonction
      SAUT STOCKE_ERRONE
    FINSI
  FINSI

  SI ( TYPE_84_660003959 == 1 )
  ALORS
    trace("Application OR5DCH: Filtrage type 84")
    erreur_660003959= Stockage_articleNVA_8X_660003942(date_cra_660003959, date_fin_660003959, code_rejet_660003959, FORMAT_ECC_660003959, g_iartout4, g_iartout4, 84)
    SI (erreur_660003959!=0)
    ALORS
      # Les message d erreurs et les alarmes sont geres dans la fonction
      SAUT STOCKE_ERRONE
    FINSI
  FINSI

  SI (TYPE_86_660003959 == 1)
  ALORS
    SI (nb_SGSNAddress_IPV6_660003959 >6)
    ALORS
      trace("Application OR5DCH: Filtrage type 86")
      erreur_660003959= Stockage_articleNVA_8X_660003942(date_cra_660003959, date_fin_660003959, code_rejet_660003959, FORMAT_ECC_660003959, g_iartout9, g_iartout9, 86)
      SI (erreur_660003959!=0)
      ALORS
        # Les message d erreurs et les alarmes sont geres dans la fonction
        SAUT STOCKE_ERRONE
      FINSI
    FINSI

    SI (nb_SGSNAddress_IPV6_660003959 >4)
    ALORS
      trace("Application OR5DCH: Filtrage type 86")
      erreur_660003959= Stockage_articleNVA_8X_660003942(date_cra_660003959, date_fin_660003959, code_rejet_660003959, FORMAT_ECC_660003959, g_iartout8, g_iartout8, 86)
      SI (erreur_660003959!=0)
      ALORS
        # Les message d erreurs et les alarmes sont geres dans la fonction
        SAUT STOCKE_ERRONE
      FINSI
    FINSI

    SI (nb_SGSNAddress_IPV6_660003959 >2)
    ALORS
      trace("Application OR5DCH: Filtrage type 86")
      erreur_660003959= Stockage_articleNVA_8X_660003942(date_cra_660003959, date_fin_660003959, code_rejet_660003959, FORMAT_ECC_660003959, g_iartout7, g_iartout7, 86)
      SI (erreur_660003959!=0)
      ALORS
        # Les message d erreurs et les alarmes sont geres dans la fonction
        SAUT STOCKE_ERRONE
      FINSI
    FINSI

    trace("Application OR5DCH: Filtrage type 86")
    erreur_660003959= Stockage_articleNVA_8X_660003942(date_cra_660003959, date_fin_660003959, code_rejet_660003959, FORMAT_ECC_660003959, g_iartout6, g_iartout6, 86)
    SI (erreur_660003959!=0)
    ALORS
      # Les message d erreurs et les alarmes sont geres dans la fonction
      SAUT STOCKE_ERRONE
    FINSI
  FINSI

  SI ( TYPE_88_660003959 == 1 )
  ALORS
    trace("Application OR5DCH: Filtrage type 88")
    erreur_660003959= Stockage_articleNVA_8X_660003942(date_cra_660003959, date_fin_660003959, code_rejet_660003959, FORMAT_ECC_660003959, g_iartout10, g_iartout10, 88)
    SI (erreur_660003959!=0)
    ALORS
      # Les message d erreurs et les alarmes sont geres dans la fonction
      SAUT STOCKE_ERRONE
    FINSI

    SI (TYPE_88_2_660003959 != 0)
    ALORS
      trace("Application OR5DCH: Filtrage type 88")
      erreur_660003959= Stockage_articleNVA_8X_660003942(date_cra_660003959, date_fin_660003959, code_rejet_660003959, FORMAT_ECC_660003959, g_iartout11, g_iartout11, 88)
      SI (erreur_660003959!=0)
      ALORS
        # Les message d erreurs et les alarmes sont geres dans la fonction
        SAUT STOCKE_ERRONE
      FINSI
    FINSI

    SI (TYPE_88_3_660003959 != 0)
    ALORS
      trace("Application OR5DCH: Filtrage type 88")
      erreur_660003959= Stockage_articleNVA_8X_660003942(date_cra_660003959, date_fin_660003959, code_rejet_660003959, FORMAT_ECC_660003959, g_iartout12, g_iartout12, 88)
      SI (erreur_660003959!=0)
      ALORS
        # Les message d erreurs et les alarmes sont geres dans la fonction
        SAUT STOCKE_ERRONE
      FINSI
    FINSI
  FINSI

  SAUT ECC_SECONDAIRES
FINSI


#G2R6
#-----G5R4lot2 Suppression VPF-------------------------------------------VPFDCH-------------------------------------------------------
#/G2R6


###### APPLICATION SACHEM MOBICARTE #######

SI (instECC_660003959 == i_LireInstanceECC("SHMGSM"))
ALORS
  trace("**** M1GDCH ****")
  instM1GDCH_660003959 = i_LireInstanceECC("M1GDCH")
  SI (instM1GDCH_660003959 == -1)
  ALORS
    trace("pas d'instance M1GDCH")
    code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
    erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "M1GDCH", pt_NameOfFile_660003959)
    erreur_660003959 = i_PlvMessEmettre(8893, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
    SAUT STOCKE_ERRONE
  FINSI
  trace("application M1GDCH")

# Enrichissement du CRA par le numero de filter

  ptchp_format_660003959 = i_get_tab_field(FORMAT_ECC_660003959, date_cra_660003959, "M1GDCH")
  SI (i_strplcmp(ptchp_format_660003959, "TLV16", 7, 5) == 0)
  ALORS
    erreur_660003959 = i_ajout_tlv(g_iartin, "T3t3_NumOfFilte", "")
    erreur_660003959 = i_resize_tlv(g_iartin, "T3t3_NumOfFilte", "NumOfFilter", 1)
    SI (erreur_660003959!=0)
    ALORS
      trace("Erreur d'ajout du TLV <T3t3_NumOfFilte>")
      code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
      erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "NumOfFilter", pt_NameOfFile_660003959)
      erreur_660003959 = i_PlvMessEmettre(8889, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
      SAUT STOCKE_ERRONE
    FINSI
    erreur_660003959 = i_set_art_field(g_iartin, $Tcrae_gprs::NumOfFilter, 0x31)
  FINSI

# recherche dans la table externe Format_ECC le format de l'application

  res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout, g_iartout5, instM1GDCH_660003959 , ptchp_format_660003959, date_fin_660003959, 80)
  SI (res_660003959 == STCK_KO_660003959)
  ALORS
    trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin80 a l'application M1GDCH")
    code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
    erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "M1GDCH", pt_NameOfFile_660003959)
    erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
    SAUT STOCKE_ERRONE
  FINSI

  SI (TYPE_82_660003959 == 1)
  ALORS
    res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout2, g_iartout2, instM1GDCH_660003959 , ptchp_format_660003959, date_fin_660003959, 82)
    SI (res_660003959 == STCK_KO_660003959)
    ALORS
      trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin82 a l'application M1GDCH")
      code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
      erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "M1GDCH", pt_NameOfFile_660003959)
      erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
      SAUT STOCKE_ERRONE
    FINSI
  FINSI

  SI (TYPE_84_660003959 == 1)
  ALORS
    res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout4, g_iartout4, instM1GDCH_660003959 , ptchp_format_660003959, date_fin_660003959, 84)
    SI (res_660003959 == STCK_KO_660003959)
    ALORS
      trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin84 a l'application M1GDCH")
      code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
      erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "M1GDCH", pt_NameOfFile_660003959)
      erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
      SAUT STOCKE_ERRONE
    FINSI
  FINSI

  SI (TYPE_86_660003959 == 1)
  ALORS
    SI (nb_SGSNAddress_IPV6_660003959 >6)
    ALORS
      res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout9, g_iartout9, instM1GDCH_660003959 , ptchp_format_660003959, date_fin_660003959, 86)
      SI (res_660003959 == STCK_KO_660003959)
      ALORS
        trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin86 a l'application M1GDCH")
        code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
        erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "M1GDCH", pt_NameOfFile_660003959)
        erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
        SAUT STOCKE_ERRONE
      FINSI
    FINSI

    SI (nb_SGSNAddress_IPV6_660003959 >4)
    ALORS
      res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout8, g_iartout8, instM1GDCH_660003959 , ptchp_format_660003959, date_fin_660003959, 86)
      SI (res_660003959 == STCK_KO_660003959)
      ALORS
        trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin86 a l'application M1GDCH")
        code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
        erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "M1GDCH", pt_NameOfFile_660003959)
        erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
        SAUT STOCKE_ERRONE
      FINSI
    FINSI

    SI (nb_SGSNAddress_IPV6_660003959 >2)
    ALORS
      res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout7, g_iartout7, instM1GDCH_660003959 , ptchp_format_660003959, date_fin_660003959, 86)
      SI (res_660003959 == STCK_KO_660003959)
      ALORS
        trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin86 a l'application M1GDCH")
        code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
        erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "M1GDCH", pt_NameOfFile_660003959)
        erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
        SAUT STOCKE_ERRONE
      FINSI
    FINSI

    res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout6, g_iartout6, instM1GDCH_660003959 , ptchp_format_660003959, date_fin_660003959, 86)
    SI (res_660003959 == STCK_KO_660003959)
    ALORS
      trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin86 a l'application M1GDCH")
      code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
      erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "M1GDCH", pt_NameOfFile_660003959)
      erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
      SAUT STOCKE_ERRONE
    FINSI
  FINSI

  SI (TYPE_88_660003959 == 1)
  ALORS
    res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout10, g_iartout10, instM1GDCH_660003959 , ptchp_format_660003959, date_fin_660003959, 88)
    SI (res_660003959 == STCK_KO_660003959)
    ALORS
      trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin88 a l'application M1GDCH")
      code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
      erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "M1GDCH", pt_NameOfFile_660003959)
      erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
      SAUT STOCKE_ERRONE
    FINSI

    SI (TYPE_88_2_660003959 != 0)
    ALORS
      res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout11, g_iartout11, instM1GDCH_660003959 , ptchp_format_660003959, date_fin_660003959, 88)
      SI (res_660003959 == STCK_KO_660003959)
      ALORS
        trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin88 a l'application M1GDCH")
        code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
        erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "M1GDCH", pt_NameOfFile_660003959)
        erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
        SAUT STOCKE_ERRONE
      FINSI
    FINSI

    SI (TYPE_88_3_660003959 != 0)
    ALORS
      res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout12, g_iartout12, instM1GDCH_660003959 , ptchp_format_660003959, date_fin_660003959, 88)
      SI (res_660003959 == STCK_KO_660003959)
      ALORS
        trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin88 a l'application M1GDCH")
        code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
        erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "M1GDCH", pt_NameOfFile_660003959)
        erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
        SAUT STOCKE_ERRONE
      FINSI
    FINSI
  FINSI

  SAUT ECC_SECONDAIRES
FINSI

###### APPLICATION SACHEM CMO #######

SI (instECC_660003959 == i_LireInstanceECC("SHPGSM"))
ALORS
  trace("**** CMODCH ****")
  instCMODCH_660003959 = i_LireInstanceECC("CMODCH")
  SI (instCMODCH_660003959 == -1)
  ALORS
    trace("Tcrae_gprs: pas d'ECC CMODCH")
    SAUT STOCKE_ERRONE
  FINSI
  trace("application CMODCH")

# Enrichissement du CRA par le numero de filter

  ptchp_format_660003959 = i_get_tab_field(FORMAT_ECC_660003959, date_cra_660003959, "CMODCH")
  SI (i_strplcmp(ptchp_format_660003959, "TLV16", 7, 5) == 0)
  ALORS
    erreur_660003959 = i_ajout_tlv(g_iartin, "T3t3_NumOfFilte", "")
    erreur_660003959 = i_resize_tlv(g_iartin, "T3t3_NumOfFilte", "NumOfFilter", 1)
    SI (erreur_660003959!=0)
    ALORS
      trace("Erreur d'ajout du TLV <T3t3_NumOfFilte>")
      SAUT STOCKE_ERRONE
    FINSI
    erreur_660003959 = i_set_art_field(g_iartin, $Tcrae_gprs::NumOfFilter, 0x32)
  FINSI

# recherche dans la table externe Format_ECC le format de l'application

  res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout, g_iartout5, instCMODCH_660003959 , ptchp_format_660003959, date_fin_660003959, 80)
  SI (res_660003959 == STCK_KO_660003959)
  ALORS
    trace("**Tcrae_gprs , erreur d'envoi de l'article a l'apllication CMODCH")
    code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
    erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "CMODCH", pt_NameOfFile_660003959)
    erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
    SAUT STOCKE_ERRONE
  FINSI

  SI (TYPE_82_660003959 == 1)
  ALORS
    res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout2, g_iartout2, instCMODCH_660003959 , ptchp_format_660003959, date_fin_660003959, 82)
    SI (res_660003959 == STCK_KO_660003959)
    ALORS
      trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin82 a l'application CMODCH")
      code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
      erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "CMODCH", pt_NameOfFile_660003959)
      erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
      SAUT STOCKE_ERRONE
    FINSI
  FINSI

  SI (TYPE_84_660003959 == 1)
  ALORS
    res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout4, g_iartout4, instCMODCH_660003959 , ptchp_format_660003959, date_fin_660003959, 84)
    SI (res_660003959 == STCK_KO_660003959)
    ALORS
      trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin84 a l'application CMODCH")
      code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
      erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "CMODCH", pt_NameOfFile_660003959)
      erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
      SAUT STOCKE_ERRONE
    FINSI
  FINSI

  SI (TYPE_86_660003959 == 1)
  ALORS
    SI (nb_SGSNAddress_IPV6_660003959 >6)
    ALORS
      res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout9, g_iartout9, instCMODCH_660003959 , ptchp_format_660003959, date_fin_660003959, 86)
      SI (res_660003959 == STCK_KO_660003959)
      ALORS
        trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin86 a l'application CMODCH")
        code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
        erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "CMODCH", pt_NameOfFile_660003959)
        erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
        SAUT STOCKE_ERRONE
      FINSI
    FINSI

    SI (nb_SGSNAddress_IPV6_660003959 >4)
    ALORS
      res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout8, g_iartout8, instCMODCH_660003959 , ptchp_format_660003959, date_fin_660003959, 86)
      SI (res_660003959 == STCK_KO_660003959)
      ALORS
        trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin86 a l'application CMODCH")
        code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
        erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "CMODCH", pt_NameOfFile_660003959)
        erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
        SAUT STOCKE_ERRONE
      FINSI
    FINSI

    SI (nb_SGSNAddress_IPV6_660003959 >2)
    ALORS
      res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout7, g_iartout7, instCMODCH_660003959 , ptchp_format_660003959, date_fin_660003959, 86)
      SI (res_660003959 == STCK_KO_660003959)
      ALORS
        trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin86 a l'application CMODCH")
        code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
        erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "CMODCH", pt_NameOfFile_660003959)
        erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
        SAUT STOCKE_ERRONE
      FINSI
    FINSI

    res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout6, g_iartout6, instCMODCH_660003959 , ptchp_format_660003959, date_fin_660003959, 86)
    SI (res_660003959 == STCK_KO_660003959)
    ALORS
      trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin86 a l'application CMODCH")
      code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
      erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "CMODCH", pt_NameOfFile_660003959)
      erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
      SAUT STOCKE_ERRONE
    FINSI
  FINSI

  SI (TYPE_88_660003959 == 1)
  ALORS
    res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout10, g_iartout10, instCMODCH_660003959 , ptchp_format_660003959, date_fin_660003959, 88)
    SI (res_660003959 == STCK_KO_660003959)
    ALORS
      trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin88 a l'application CMODCH")
      code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
      erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "CMODCH", pt_NameOfFile_660003959)
      erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
      SAUT STOCKE_ERRONE
    FINSI

    SI (TYPE_88_2_660003959 != 0)
    ALORS
      res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout11, g_iartout11, instCMODCH_660003959 , ptchp_format_660003959, date_fin_660003959, 88)
      SI (res_660003959 == STCK_KO_660003959)
      ALORS
        trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin88 a l'application CMODCH")
        code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
        erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "CMODCH", pt_NameOfFile_660003959)
        erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
        SAUT STOCKE_ERRONE
      FINSI
    FINSI

    SI (TYPE_88_3_660003959 != 0)
    ALORS
      res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout12, g_iartout12, instCMODCH_660003959 , ptchp_format_660003959, date_fin_660003959, 88)
      SI (res_660003959 == STCK_KO_660003959)
      ALORS
        trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin88 a l'application CMODCH")
        code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
        erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "CMODCH", pt_NameOfFile_660003959)
        erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
        SAUT STOCKE_ERRONE
      FINSI
    FINSI
  FINSI

  SAUT ECC_SECONDAIRES
FINSI

###### APPLICATION REDISTRIBUTION #######

POINT REDISTRIB

SI (i_valid_field_n(g_iartin, $Tcrae_gprs::T3t2_DateOfRedi) == 0)
ALORS
  erreur_660003959 = i_ajout_tlv(g_iartin, "T3t2_DateOfRedi", "")
  erreur_660003959 = i_resize_tlv(g_iartin, "T3t2_DateOfRedi", "DateOfRedistri",4)
  erreur_660003959 = i_set_art_field(g_iartin ,$Tcrae_gprs::DateOfRedistri ,i_cur_time())
FINSI

val_champ_660003959 = i_get_art_field(g_iartin ,$Tcrae_gprs::DateOfRedistri)


###### APPLICATION ECDDCH #######
instanceECC_660003959 =i_LireInstanceECC("ECDDCH")
SI (instanceECC_660003959 != -1)
ALORS
  trace("application ECDDCH")
  ptchp_format_660003959 = i_get_tab_field(FORMAT_ECC_660003959, date_cra_660003959, "ECDDCH")
  res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout, g_iartout5, instanceECC_660003959 , ptchp_format_660003959, date_fin_660003959, 80)
  SI (res_660003959 == STCK_KO_660003959)
  ALORS
    trace("**Tcrae_gprs , erreur d'envoi de l'article a l'application ECDDCH")
    code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
    erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "ECDDCH", pt_NameOfFile_660003959)
    erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
    SAUT STOCKE_ERRONE
  FINSI
FINSI

SI ( TYPE_82_660003959 == 1 )
ALORS
  res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout2, g_iartout2, instanceECC_660003959 , ptchp_format_660003959, date_fin_660003959, 82)
  SI (res_660003959 == STCK_KO_660003959)
  ALORS
    trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin82 a l'application ECDDCH")
    code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
    erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "ECDDCH", pt_NameOfFile_660003959)
    erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
    SAUT STOCKE_ERRONE
  FINSI
FINSI

SI ( TYPE_84_660003959 == 1 )
ALORS
  res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout4, g_iartout4, instanceECC_660003959 , ptchp_format_660003959, date_fin_660003959, 84)
  SI (res_660003959 == STCK_KO_660003959)
  ALORS
    trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin84 a l'application ECDDCH")
    code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
    erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "ECDDCH", pt_NameOfFile_660003959)
    erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
    SAUT STOCKE_ERRONE
  FINSI
FINSI

SI (TYPE_86_660003959 == 1)
ALORS
  SI (nb_SGSNAddress_IPV6_660003959 >6)
  ALORS
    res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout9, g_iartout9, instanceECC_660003959 , ptchp_format_660003959, date_fin_660003959, 86)
    SI (res_660003959 == STCK_KO_660003959)
    ALORS
      trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin86 a l'application ECDDCH")
      code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
      erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "ECDDCH", pt_NameOfFile_660003959)
      erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
      SAUT STOCKE_ERRONE
    FINSI
  FINSI

  SI (nb_SGSNAddress_IPV6_660003959 >4)
  ALORS
    res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout8, g_iartout8, instanceECC_660003959 , ptchp_format_660003959, date_fin_660003959, 86)
    SI (res_660003959 == STCK_KO_660003959)
    ALORS
      trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin86 a l'application ECDDCH")
      code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
      erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "ECDDCH", pt_NameOfFile_660003959)
      erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
      SAUT STOCKE_ERRONE
    FINSI
  FINSI

  SI (nb_SGSNAddress_IPV6_660003959 >2)
  ALORS
    res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout7, g_iartout7, instanceECC_660003959 , ptchp_format_660003959, date_fin_660003959, 86)
    SI (res_660003959 == STCK_KO_660003959)
    ALORS
      trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin86 a l'application ECDDCH")
      code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
      erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "ECDDCH", pt_NameOfFile_660003959)
      erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
      SAUT STOCKE_ERRONE
    FINSI
  FINSI

  res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout6, g_iartout6, instanceECC_660003959 , ptchp_format_660003959, date_fin_660003959, 86)
  SI (res_660003959 == STCK_KO_660003959)
  ALORS
    trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin86 a l'application ECDDCH")
    code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
    erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "ECDDCH", pt_NameOfFile_660003959)
    erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
    SAUT STOCKE_ERRONE
  FINSI
FINSI

SI ( TYPE_88_660003959 == 1 )
ALORS
  res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout10, g_iartout10, instanceECC_660003959 , ptchp_format_660003959, date_fin_660003959, 88)
  SI (res_660003959 == STCK_KO_660003959)
  ALORS
    trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin88 a l'application ECDDCH")
    code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
    erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "ECDDCH", pt_NameOfFile_660003959)
    erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
    SAUT STOCKE_ERRONE
  FINSI

  SI (TYPE_88_2_660003959 != 0)
  ALORS
    res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout11, g_iartout11, instanceECC_660003959 , ptchp_format_660003959, date_fin_660003959, 88)
    SI (res_660003959 == STCK_KO_660003959)
    ALORS
      trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin88 a l'application ECDDCH")
      code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
      erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "ECDDCH", pt_NameOfFile_660003959)
      erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
      SAUT STOCKE_ERRONE
    FINSI
  FINSI

  SI (TYPE_88_3_660003959 != 0)
  ALORS
    res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout12, g_iartout12, instanceECC_660003959 , ptchp_format_660003959, date_fin_660003959, 88)
    SI (res_660003959 == STCK_KO_660003959)
    ALORS
      trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin88 a l'application ECDDCH")
      code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
      erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "ECDDCH", pt_NameOfFile_660003959)
      erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
      SAUT STOCKE_ERRONE
    FINSI
  FINSI
FINSI
# / G1R9 QC184

POINT  ECC_SECONDAIRES

###### APPLICATION SYMPHONIE #######

instanceECC_660003959 = i_LireInstanceECC("SYMDCH")
SI (instanceECC_660003959 != -1)
ALORS
  trace("application SYMPHONIE")
  ptchp_format_660003959 = i_get_tab_field(FORMAT_ECC_660003959, date_cra_660003959, "SYMDCH")
  res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout, g_iartout5, instanceECC_660003959 , ptchp_format_660003959, date_fin_660003959, 80)
  SI (res_660003959  == STCK_KO_660003959)
  ALORS
    trace("**Tcrae_gprs , erreur d'envoi de l'article vers l'application SYMPHONIE")
    code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
    erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "SYMDCH", pt_NameOfFile_660003959)
    erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
    SAUT STOCKE_ERRONE
  FINSI

  SI ( TYPE_82_660003959 == 1 )
  ALORS
    res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout2, g_iartout2, instanceECC_660003959 , ptchp_format_660003959, date_fin_660003959, 82)
    SI (res_660003959 == STCK_KO_660003959)
    ALORS
      trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin82 a l'application SYMPHONIE")
      code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
      erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "SYMDCH", pt_NameOfFile_660003959)
      erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
      SAUT STOCKE_ERRONE
    FINSI
  FINSI

  SI ( TYPE_84_660003959 == 1 )
  ALORS
    res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout4, g_iartout4, instanceECC_660003959 , ptchp_format_660003959, date_fin_660003959, 84)
    SI (res_660003959 == STCK_KO_660003959)
    ALORS
      trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin84 a l'application SYMPHONIE")
      code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
      erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "SYMDCH", pt_NameOfFile_660003959)
      erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
      SAUT STOCKE_ERRONE
    FINSI
  FINSI

  SI (TYPE_86_660003959 == 1)
  ALORS
    SI (nb_SGSNAddress_IPV6_660003959 >6)
    ALORS
      res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout9, g_iartout9, instanceECC_660003959 , ptchp_format_660003959, date_fin_660003959, 86)
      SI (res_660003959 == STCK_KO_660003959)
      ALORS
        trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin86 a l'application SYMPHONIE")
        code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
        erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "SYMDCH", pt_NameOfFile_660003959)
        erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
        SAUT STOCKE_ERRONE
      FINSI
    FINSI

    SI (nb_SGSNAddress_IPV6_660003959 >4)
    ALORS
      res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout8, g_iartout8, instanceECC_660003959 , ptchp_format_660003959, date_fin_660003959, 86)
      SI (res_660003959 == STCK_KO_660003959)
      ALORS
        trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin86 a l'application SYMPHONIE")
        code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
        erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "SYMDCH", pt_NameOfFile_660003959)
        erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
        SAUT STOCKE_ERRONE
      FINSI
    FINSI

    SI (nb_SGSNAddress_IPV6_660003959 >2)
    ALORS
      res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout7, g_iartout7, instanceECC_660003959 , ptchp_format_660003959, date_fin_660003959, 86)
      SI (res_660003959 == STCK_KO_660003959)
      ALORS
        trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin86 a l'application SYMPHONIE")
        code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
        erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "SYMDCH", pt_NameOfFile_660003959)
        erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
        SAUT STOCKE_ERRONE
      FINSI
    FINSI

    res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout6, g_iartout6, instanceECC_660003959 , ptchp_format_660003959, date_fin_660003959, 86)
    SI (res_660003959 == STCK_KO_660003959)
    ALORS
      trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin86 a l'application SYMPHONIE")
      code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
      erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "SYMDCH", pt_NameOfFile_660003959)
      erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
      SAUT STOCKE_ERRONE
    FINSI
  FINSI

  SI ( TYPE_88_660003959 == 1 )
  ALORS
    res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout10, g_iartout10, instanceECC_660003959 , ptchp_format_660003959, date_fin_660003959, 88)
    SI (res_660003959 == STCK_KO_660003959)
    ALORS
      trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin88 a l'application SYMPHONIE")
      code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
      erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "SYMDCH", pt_NameOfFile_660003959)
      erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
      SAUT STOCKE_ERRONE
    FINSI

    SI (TYPE_88_2_660003959 != 0)
    ALORS
      res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout11, g_iartout11, instanceECC_660003959 , ptchp_format_660003959, date_fin_660003959, 88)
      SI (res_660003959 == STCK_KO_660003959)
      ALORS
        trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin88 a l'application SYMPHONIE")
        code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
        erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "SYMDCH", pt_NameOfFile_660003959)
        erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
        SAUT STOCKE_ERRONE
      FINSI
    FINSI

    SI (TYPE_88_3_660003959 != 0)
    ALORS
      res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout12, g_iartout12, instanceECC_660003959 , ptchp_format_660003959, date_fin_660003959, 88)
      SI (res_660003959 == STCK_KO_660003959)
      ALORS
        trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin88 a l'application SYMPHONIE")
        code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
        erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "SYMDCH", pt_NameOfFile_660003959)
        erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
        SAUT STOCKE_ERRONE
      FINSI
    FINSI
  FINSI
FINSI

###### APPLICATION IRIS #######
#G5R2lot2 sauf pour IMSI transnationaux et inconnus du referentiel SGRT (!REDIST_IMSI_Transnational_M2M)
# G5R4lot2 Suppression VPF
SI (
  (
  instMSFDCH_660003959 > 0 || instNVDDCH_660003959 > 0 || instVDIDCH_660003959 > 0 ||
  instOLADCH_660003959 > 0 || instOL2DCH_660003959 > 0 || instOL3DCH_660003959 > 0 || instOR5DCH_660003959 > 0 ||
  instM1GDCH_660003959 > 0 || instCMODCH_660003959 > 0 || b_COMESI_660003959
  )
  &&
  !REDIST_IMSI_Transnational_M2M_660003959
  )
ALORS
  instanceECC_660003959 = i_LireInstanceECC("IRIDCH")
  SI (instanceECC_660003959 != -1)
  ALORS
    trace("application IRIS")
    ptchp_format_660003959 = i_get_tab_field(FORMAT_ECC_660003959, date_cra_660003959, "IRIDCH")
    res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout, g_iartout5, instanceECC_660003959 , ptchp_format_660003959, date_fin_660003959, 80)
    SI (res_660003959  == STCK_KO_660003959)
    ALORS
      trace("**Tcrae_gprs , erreur d'envoi de l'article a l'application IRIS")
      code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
      erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "IRIDCH", pt_NameOfFile_660003959)
      erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
      SAUT STOCKE_ERRONE
    FINSI

    SI ( TYPE_82_660003959 == 1 )
    ALORS
      res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout2, g_iartout2, instanceECC_660003959 , ptchp_format_660003959, date_fin_660003959, 82)
      SI (res_660003959 == STCK_KO_660003959)
      ALORS
        trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin82 a l'application IRIS")
        code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
        erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "IRIDCH", pt_NameOfFile_660003959)
        erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
        SAUT STOCKE_ERRONE
      FINSI
    FINSI

    SI ( TYPE_84_660003959 == 1 )
    ALORS
      res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout4, g_iartout4, instanceECC_660003959 , ptchp_format_660003959, date_fin_660003959, 84)
      SI (res_660003959 == STCK_KO_660003959)
      ALORS
        trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin84 a l'application IRIS")
        code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
        erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "IRIDCH", pt_NameOfFile_660003959)
        erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
        SAUT STOCKE_ERRONE
      FINSI
    FINSI

    SI (TYPE_86_660003959 == 1)
    ALORS
      SI (nb_SGSNAddress_IPV6_660003959 >6)
      ALORS
        res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout9, g_iartout9, instanceECC_660003959 , ptchp_format_660003959, date_fin_660003959, 86)
        SI (res_660003959 == STCK_KO_660003959)
        ALORS
          trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin86 a l'application IRIS")
          code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
          erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "IRIDCH", pt_NameOfFile_660003959)
          erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
          SAUT STOCKE_ERRONE
        FINSI
      FINSI

      SI (nb_SGSNAddress_IPV6_660003959 >4)
      ALORS
        res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout8, g_iartout8, instanceECC_660003959 , ptchp_format_660003959, date_fin_660003959, 86)
        SI (res_660003959 == STCK_KO_660003959)
        ALORS
          trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin86 a l'application IRIS")
          code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
          erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "IRIDCH", pt_NameOfFile_660003959)
          erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
          SAUT STOCKE_ERRONE
        FINSI
      FINSI

      SI (nb_SGSNAddress_IPV6_660003959 >2)
      ALORS
        res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout7, g_iartout7, instanceECC_660003959 , ptchp_format_660003959, date_fin_660003959, 86)
        SI (res_660003959 == STCK_KO_660003959)
        ALORS
          trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin86 a l'application IRIS")
          code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
          erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "IRIDCH", pt_NameOfFile_660003959)
          erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
          SAUT STOCKE_ERRONE
        FINSI
      FINSI

      res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout6, g_iartout6, instanceECC_660003959 , ptchp_format_660003959, date_fin_660003959, 86)
      SI (res_660003959 == STCK_KO_660003959)
      ALORS
        trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin86 a l'application IRIS")
        code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
        erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "IRIDCH", pt_NameOfFile_660003959)
        erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
        SAUT STOCKE_ERRONE
      FINSI
    FINSI

    SI ( TYPE_88_660003959 == 1 )
    ALORS
      res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout10, g_iartout10, instanceECC_660003959 , ptchp_format_660003959, date_fin_660003959, 88)
      SI (res_660003959 == STCK_KO_660003959)
      ALORS
        trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin88 a l'application IRIS")
        code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
        erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "IRIDCH", pt_NameOfFile_660003959)
        erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
        SAUT STOCKE_ERRONE
      FINSI

      SI (TYPE_88_2_660003959 != 0)
      ALORS
        res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout11, g_iartout11, instanceECC_660003959 , ptchp_format_660003959, date_fin_660003959, 88)
        SI (res_660003959 == STCK_KO_660003959)
        ALORS
          trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin88 a l'application IRIS")
          code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
          erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "IRIDCH", pt_NameOfFile_660003959)
          erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
          SAUT STOCKE_ERRONE
        FINSI
      FINSI

      SI (TYPE_88_3_660003959 != 0)
      ALORS
        res_660003959 = Stockage_Article_660003942(g_iartin, g_iartout12, g_iartout12, instanceECC_660003959 , ptchp_format_660003959, date_fin_660003959, 88)
        SI (res_660003959 == STCK_KO_660003959)
        ALORS
          trace("**Tcrae_gprs , erreur d'envoi de l'article Ttapin88 a l'application IRIS")
          code_rejet_660003959 = MODULE_DISTR_660003959 + ERR_DISTR_660003959 + EFFICACE_660003959
          erreur_660003959 = i_format_str2(pt_LibelleAlarme_660003959, "%s> <f=%s", "IRIDCH", pt_NameOfFile_660003959)
          erreur_660003959 = i_PlvMessEmettre(8894, 2, g_iartin, "", 2, code_rejet_660003959, pt_LibelleAlarme_660003959, 0)
          SAUT STOCKE_ERRONE
        FINSI
      FINSI
    FINSI
  FINSI
FINSI

####### APPLICATION ECDDCH ####### retiree
trace("**** Tcrae_gprs : Fin Pcode Module de Distribution ****")

RETOUR TRAIT_OK

POINT STOCKE_ERRONE

erreur_660003959 = i_make_art_rej(g_iartin, g_iartout12, code_rejet_660003959)
erreur_660003959 = i_stocke_art(g_iartout12,0,PT_ERRONE,0)
trace("**Tcrae_gprs , Article stocke en errone**")
# RETOUR TRAIT_OK
RETOUR BAD_BLOC
#------------------------------------------- FIN Tcrae_gprs_dis.src --------------------------------------------
