I have a FileOpen, FileWrite, FileClose within a WHILE loop. The FileClose does not seem to work. The code follows. DD is a string variable that I compute above. As I watch the program execute, I can see in every WHILE loop that the value of zz decrements by 1: 127, 126, 125, etc. Sometimes I want to run the loop well over 128 times, but it stops after it exhausts the number of file handles. Then I get WinBatch error 3078.
handle3 = FileOpen("History\KeyLists.csv", "APPEND")
FileWrite(handle3, DD)
FileClose(handle3)
zz = IntControl(77, 21, 0, 0, 0)
Display(2, "Number of file slots open: ", %zz%)