Highlighted
Absent Member.
Absent Member.
495 views

[archive] Exception using cobol to dotnet

[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?
0 Likes
5 Replies
Highlighted
Absent Member.
Absent Member.

RE: [archive] Exception using cobol to dotnet

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]
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Exception using cobol to dotnet

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...
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Exception using cobol to dotnet

Yep, that is a problem with AcuBench, there isn't a way to have code for the declaratives for objects generated.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Exception using cobol to dotnet

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 😞
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Exception using cobol to dotnet

Thank you "Dilbert".... that fixed it !!
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.