>I have to export data from a FoxPro database using VFP 6.0 in an unusual format to a text file. What commands can I use to send hard code as well as my data to the text file? I am currently trying:
>
>SET ALTERNATE ON
>SET ALTERNATE TO &lcfilename ADDITIVE
>??'RUNDATE: '
>??'OPERATOR: '
>
>at the beginning of my routine, and it's not working! Any ideas?
>
What do you mean by "it's not working"? Lots of things may be going wrong, including Windows interpreting the output as being sent to a printer and loading up graphical information.
You should avoid using macro expaqnsion IAC when specifying the name of a file for output - using name resolution will avoid problems created by Long File names that might be causing things on the comand line to be misparsed (frequently the case when the path contains a space.) Try the following instead of your SET ALTERNATE line:
SET ALTERNATE TO (lcFileName) ADDITIVE
It may not help, but it can't hurt.
You can look at using low-level file I/O, or build the output in a string memory variable, and then write that out as a file using STRTOFILE(). Both approaches never let Windows' printer driver at the file, so there's no chance of something funky going on as far as Windows converting the output to something other than what you want.