DEFINITION Vrai_660003155 1
DEFINITION Faux_660003155 0
DEFINITION CPT_660003155 1507
DEFINITION MODULE_TRAIT_660003155 0x5000
DEFINITION ERR_SEM_660003155 0x040
DEFINITION ERR_CROISE_660003155 0x0F0
DEFINITION EFFICACE_660003155 0x01
DEFINITION pt_FicNameGlob_LEN_660003155 255
REGISTRE ENTIER erreur_660003155
REGISTRE ENTIER date_660003155
REGISTRE ENTIER val_champ_660003155
REGISTRE ENTIER Nb_jourRedist_660003155
REGISTRE ENTIER CPT_X_660003155
REGISTRE ENTIER CPT_Z_660003155
REGISTRE ENTIER code_rejet_660003155
REGISTRE ENTIER taille_660003155
REGISTRE ENTIER dateOfRedisJ_660003155
REGISTRE ENTIER b_IMSI_OrangeCo_660003155
REGISTRE ENTIER date_cra_660003155
REGISTRE POINTEUR pt_IMSI_660003155
REGISTRE POINTEUR pt_NameOfFile_660003155
REGISTRE POINTEUR pt_NbJourRedist_660003155
REGISTRE ENTIER Resultat_recherche_660003155
REGISTRE POINTEUR pt_FicNameTemp_660003155
REGISTRE POINTEUR pt_FicNameGlob_660003155
REGISTRE POINTEUR pt_LibelleAlarme_660003155
REGISTRE POINTEUR pt_resultat_660003155
REGISTRE POINTEUR pt_terme_660003155
REGISTRE ENTIER IMSI_Transnational_M2M_660003155
REGISTRE POINTEUR pt_MCCMNCx_660003155
REGISTRE POINTEUR pt_IMSIy_660003155
REGISTRE POINTEUR str_conteneur_660003155
REGISTRE POINTEUR ptr_res_660003155
#                         - Pcode du module de traitement Tcrae_mtc_trt.src : CRAE Mobile Terminated Call
#                         - creation le 04/10/2006
#                         - Auteur : RAS
#   HISTORIQUE
# 12/10/10 : QC711
# 13/01/11 - BEA  - G3R1 lot4 Verification/Correction des variables (constantes, entiers, pointeurs)
# 17/08/11 - DECI - G3R4 lot3 QC852, CRAE enrichissement du libelle des alarmes par le nom du fichier collecte
# 04/05/12 - JLG  - G3R7 Gestion du code MNC pour les MVNO lights
# 06/11/14 - 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/14 - JLG  - G5R2 : contournement core sur verbe pcode i_adequation_chaine_expreg (QC1441)
#---------------------------------------------------------------------------------------------------------
# declaration des variables






# G5R2lot2
#/G5R2lot2

# Initialisation
pt_IMSI_660003155="1245678945612345"
i_strcpy(pt_IMSI_660003155,"")
pt_NameOfFile_660003155 ="012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234"
i_strcpy(pt_NameOfFile_660003155,"")
pt_NbJourRedist_660003155="038977"
i_strcpy(pt_NbJourRedist_660003155,"")

Resultat_recherche_660003155 = 0
pt_FicNameTemp_660003155="pt_NameOfTemp0123456789pt_NameOfTemp0123456789pt_NameOfTemp0123456789pt_NameOfTemp0123456789pt_NameOfTemp0123456789pt_NameOfTemp0123456789pt_NameOfTemp0123456789pt_NameOfTemp0123456789pt_NameOfTemp0123456789pt_NameOfTemp0123456789pt_NameOfTemp0123456789pt"
i_strcpy(pt_FicNameTemp_660003155,"")
pt_FicNameGlob_660003155="pt_NameOfGlob0123456789pt_NameOfGlob0123456789pt_NameOfGlob0123456789pt_NameOfGlob0123456789pt_NameOfGlob0123456789pt_NameOfGlob0123456789pt_NameOfGlob0123456789pt_NameOfGlob0123456789pt_NameOfGlob0123456789pt_NameOfGlob0123456789pt_NameOfGlob0123456789pt"
i_strcpy(pt_FicNameGlob_660003155,"")
pt_LibelleAlarme_660003155="pt_LibelleAlarme_111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111"
i_strcpy(pt_LibelleAlarme_660003155,"")
pt_resultat_660003155="pt_resultat1111"
i_strcpy(pt_resultat_660003155,"")
pt_terme_660003155 =  "pt_terme1111111"
i_strcpy(pt_terme_660003155,"")

# G5R2lot2
IMSI_Transnational_M2M_660003155 = 0
pt_MCCMNCx_660003155 = "pt_MCCMNCx12"
i_strcpy(pt_MCCMNCx_660003155,"")
pt_IMSIy_660003155   = "pt_IMSIy1234"
i_strcpy(pt_IMSIy_660003155,"")
str_conteneur_660003155 = "str_conteneur123456789"
i_strcpy(str_conteneur_660003155,"")
ptr_res_660003155    = "ptr_res12345"
i_strcpy(ptr_res_660003155,"")
#/G5R2lot2

#-----------------------------------

trace("    -------------------------------------------    ")
trace("  | TCRAE_MTC :DEBUT PCODE DE TRAITEMENT MTC   |   ")
trace("    -------------------------------------------    ")

# TT0033 plus de modification du g_iartin a cause de pb decoupe gros fichier
erreur_660003155 = i_dup_art_id(g_iartin , g_iartout12)
# /TT0033

# G3R4 lot3 QC852
SI (i_valid_field_n(g_iartin, $Tcrae_mtc::NameOfFile)&& i_valid_field_n(g_iartin, $Tcrae_mtc::DateOfRedistri))
ALORS
	erreur_660003155 = i_get_art_str(g_iartin, $Tcrae_mtc::NameOfFile, pt_NameOfFile_660003155)
SINON
	SI( pt_FicNameGlob_LEN_660003155 < i_strlen(g_isource) )
	ALORS
		trace("variable g_isource plus grande que pointeur de copie de g_isource.")
		code_rejet_660003155 = MODULE_TRAIT_660003155 + 0x0D0 + EFFICACE_660003155
		erreur_660003155 = i_PlvMessEmettre(8849, 2, g_iartout12, "", 2, code_rejet_660003155, "lg NameOfFile > 255", 0)
		SAUT STOCKE_ERRONE
	FINSI
	i_strcpy(pt_FicNameGlob_660003155, g_isource)
	POINT DEBUT_BOUCLE_FIC_NAME
	Resultat_recherche_660003155 = i_recupererValeur(pt_FicNameGlob_660003155, pt_FicNameTemp_660003155, 255, '/')
	SI( Resultat_recherche_660003155 == 0 )
	ALORS
		# On ne fait rien...
		# Le nom de fichier doit etre dans pt_FicNameTemp
		i_strcpy(pt_NameOfFile_660003155, pt_FicNameTemp_660003155)
		SAUT DEBUT_BOUCLE_FIC_NAME
	SINON
		# Le resultat a ete sauvegarde au coup precedent.
		trace("Fin boucle NameOfFile")
	FINSI
	# suppression des 9 derniers caracteres du g_isource (checksum)
	i_get_sub_str(pt_NameOfFile_660003155, 0, -10, pt_NameOfFile_660003155)
	SI (i_strlen(pt_NameOfFile_660003155) > 19)
	ALORS
		trace("**Tcrae_mtc, erreur : NameOfFile trop long **")
		code_rejet_660003155 = MODULE_TRAIT_660003155 + 0x0D0 + EFFICACE_660003155
		erreur_660003155 = i_format_str2(pt_LibelleAlarme_660003155, "%s=%s", "NameOfFile", pt_NameOfFile_660003155)
		erreur_660003155 = i_PlvMessEmettre(8849, 2, g_iartout12, "", 2, code_rejet_660003155, pt_LibelleAlarme_660003155, 0)
		SAUT STOCKE_ERRONE
	FINSI
FINSI
# /G3R4 lot3 QC852

# Controles semantiques
#----------------------
#-- controle de presence du champ <NetworkType>

SI(!i_valid_field_n(g_iartin, $Tcrae_mtc::NetworkType))
ALORS
	trace("**Tcrae_mtc, champ <NetworkType> absent")
	code_rejet_660003155 = MODULE_TRAIT_660003155 + ERR_SEM_660003155 + EFFICACE_660003155
	erreur_660003155 = i_format_str2(pt_LibelleAlarme_660003155, "%s> <f=%s", "NetworkType", pt_NameOfFile_660003155)
	erreur_660003155 = i_PlvMessEmettre(8846, 2, g_iartout12, "", 2, code_rejet_660003155, pt_LibelleAlarme_660003155, 0)
	SAUT STOCKE_ERRONE
FINSI

#-- controle de valeurs du champ <NetworkType>, val possible : 0,1 et 2

val_champ_660003155 = i_get_art_field(g_iartin, $Tcrae_mtc::NetworkType)
SI(((val_champ_660003155!=0)&&(val_champ_660003155!=1)&&(val_champ_660003155!=2)))
ALORS
	trace1("**Tcrae_mtc ,valeur du champ NetworkType :<%x> incorrecte", val_champ_660003155)
	code_rejet_660003155 = MODULE_TRAIT_660003155 + ERR_SEM_660003155 + EFFICACE_660003155
	erreur_660003155 = i_format_str2(pt_LibelleAlarme_660003155, "%s> <f=%s", "NetworkType", pt_NameOfFile_660003155)
	erreur_660003155 = i_PlvMessEmettre(8840, 2, g_iartout12, "", 3, code_rejet_660003155, val_champ_660003155, pt_LibelleAlarme_660003155)
	SAUT STOCKE_ERRONE
FINSI


# G3R7 MVNO Light
date_cra_660003155 = i_get_art_field(g_iartin, $Tcrae_mtc::ddebut)

b_IMSI_OrangeCo_660003155 = 1

SI (i_valid_field_n(g_iartin, $Tcrae_mtc::IMSI))
ALORS
	b_IMSI_OrangeCo_660003155 = 0
	erreur_660003155 = i_get_art_str(g_iartin,$Tcrae_mtc::IMSI, pt_IMSI_660003155)
	SI (i_strplcmp(pt_IMSI_660003155, "20801", 0, 5) == 0) 
	ALORS
		b_IMSI_OrangeCo_660003155 = 1
	SINON
		SI (i_strplcmp(pt_IMSI_660003155, "208", 0, 3) == 0) 
		ALORS
			i_get_sub_str(pt_IMSI_660003155, 0, 4, pt_resultat_660003155)
			erreur_660003155 = i_format_str2(pt_terme_660003155, "%s%s", "L_", pt_resultat_660003155)
			SI (i_get_tab_field("MVNO", date_cra_660003155, pt_terme_660003155) != g_inull)
			ALORS
				b_IMSI_OrangeCo_660003155 = 1
			FINSI
		FINSI
	FINSI
FINSI


# G5R2lot2
# calcul de pt_MCCMNCx, pt_IMSIy, IMSI_Transnational_M2M
i_get_sub_str(pt_IMSI_660003155, 0, 5, pt_MCCMNCx_660003155)
i_get_sub_str(pt_IMSI_660003155, 6, 6, pt_IMSIy_660003155)
erreur_660003155 = i_format_str2(str_conteneur_660003155, "%s%s", "M2M_", pt_MCCMNCx_660003155)
i_strcpy(ptr_res_660003155, i_get_tab_field("MVNO", date_cra_660003155, str_conteneur_660003155))
# equivallent a QC1441 : anomalie core de i_adequation_chaine_expreg
SI (i_strcmp(pt_IMSIy_660003155, "") != 0 && i_strcmp(ptr_res_660003155, "") != 0)
ALORS
  SI ( i_strcmp(ptr_res_660003155,"Tous") == 0 || i_adequation_chaine_expreg(ptr_res_660003155, pt_IMSIy_660003155) == 0)
  ALORS
    IMSI_Transnational_M2M_660003155 = Vrai_660003155
  SINON
    IMSI_Transnational_M2M_660003155 = Faux_660003155
  FINSI
SINON
  IMSI_Transnational_M2M_660003155 = Faux_660003155
FINSI
#/QC1441

# filtre des non transnationnaux et non orangeCo
SI (!b_IMSI_OrangeCo_660003155 && !IMSI_Transnational_M2M_660003155)
ALORS
		trace("Le champ IMSI ne commence pas par 208xx => ERRONE")
		code_rejet_660003155 = MODULE_TRAIT_660003155 + ERR_SEM_660003155 + EFFICACE_660003155
		erreur_660003155 = i_format_str2(pt_LibelleAlarme_660003155, "%s> <f=%s", "IMSI", pt_NameOfFile_660003155)
		erreur_660003155 = i_PlvMessEmettre(8822, 2, g_iartout12, "", 2, code_rejet_660003155, pt_LibelleAlarme_660003155, 0)
		SAUT STOCKE_ERRONE
FINSI
#/G5R2 lot2



# controles croises de champs
#-----------------------------

# SI NetworkType==0 et MtNetworkYype absent ou <> 1 et 2  Erreur

erreur_660003155 = i_get_art_field(g_iartin, $Tcrae_mtc::NetworkType)
SI(erreur_660003155 ==0)
ALORS
	SI(i_valid_field_n(g_iartin, $Tcrae_mtc::MtNetworkType))
	ALORS
		erreur_660003155= i_get_art_field(g_iartin, $Tcrae_mtc::MtNetworkType)
		SI((erreur_660003155 != 1) && (erreur_660003155 != 2))
		ALORS
			trace1("**Tcrae_mtc ,NetworkType==0 et MoNetworkType :<%x> != 1 et 2", erreur_660003155)
			code_rejet_660003155 = MODULE_TRAIT_660003155 + ERR_SEM_660003155 + EFFICACE_660003155
			erreur_660003155 = i_format_str2(pt_LibelleAlarme_660003155, "%s%s", "f=", pt_NameOfFile_660003155)
			erreur_660003155 = i_PlvMessEmettre(8847, 2, g_iartout12, "", 3, code_rejet_660003155, erreur_660003155, pt_LibelleAlarme_660003155)
			SAUT STOCKE_ERRONE
		FINSI
	SINON
		trace("**Tcrae_mtc ,NetworkType==0 et MtNetworkType absent")
		code_rejet_660003155 = MODULE_TRAIT_660003155 + ERR_CROISE_660003155 + EFFICACE_660003155
		erreur_660003155 = i_format_str2(pt_LibelleAlarme_660003155, "%s%s", "f=", pt_NameOfFile_660003155)
		erreur_660003155 = i_PlvMessEmettre(8848, 2, g_iartout12, "", 2, code_rejet_660003155, pt_LibelleAlarme_660003155, 0)
		SAUT STOCKE_ERRONE
	FINSI
FINSI

# controle de presence/absence simultane des deux champs IMSI et Min
#

SI((i_valid_field_n(g_iartin, $Tcrae_mtc::IMSI))&&(i_valid_field_n(g_iartin, $Tcrae_mtc::Min)))
ALORS
	trace("**Tcrae_mtc , presence simultanee des champs <IMSI> et <Min>")
	code_rejet_660003155 = MODULE_TRAIT_660003155 + ERR_CROISE_660003155 + EFFICACE_660003155
	erreur_660003155 = i_format_str2(pt_LibelleAlarme_660003155, "%s> <f=%s", "Min", pt_NameOfFile_660003155)
	erreur_660003155 = i_PlvMessEmettre(8844, 2, g_iartout12, "", 3, code_rejet_660003155, "IMSI", pt_LibelleAlarme_660003155)
	SAUT STOCKE_ERRONE
FINSI

SI(!(i_valid_field_n(g_iartin, $Tcrae_mtc::IMSI))&& !(i_valid_field_n(g_iartin, $Tcrae_mtc::Min)))
ALORS
	trace("**Tcrae_mtc ,absence simultanee des champs <IMSI> et <Min>")
	code_rejet_660003155 = MODULE_TRAIT_660003155 + ERR_CROISE_660003155 + EFFICACE_660003155
	erreur_660003155 = i_format_str2(pt_LibelleAlarme_660003155, "%s> <f=%s", "Min", pt_NameOfFile_660003155)
	erreur_660003155 = i_PlvMessEmettre(8843, 2, g_iartout12, "", 3, code_rejet_660003155, "IMSI", pt_LibelleAlarme_660003155)
	SAUT STOCKE_ERRONE
FINSI

# controle de presence/absence simultane des deux champs TeleserviceCode et BearerSvcCode
#

SI((i_valid_field_n(g_iartin, $Tcrae_mtc::TeleserviceCode))
	&&(i_valid_field_n(g_iartin, $Tcrae_mtc::BearerSvcCode)))
ALORS
	trace("**Tcrae_mtc , presence simultanee des champs <TeleserviceCode> et <BearerSvcCode>")
	code_rejet_660003155 = MODULE_TRAIT_660003155 + ERR_CROISE_660003155 + EFFICACE_660003155
	erreur_660003155 = i_format_str2(pt_LibelleAlarme_660003155, "%s> <f=%s", "BearerSvcCode", pt_NameOfFile_660003155)
	erreur_660003155 = i_PlvMessEmettre(8844, 2, g_iartout12, "", 3, code_rejet_660003155, "TeleserviceCode", pt_LibelleAlarme_660003155)
	SAUT STOCKE_ERRONE
FINSI

SI(!(i_valid_field_n(g_iartin, $Tcrae_mtc::TeleserviceCode))
	&&!(i_valid_field_n(g_iartin, $Tcrae_mtc::BearerSvcCode)))
ALORS
	trace("**Tcrae_mtc , abscence simultanee des champs <TeleserviceCode> et <BearerSvcCode>")
	code_rejet_660003155 = MODULE_TRAIT_660003155 + ERR_CROISE_660003155 + EFFICACE_660003155
	erreur_660003155 = i_format_str2(pt_LibelleAlarme_660003155, "%s> <f=%s", "BearerSvcCode", pt_NameOfFile_660003155)
	erreur_660003155 = i_PlvMessEmettre(8843, 2, g_iartout12, "", 3, code_rejet_660003155, "TeleserviceCode", pt_LibelleAlarme_660003155)
	SAUT STOCKE_ERRONE
FINSI

# controle de presence simultane des deux champs DualTeleservice et DualBearerSvc
#

SI((i_valid_field_n(g_iartin, $Tcrae_mtc::DualTeleservice))
	&&(i_valid_field_n(g_iartin, $Tcrae_mtc::DualBearerSvc)))
ALORS
	trace("**Tcrae_mtc , presence simultanee des champs <DualTeleservice> et <DualBearerSvc>")
	code_rejet_660003155 = MODULE_TRAIT_660003155 + ERR_CROISE_660003155 + EFFICACE_660003155
	erreur_660003155 = i_format_str2(pt_LibelleAlarme_660003155, "%s> <f=%s", "DualBearerSvc", pt_NameOfFile_660003155)
	erreur_660003155 = i_PlvMessEmettre(8844, 2, g_iartout12, "", 3, code_rejet_660003155, "DualTeleservice", pt_LibelleAlarme_660003155)
	SAUT STOCKE_ERRONE
FINSI

# Mise a jour du champ T3t1/NameOfFile pour les articles provenant de la redistribution
#--------------------------------------------------------------------------------------

SI (i_valid_field_n(g_iartin, $Tcrae_mtc::NameOfFile)&& i_valid_field_n(g_iartin,$Tcrae_mtc::DateOfRedistri))
ALORS
	trace("**Tcrae_mtc , article issu de la redistribution**")
#	erreur  = i_get_field_str(g_iartin ,"NameOfFile",pt_NameOfFile ) fait plus haut
	dateOfRedisJ_660003155 = i_sdat_to_jdat(i_get_art_field(g_iartin, $Tcrae_mtc::DateOfRedistri))
	trace1("datej %x", dateOfRedisJ_660003155)
	Nb_jourRedist_660003155 = i_cur_date()- dateOfRedisJ_660003155
	trace1("cur_date %x ",i_cur_date())
	trace1("Nb_jourRedist est %x ",Nb_jourRedist_660003155)
	erreur_660003155  = i_EntierToString(Nb_jourRedist_660003155 , pt_NbJourRedist_660003155 , 4)
	erreur_660003155 =i_format_str2(pt_NameOfFile_660003155 , "%s.%s" ,pt_NameOfFile_660003155  , pt_NbJourRedist_660003155 )
	trace2("Tcrae_mtc , mis a jour <NameOfFile> par :<%s>", pt_NameOfFile_660003155 , 0)
	SI (i_strlen(pt_NameOfFile_660003155) > g_iartin.NameOfFile!TAILLE)
	ALORS
		taille_660003155 = g_iartin.NameOfFile!TAILLE
	SINON
		taille_660003155 = i_strlen(pt_NameOfFile_660003155)
	FINSI
# TT0033 plus de modification du g_iartin a cause de pb decoupe gros fichier
	erreur_660003155 = i_resize_tlv(g_iartout12, "T3t1_NameOfFile", "NameOfFile", taille_660003155)
	erreur_660003155  = i_memcpy_art_field(g_iartout12, "NameOfFile",pt_NameOfFile_660003155 , taille_660003155)
# /TT0033
	erreur_660003155  = i_get_field_str(g_iartin ,"NameOfFile",pt_NameOfFile_660003155 )
	trace2("Tcrae_mtc , <NameOfFile> :<%s>", pt_NameOfFile_660003155 , 0)
SINON
	# mise a jour de l'article avec le champ NameOfFile

# TT0033 plus de modification du g_iartin a cause de pb decoupe gros fichier
	erreur_660003155 = i_ajout_tlv(g_iartout12, "T3t1_NameOfFile" , "")
	erreur_660003155 = i_resize_tlv(g_iartout12, "T3t1_NameOfFile" , "NameOfFile" ,17)
# /TT0033
	SI(erreur_660003155!=0)
	ALORS
		trace("Tcrae_mtc, erreur d ajout du champ <NameOfFile>**")
		code_rejet_660003155 = MODULE_TRAIT_660003155 + ERR_SEM_660003155 + EFFICACE_660003155
		erreur_660003155 = i_format_str2(pt_LibelleAlarme_660003155, "%s> <f=%s", "NameOfFile", pt_NameOfFile_660003155)
		erreur_660003155 = i_PlvMessEmettre(8849, 2, g_iartout12, "", 2, code_rejet_660003155, pt_LibelleAlarme_660003155, 0)
		SAUT STOCKE_ERRONE
	FINSI
# TT0033 plus de modification du g_iartin a cause de pb decoupe gros fichier
	erreur_660003155 = i_resize_tlv(g_iartout12, "T3t1_NameOfFile" , "NbRedist" ,2)
# /TT0033
	SI(erreur_660003155!=0)
	ALORS
		trace("Tcrae_mtc, erreur d ajout du champ <NbRedist>**")
		code_rejet_660003155 = MODULE_TRAIT_660003155 + ERR_SEM_660003155 + EFFICACE_660003155
		erreur_660003155 = i_format_str2(pt_LibelleAlarme_660003155, "%s> <f=%s", "NbRedist", pt_NameOfFile_660003155)
		erreur_660003155 = i_PlvMessEmettre(8849, 2, g_iartout12, "", 2, code_rejet_660003155, pt_LibelleAlarme_660003155, 0)
		SAUT STOCKE_ERRONE
	FINSI

# TT0033 plus de modification du g_iartin a cause de pb decoupe gros fichier
	erreur_660003155 = i_memcpy_art_field(g_iartout12, "NameOfFile",pt_NameOfFile_660003155, i_strlen(pt_NameOfFile_660003155))
# /TT0033
FINSI


#-------------------------------------------------------------------------
# Mise a jour du compteur applicatif <Nom fichier/date de collecte> :1507
#--------------------------------------------------------------------------
CPT_X_660003155 = 30
CPT_Z_660003155 = 0
date_660003155 = i_DHgetLocalTime(4, 7, i_date_audit())
erreur_660003155=i_incr_cpt(CPT_660003155,CPT_X_660003155,g_ieec,CPT_Z_660003155,date_660003155,1)

SI(erreur_660003155!=0)
ALORS
	trace("**Tcrae_mtc, erreur de mise a jour du compteur 1507 **")
	erreur_660003155 = i_format_str2(pt_LibelleAlarme_660003155, "%s%s", "f=", pt_NameOfFile_660003155)
	erreur_660003155 = i_PlvMessEmettre(8850, 2, g_iartout12, "", 3, code_rejet_660003155, 1507, pt_LibelleAlarme_660003155)
	SAUT STOCKE_ERRONE
FINSI

#  Article valide , stockage en OK
#---------------------------------

trace("**Tcrae_mtc, stockage de l'article en OK**")
# TT0033 plus de modification du g_iartin a cause de pb decoupe gros fichier
erreur_660003155 = i_stocke_art(g_iartout12, 0, PT_OK, 0)
# /TT0033
RETOUR  TRAIT_OK


# stockage en errone
#--------------------

POINT STOCKE_ERRONE

# TT0033 plus de modification du g_iartin a cause de pb decoupe gros fichier
erreur_660003155 = i_make_art_rej(g_iartout12, g_iartout2, code_rejet_660003155)
# /TT0033
erreur_660003155 = i_stocke_art(g_iartout2,0,PT_ERRONE,0)
trace("**Tcrae_mtc , Artcile stocke en errone**")
#      RETOUR TRAIT_OK
RETOUR BAD_BLOC
#--------------------------- Fin Tcrae_mtc_trt.src --------------------------------------
