Getting cobconfig to work.

I saw a post on how to get MF Visual Cobol to print to a USB printer, instead of the default LPT1. However, it was not as descriptive as I would have hoped. Since I have not worked with Cobol since 1995 and went into the business world using Fortran after that class, I never found the need to set environment variables. I also never used MF Cobol before now. The one post states to create a file called cobconfig.cfg and then set the cobconfig environment variable to point to that file. Well, I have tried a couple of ways on my own and could not get it to set the environment variable of cobconfig and work. Any help that someone can provide in getting the cobconfig environment variable to work in MF Visual Cobol for Visual Studio 2012 would be greatly appreciated. I've looked far and wide on the net and have not yet found any specific help. I did get the old program to work via sending the output to a file, but I want to get it to work as originally intended to a printer and not to the old LPT1 port. A specific example of how to set the variable would be great.

Parents
  • Thank you for the added information and I will check that as well. I did exactly that to set the variable in windows. On another note, when I look at the properties in Visual Studio for my program, the configuration drop down is grey and lists N/A. I do only have a student eval copy. I added the code and it did not display, so I imagine that it is being set, but I still get the error with an lpt1. This is how the error reads and when I changed the program to print to a file, it stopped it and executes to that file. Cobolfilehandlingexception was unhandled  'LPT1' : 9/004 (ANS74) 4 illegal filename.

Reply
  • Thank you for the added information and I will check that as well. I did exactly that to set the variable in windows. On another note, when I look at the properties in Visual Studio for my program, the configuration drop down is grey and lists N/A. I do only have a student eval copy. I added the code and it did not display, so I imagine that it is being set, but I still get the error with an lpt1. This is how the error reads and when I changed the program to print to a file, it stopped it and executes to that file. Cobolfilehandlingexception was unhandled  'LPT1' : 9/004 (ANS74) 4 illegal filename.

Children
No Data