Highlighted
Micro Focus Contributor
Micro Focus Contributor
763 views

Pass a String Array from Java to COBOL

Jump to solution

[Migrated content. Thread originally posted on 10 August 2011]

SI 2529698

The client is looking for a code sample to pass a String Array from Java to
COBOL, there is this demo available but it does not show how to pass strings
(everything else it seems), see:
C:\Program Files (x86)\Micro Focus\Net Express 5.1\Examples\Net Express
IDE\JAVADEMO\COBOL\ARRAYS

I found a previous topic which sounds a bit similar but not to do with arrays: http://community.microfocus.com/Forums/3_COBOL__Net_Express_Server_Express_Visual_COBOL/266_Visual_Cobol_Sample_With_Java

Could I ask if anyone has a sample available that they could provide or
point me to? I cannot find anything specific that would help.

Kind regards
Kim
0 Likes
1 Solution

Accepted Solutions
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: Pass a String Array from Java to COBOL

Jump to solution
Kim,

If the customer wants to work with arrays of Java objects (strings are objects) it will be necessary to use Object COBOL rather than procedural COBOL. Although the JAVADEMO\OOCOBOL\ARRAY sample does not use strings the same principles demonstrated in the arraydemo.cbl can be used with an array of strings rather than an array of integers.

Gael.

View solution in original post

0 Likes
1 Reply
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: Pass a String Array from Java to COBOL

Jump to solution
Kim,

If the customer wants to work with arrays of Java objects (strings are objects) it will be necessary to use Object COBOL rather than procedural COBOL. Although the JAVADEMO\OOCOBOL\ARRAY sample does not use strings the same principles demonstrated in the arraydemo.cbl can be used with an array of strings rather than an array of integers.

Gael.

View solution in original post

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.