Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE
Austin1 Honored Contributor.
Honored Contributor.
1025 views

COBOL PIC X data item -> .net char array

Jump to solution

FYI,

Win7, Visual Studio 2013 Pro, version 12.0.40629.00 Update 5, .NET Framework version 4.5.51209, Visual COBOL version 2.2.

Here is a simple managed console app:

program-id. Program1 as "cblConTest1.Program1".

data division.
working-storage section.

01 WORK-STORAGE-GROUP-ITEM.
   05 TEST-1 PIC X(10) VALUE " ABCDEFGHI".
01 WorkString string.
01 CharArray1 character occurs any.
01 CharArray2 character occurs any.

procedure division.

   Set WorkString = TEST-1.
   Set CharArray1 = WorkString::ToArray.
   Set CharArray2 = TEST-1::ToArray.

    goback.

end program Program1.

The above builds/compiles with no errors or warnings.

When the last statement executes:

 1) in step-thru Debug mode, you get a "FatalExecutionEngineError was detected".

 2) in "Start Without Debugging" mode,  you get a Windows pop-up message that the app has stopped working and you are asked if you want to send more information about the problem [to Microsoft].

0 Likes
1 Solution

Accepted Solutions
Highlighted
Austin1 Honored Contributor.
Honored Contributor.

RE: COBOL PIC X data item -> .net char array

Jump to solution

FYI, Incident # 2877859

0 Likes
2 Replies
Micro Focus Expert
Micro Focus Expert

RE: COBOL PIC X data item -> .net char array

Jump to solution

I tested this with the latest product 2.3.2 and the problem still occurs.

Please open up a support incident with Customer Care for this and we will submit it to Development as a bug.

Thanks.

0 Likes
Highlighted
Austin1 Honored Contributor.
Honored Contributor.

RE: COBOL PIC X data item -> .net char array

Jump to solution

FYI, Incident # 2877859

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.