Skip to main content

Pass a String Array from Java to COBOL

  • August 16, 2011
  • 1 reply
  • 0 views

Kim Hoskin
Forum|alt.badge.img+2

[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: community.microfocus.com/.../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

1 reply

Gael Wilson
Forum|alt.badge.img
  • Rocketeer
  • August 16, 2011

[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: community.microfocus.com/.../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
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.