Cobol and Java communication

From: Da LoU (louloux3_at_lefumoir.com)
Date: 03/05/04


Date: 5 Mar 2004 09:47:15 -0800

Hi,

I'm using Linux, Server Express 2.2 and sun j2se 1.4.1

I'd like to make these two processes communicate :
process A is a java application
process B is a cobol application

I start A using cobjrun.
Then A starts 2 threads. I'll call them A1 and A2.
A2 calls B and waits for B to finish executing.

A1 is still running.

I want to communicate data betweed A1 and B while B is running

What's the best way to do it ?

To illustrate my problem, below is the output of A1, A2 and B. Today
the communication is not working. I want to communicate the content of
the variable a. For A1 and A2, a is a global variable.
I call B (cobol) from A2 passing a to B by reference.
B and A1 run in parallel.

My problem is that a is not updated in A1 as B increments its value.
I have to wait for B to finish its execcution before a is updated in
A1.

A1: a=1
A1: a=1
A2: a= 1
A1: a=1
B: a=+0000000001
B: a=+0000000001
B: a=+0000000002
B: a=+0000000003
A1: a=1
B: a=+0000000004
A1: a=1
B: a=+0000000005
B: a=+0000000006
A1: a=1
B: a=+0000000007
A1: a=1
B: a=+0000000008
A1: a=1
B: a=+0000000009
B: a=+0000000010
A1: a=1
B: a=+0000000011
A2: a= 12
A1: a=12
A1: a=12



Relevant Pages

  • Re: Convert Cobol to language w/o goto (was: How many lines of Cobol running worldwide???)
    ... I know MicroFocus lets you "communicate" via Java Beans back to COBOL ...
    (comp.lang.cobol)
  • Re: Folder watching an AIX network share...
    ... that you implement on the .Net side and that you call on the AIX side. ... > I have been asked to interface with an AIX system running a COBOL ... > a drive to communicate between the two systems. ...
    (microsoft.public.dotnet.languages.vb)
  • Folder watching an AIX network share...
    ... I have been asked to interface with an AIX system running a COBOL ... a drive to communicate between the two systems. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Trying to use STRING
    ... When CoBOL was first developed, a field was a field was a field. ... But now there is a need to communicate with a streaming output and ... the old way of doing this a bit won't suffice. ...
    (comp.lang.cobol)
  • Re: MAINFRAME SHOP STANDARDS
    ... was the Operating System "file system". ... "stored" in COBOL "files" could EASILY be accessed by any and all other ... do you want him to go into a long dissertation to justify ... "Nothing else is ever going to communicate with this system, ...
    (comp.lang.cobol)