Skip to main content

Here's the scenario:  Using NetExpress 5.0, I have a program that I'll call A.  It is compiled as a .DLL.  It is basically a driver program that runs a number of other COBOL programs that have been compiled as GNTs. 

We want to kick off this process from a .Net service.  This all works fine until one of the GNTs runs the function X"AF".  (For those of you living in the present, X"AF" enables enhanced Accept and Display, which is fine if you are using a native COBOL user interface.)  Then the whole process crashes.


Now, the obvious solution is to get rid of the X"AF" calls because the program isn't really using the user interface, they're just "batch" processing programs.  However, the process that program A runs could potentially call any of over 1000 different programs and we'd like to implement this process next week.  Also, my service shares these GNTs with a process that does run with the Native COBOL interface.

Is there a way to tell COBOL to "ignore" that X"AF" call?  Perhaps some kind of compiler option that I can invoke in the .DLL or environment variable that I can set on the server that will basically cause X"AF" to "do nothing," but not crash my service?

The obvious goal here is to be able to resolve this by changing one program or configuration item, rather than having to change over 1000 programs. 


Thanks for the help!

Mike


#COBOL
#.net
#.netdllcobol

Here's the scenario:  Using NetExpress 5.0, I have a program that I'll call A.  It is compiled as a .DLL.  It is basically a driver program that runs a number of other COBOL programs that have been compiled as GNTs. 

We want to kick off this process from a .Net service.  This all works fine until one of the GNTs runs the function X"AF".  (For those of you living in the present, X"AF" enables enhanced Accept and Display, which is fine if you are using a native COBOL user interface.)  Then the whole process crashes.


Now, the obvious solution is to get rid of the X"AF" calls because the program isn't really using the user interface, they're just "batch" processing programs.  However, the process that program A runs could potentially call any of over 1000 different programs and we'd like to implement this process next week.  Also, my service shares these GNTs with a process that does run with the Native COBOL interface.

Is there a way to tell COBOL to "ignore" that X"AF" call?  Perhaps some kind of compiler option that I can invoke in the .DLL or environment variable that I can set on the server that will basically cause X"AF" to "do nothing," but not crash my service?

The obvious goal here is to be able to resolve this by changing one program or configuration item, rather than having to change over 1000 programs. 


Thanks for the help!

Mike


#COBOL
#.net
#.netdllcobol

What is the actual error that you are receiving when the X"AF" function is called?

Can you show me what the parameters and the call statement look like?

Thanks.


Here's the scenario:  Using NetExpress 5.0, I have a program that I'll call A.  It is compiled as a .DLL.  It is basically a driver program that runs a number of other COBOL programs that have been compiled as GNTs. 

We want to kick off this process from a .Net service.  This all works fine until one of the GNTs runs the function X"AF".  (For those of you living in the present, X"AF" enables enhanced Accept and Display, which is fine if you are using a native COBOL user interface.)  Then the whole process crashes.


Now, the obvious solution is to get rid of the X"AF" calls because the program isn't really using the user interface, they're just "batch" processing programs.  However, the process that program A runs could potentially call any of over 1000 different programs and we'd like to implement this process next week.  Also, my service shares these GNTs with a process that does run with the Native COBOL interface.

Is there a way to tell COBOL to "ignore" that X"AF" call?  Perhaps some kind of compiler option that I can invoke in the .DLL or environment variable that I can set on the server that will basically cause X"AF" to "do nothing," but not crash my service?

The obvious goal here is to be able to resolve this by changing one program or configuration item, rather than having to change over 1000 programs. 


Thanks for the help!

Mike


#COBOL
#.net
#.netdllcobol

Chris, I can't tell you what the error was because the .NET process that was calling the COBOL .dll was crashing and swallowing up any error messages that cobol sent out.

That being said, I have figured out how to resolve the issue.  Of course, right now I can't remember what I did.  When I do, I'll post the resolution for all of posterity.

I do know that ultimately I also had to wrap the cobol .dll in a COM object using NetExpress' service interface tool and register that .dll with Windows.  That was not related to the above issue, but was required to deal with the service but to correctly handle the i/o between the calling .NET service and the cobol processing.

Thanks for the help!

Mike