Skip to main content

[archive] Exception using cobol to dotnet

  • November 1, 2010
  • 6 replies
  • 0 views

[Migrated content. Thread originally posted on 27 October 2010]

We are calling a dotnet assembly from Acucobol.
The definition file was created using NETDEFGEN.

This programme works fine if the data we pass is valid.

If not, the dotnet-programme returns an EXCEPTION with an error message.
My programme does not catch this and crashes.

There seems to be no "ON EXCEPTION" as part of the type 1 Modify statement.
Is there any way to catch this situation?

6 replies

[Migrated content. Thread originally posted on 27 October 2010]

We are calling a dotnet assembly from Acucobol.
The definition file was created using NETDEFGEN.

This programme works fine if the data we pass is valid.

If not, the dotnet-programme returns an EXCEPTION with an error message.
My programme does not catch this and crashes.

There seems to be no "ON EXCEPTION" as part of the type 1 Modify statement.
Is there any way to catch this situation?
You can use the declaratives ...

Format 2

USE AFTER STANDARD {EXCEPTION} PROCEDURE ON OBJECT
{ERROR }
Format 5

USE { active-x-control-item }
{ com-object-item }
{ property-1 [ ( param-1 ... ) ]
[ :: property-2 [ ( param2 ... ) ] ] ... }
{ statement }
[END-USE]

[Migrated content. Thread originally posted on 27 October 2010]

We are calling a dotnet assembly from Acucobol.
The definition file was created using NETDEFGEN.

This programme works fine if the data we pass is valid.

If not, the dotnet-programme returns an EXCEPTION with an error message.
My programme does not catch this and crashes.

There seems to be no "ON EXCEPTION" as part of the type 1 Modify statement.
Is there any way to catch this situation?
I don't want to hijack the thread. but if you use acubench how/where can you insert this? There are no tags to put it 'outside' of in the .cbl file and there doesn't seem to be a normal insertion point anywhere...

[Migrated content. Thread originally posted on 27 October 2010]

We are calling a dotnet assembly from Acucobol.
The definition file was created using NETDEFGEN.

This programme works fine if the data we pass is valid.

If not, the dotnet-programme returns an EXCEPTION with an error message.
My programme does not catch this and crashes.

There seems to be no "ON EXCEPTION" as part of the type 1 Modify statement.
Is there any way to catch this situation?
Yep, that is a problem with AcuBench, there isn't a way to have code for the declaratives for objects generated.

[Migrated content. Thread originally posted on 27 October 2010]

We are calling a dotnet assembly from Acucobol.
The definition file was created using NETDEFGEN.

This programme works fine if the data we pass is valid.

If not, the dotnet-programme returns an EXCEPTION with an error message.
My programme does not catch this and crashes.

There seems to be no "ON EXCEPTION" as part of the type 1 Modify statement.
Is there any way to catch this situation?
Yep, that is a problem with AcuBench, there isn't a way to have code for the declaratives for objects generated.

[Migrated content. Thread originally posted on 27 October 2010]

We are calling a dotnet assembly from Acucobol.
The definition file was created using NETDEFGEN.

This programme works fine if the data we pass is valid.

If not, the dotnet-programme returns an EXCEPTION with an error message.
My programme does not catch this and crashes.

There seems to be no "ON EXCEPTION" as part of the type 1 Modify statement.
Is there any way to catch this situation?
Well thats just one more thing to add to the list of shortfalls with acubench... I'm starting to dislike using acubench more and more :-(

[Migrated content. Thread originally posted on 27 October 2010]

We are calling a dotnet assembly from Acucobol.
The definition file was created using NETDEFGEN.

This programme works fine if the data we pass is valid.

If not, the dotnet-programme returns an EXCEPTION with an error message.
My programme does not catch this and crashes.

There seems to be no "ON EXCEPTION" as part of the type 1 Modify statement.
Is there any way to catch this situation?
Thank you "Dilbert".... that fixed it !!