Skip to main content

[Migrated content. Thread originally posted on 17 June 2011]

Hi,

I've successfully called Java from Cobol in a OO Cobol batch program, via direct java object instanciations and methods calls.

I'm trying to use the same code (Java object using) in CICS mode. Using Cobol objects works well.

I've not tried to use Java calls yet, but before to proceed to server confguration changes (PATH, JAVA_HOME, etc), I would like to know if this can work.

Have you any idea about this question of direct calling of Java in OO CObol in CICS mode?

Regards,

[Migrated content. Thread originally posted on 17 June 2011]

Hi,

I've successfully called Java from Cobol in a OO Cobol batch program, via direct java object instanciations and methods calls.

I'm trying to use the same code (Java object using) in CICS mode. Using Cobol objects works well.

I've not tried to use Java calls yet, but before to proceed to server confguration changes (PATH, JAVA_HOME, etc), I would like to know if this can work.

Have you any idea about this question of direct calling of Java in OO CObol in CICS mode?

Regards,
When you say "CICS mode" are you referring to running CICS COBOL programs under Enterprise Server?
If this is true then the answer is "no" you cannot call Java objects directly from COBOL using the Java OO methods.

You can however accomplish this in a different manner.

You can start a separate process in the COBOL program under ES and start up a multithreaded COBOL .EXE that does the calls to Java and communicates parameters through calls to CBL_ALLOC_SHMEM, CBL_PUT_SHMEM_PTR and CBL_GET_SHMEM_PTR (see Net Express docs)

You can start the run-unit using CBL_EXEC_RUN_UNIT (see Net Express docs.