I am wondering how you would output from a program to a text file for data handling.

Any help would be much appreciated