that's the printer port isn't it why won't my program work its suppose to print to the printer
Did you define a printer share?
Something like (Admin rights needed for Win7)
NET USE LPT1: \\ComputerName\PrinterShareName
To test: copy someTextFile.txt LPT1
You need to add the run-time tunable printer_redirection=true in order for the priint output to be redirected through the Windows print spooler.
I am assuming that this is a managed code application as the error that you are receiving is a .NET exception.
In a managed project you can turn this tunable on by adding a section to an app.config file.
If you right-click on your project name-->select add-->new item and select Application Configuration file from the list.
Edit the app.config file to add the run-time tunable as show in the following docs.
Format for a Configuration File for .NET COBOL
The first key in the example is the required one:
add key="printer_redirection" value="true"
The second key is optional and provides a method of changing the default font name and size.
Configuration system failed to initialize
Unrecognized configuration section MicroFocus.COBOL.Application/Interop. (c:\use
rs\titor\documents\visual studio 2010\projects\phoneadd\phoneadd\bin\debug\Phone
Add.exe.Config line 21)
Unhandled Exception: COBOLFileHandlingException
'LPT1' : 9/004 (ANS74)
4 Illegal file name
at Void PHONEADD._MF_PERFORM_4_0() in c:\users\titor\documents\visual studio 2
at Int32 PHONEADD.PHONEADD() in c:\users\titor\documents\visual studio 2010\Pr
at Int32 PHONEADD._MF_ENTRY()
Press any key to continue . . .
I'm getting this error now