Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error: not a COBOLData object??

Status
Not open for further replies.

zandman

Programmer
Oct 28, 2003
2
NL
Hi people,

I got the following error when I try to delete a file:
ERROR OCCURED System.ArgumentException: This is not a COBOLData object.
Parameter name: obj
at Fujitsu.COBOL.InteropServices.Win32.COBOLDataMarshaler.MarshalManagedToNative(Object obj)
at COB_FILE_DELETE(Object COBF-INF)
at P00002.Procedure(COBOLData C00002-BESTAND).

I use Fujitsu's function COB_FILE_DELETE on a development/test/production server. I only get the error on the testmachine!

There must be a difference between the machines but I couldn't find any. The rest of the program works fine, only deleting files fail.

Do you guys have a clue for me?

Regards,

Michel

 
This is a piece of the code:
CALL COB_FILE_DELETE USING BY REFERENCE COBF-INF
RETURNING RET-CODE

IDENTIFICATION DIVISION.
PROGRAM-ID. COB_FILE_DELETE IS PROTOTYPE CUSTOM-ATTRIBUTE IS PInvoke.
ENVIRONMENT DIVISION.
CONFIGURATION SECTION.
SPECIAL-NAMES.
CUSTOM-ATTRIBUTE PInvoke
CLASS DllImport USING "F5FHFUTC.DLL".
REPOSITORY.
CLASS DllImport AS "System.Runtime.InteropServices.DllImportAttribute".

DATA DIVISION.
LINKAGE SECTION.
COPY COBF-INF.
01 RET-CODE PIC S9(9) COMP-5.
PROCEDURE DIVISION USING BY REFERENCE COBF-INF
RETURNING RET-CODE.
END PROGRAM COB_FILE_DELETE.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top