1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| '--- Chargement du fichier en lecture ---
Set fso = CreateObject("Scripting.FileSystemObject")
Set fread = Fso.OpenTextFile("\\****\administration\****\Statistique\statol\statol", ForReading)
Set fwrite = fso.OpenTextFile("\\****\administration\****\Statistique\statol\statol2", ForWriting,true)
'--- Boucle de lecture du fichier AR de l'AS400 ---
while Not fread.AtEndOfStream
'--- Lecture ligne à ligne ---
ligne= fread.ReadLine
Client=Mid(ligne,1,11)
Rayon=Mid(ligne,13,1)
Srayon=Mid(ligne,15,2)
If Mid(Ligne,18,3)=" " then
MontantHT=Mid(ligne,26,7)
MontantRev=Mid(ligne,34,7)
MontantTTC=Mid(ligne,42,7)
fwrite.write Client & Rayon & Srayon & MontantHT & MontantRev & MontantTTC & chr(10) |
Partager