I created a process that works very well. I'm trying to develop it to make it even more automatic . However, I face a problem which I can not find solutions that is why I turn to you today.
I 'll try to explain all this as best I can.
My process takes me a file with the following structure:
Code: Select all
vYear = SUBST(pYear,3,4);
vMonth = SUBST(pMonth,2,2);
# Ce code fait référence ici à l'en tête de notre fichier qui doit être écrit une seule fois pour toutes les lignes
# --------------------------------
# Traitement sur la date
# -------------------------------
# Je transforme les paramètres qui sont en entrés afin de constuire
# une date qui puisse être comparée aux dates contenues dans mon
# cube de paramètre : delivery date et ready to delivered
vYM = vYear | '-' | vmonth | '-' | '01';
vYM2 = DAYNO(vYM);
ASCIIOutput(cOutputLog, NumberToString(vYM2));
While (vYM2 <>
If( vHeader = 0);
# ------------------------------------------------
# Création de mon architecture père/fils
# ------------------------------------------------
# Permet de spécifier à TM1 que je ne veux pas de guillemets en début et fin de ligne
DatasourceASCIIQuoteCharacter='';
# Les lignes qui suivent permettent de construire l'architecture de la dim AIRCRAFT
ASCIIOutput(cOutputLog, 'Father' | ';' | 'Child' | ';' | 'MSN' | ';' | 'NameEN' | ';' | 'NameFR' | ';' | 'Type' | ';' | 'Serie' | ';' | 'Code' | ';' | 'FirstFlight' | ';' | 'Retreatment_IFRS');
ASCIIOutput(cOutputLog, ';Aircraft_Prod_' | vMonth | '_' | vYear | ';' | ';' | ';' | ';' | ';' | ';' | ';' | ';' | ';' );
ASCIIOutput(cOutputLog, 'Aircraft_Prod_' | vMonth | '_' | vYear | ';' | 'NA_A_PRD_' | vMonth | '_' | vYear | ';' | ';' | ';' | ';' | ';' | ';' | ';' | ';' );
ASCIIOutput(cOutputLog, 'Aircraft_Prod_' | vMonth | '_' | vYear | ';' | 'NA_A_DEL_' | vMonth | '_' | vYear | ';' | ';' | ';' | ';' | ';' | ';' | ';' | ';' );
ASCIIOutput(cOutputLog, 'Aircraft_Prod_' | vMonth | '_' | vYear | ';' | 'NA_A_ANT_' | vMonth | '_' | vYear | ';' | ';' | ';' | ';' | ';' | ';' | ';' | ';' );
ASCIIOutput(cOutputLog, 'NA_A_PRD_' | vMonth | '_' | vYear | ';' | 'NA_A42_PRD_' | vMonth | '_' | vYear | ';' | ';' | ';' | ';' | ';' | ';' | ';' | ';' );
ASCIIOutput(cOutputLog, 'NA_A_PRD_' | vMonth | '_' | vYear | ';' | 'NA_A72_PRD_' | vMonth | '_' | vYear | ';' | ';' | ';' | ';' | ';' | ';' | ';' | ';' );
ASCIIOutput(cOutputLog, 'NA_A_ANT_' | vMonth | '_' | vYear | ';' | 'NA_A42_ANT_' | vMonth | '_' | vYear | ';' | ';' | ';' | ';' | ';' | ';' | ';' | ';' );
ASCIIOutput(cOutputLog, 'NA_A_ANT_' | vMonth | '_' | vYear | ';' | 'NA_A72_ANT_' | vMonth | '_' | vYear | ';' | ';' | ';' | ';' | ';' | ';' | ';' | ';' );
ASCIIOutput(cOutputLog, 'NA_A_DEL_' | vMonth | '_' | vYear | ';' | 'NA_A42_DEL_' | vMonth | '_' | vYear | ';' | ';' | ';' | ';' | ';' | ';' | ';' | ';' );
ASCIIOutput(cOutputLog, 'NA_A_DEL_' | vMonth | '_' | vYear | ';' | 'NA_A72_DEL_' | vMonth | '_' | vYear | ';' | ';' | ';' | ';' | ';' | ';' | ';' | ';' );
ASCIIOutput(cOutputLog, 'NA_A42_PRD_' | vMonth | '_' | vYear | ';' | 'NA_A42_WIP_' | vMonth | '_' | vYear | ';' | ';' | ';' | ';' | ';' | ';' | ';' | ';' );
ASCIIOutput(cOutputLog, 'NA_A42_PRD_' | vMonth | '_' | vYear | ';' | 'NA_A42_FG_' | vMonth | '_' | vYear | ';' | ';' | ';' | ';' | ';' | ';' | ';' | ';' );
ASCIIOutput(cOutputLog, 'NA_A72_PRD_' | vMonth | '_' | vYear | ';' | 'NA_A72_WIP_' | vMonth | '_' | vYear | ';' | ';' | ';' | ';' | ';' | ';' | ';' | ';' );
ASCIIOutput(cOutputLog, 'NA_A72_PRD_' | vMonth | '_' | vYear | ';' | 'NA_A72_FG_' | vMonth | '_' | vYear | ';' | ';' | ';' | ';' | ';' | ';' | ';' | ';' );
# En incrémentant cette variable, on signale que l'on ne rencontre qu'une seule fois dans ce If
# Ceci permet donc de n'avoir qu'un seul en tête pour toutes nos lignes
vHeader =1;
EndIf;
I do not know if I could be easily understood in any case I hope.
Thank you very much in advance because it will remove me quite a problem if you have any solutions to offer me ...
