galaxy0815
Technical User
Hi,
I have an issue with the Cognos script language (Version 7.4.2025.0). The issue I have is that I have 2 .csv files saved in a folder which I want to copy with the help of Cognos script language automatically to one final .csv file. All my tests failed till now. The last code I tried was the following:
Sub Main()
Dim readfile as string
Dim writefile as string
Dim moveline as string
Dim x as Integer
readfile = "C:\filecopy\file1.csv"
writefile = "C:\filecopy\file2.csv"
Open writefile For APPEND As #1
Open readfile For INPUT As #2
Do While Not Eof(2)
Line Input #2, moveline
Write #1, moveline
Loop
End Sub
Can somebody let me know how I can copy 2 csv files together in one .csv file with the help of Cognos script language? The best would be that the header row would just appear once in the final file.
Thanks in advance for your help,
Regards,
Martin
I have an issue with the Cognos script language (Version 7.4.2025.0). The issue I have is that I have 2 .csv files saved in a folder which I want to copy with the help of Cognos script language automatically to one final .csv file. All my tests failed till now. The last code I tried was the following:
Sub Main()
Dim readfile as string
Dim writefile as string
Dim moveline as string
Dim x as Integer
readfile = "C:\filecopy\file1.csv"
writefile = "C:\filecopy\file2.csv"
Open writefile For APPEND As #1
Open readfile For INPUT As #2
Do While Not Eof(2)
Line Input #2, moveline
Write #1, moveline
Loop
End Sub
Can somebody let me know how I can copy 2 csv files together in one .csv file with the help of Cognos script language? The best would be that the header row would just appear once in the final file.
Thanks in advance for your help,
Regards,
Martin