Skip to main content

[archive] CVM Java - Passing Linkage

  • April 17, 2008
  • 3 replies
  • 0 views

[Migrated content. Thread originally posted on 16 April 2008]

Is it possible to pass packets by the 01 level only?

For example my Linkage Section
Linkage Section.
01 TCM-Person-Packet.
02 PER-ID USAGE IS SIGNED-INT.
02 PER-Name pic X(30).

And the Procedure-Division will only have
Procedure Division using
tcm-person-packet.

In my Java code I've tried passing a single string that contains both variables with the "linkage_signature" set to "X34" without much success.
With how the CVM class is written is this possible?

3 replies

[Migrated content. Thread originally posted on 16 April 2008]

Is it possible to pass packets by the 01 level only?

For example my Linkage Section
Linkage Section.
01 TCM-Person-Packet.
02 PER-ID USAGE IS SIGNED-INT.
02 PER-Name pic X(30).

And the Procedure-Division will only have
Procedure Division using
tcm-person-packet.

In my Java code I've tried passing a single string that contains both variables with the "linkage_signature" set to "X34" without much success.
With how the CVM class is written is this possible?
I think we'll need some more specifics. When Java calls COBOL you specify a linkage signature line like this:
callOpts.setOption("linkage_signature", "X2X1X73X050X329");

If your 01 data item is described properly then X2 could be two 05 level items. I would think that you would need to be very careful in Java so that the sending fills both items or else you may not receive what you think you are sending.

By using a linkage_signature and executing the runtime with a trace file you can see what Java is sending to COBOL

[Migrated content. Thread originally posted on 16 April 2008]

Is it possible to pass packets by the 01 level only?

For example my Linkage Section
Linkage Section.
01 TCM-Person-Packet.
02 PER-ID USAGE IS SIGNED-INT.
02 PER-Name pic X(30).

And the Procedure-Division will only have
Procedure Division using
tcm-person-packet.

In my Java code I've tried passing a single string that contains both variables with the "linkage_signature" set to "X34" without much success.
With how the CVM class is written is this possible?
Is there any limit to the size of the packet that gets passed from Java to Cobol?
We call cobol programs with very large packets. For example the linkage_signature of one of our calls is X290867. The CVM is making the call just fine, however, I'm not seeing the modified packet when the call returns to the Java program.

When I shrink the packet size to X34 it seems to be working. My guess is there might be a limit in wrun32.dll but I hope I'm just missing something.

Any thoughts?

[Migrated content. Thread originally posted on 16 April 2008]

Is it possible to pass packets by the 01 level only?

For example my Linkage Section
Linkage Section.
01 TCM-Person-Packet.
02 PER-ID USAGE IS SIGNED-INT.
02 PER-Name pic X(30).

And the Procedure-Division will only have
Procedure Division using
tcm-person-packet.

In my Java code I've tried passing a single string that contains both variables with the "linkage_signature" set to "X34" without much success.
With how the CVM class is written is this possible?
Is there any limit to the size of the packet that gets passed from Java to Cobol?
We call cobol programs with very large packets. For example the linkage_signature of one of our calls is X290867. The CVM is making the call just fine, however, I'm not seeing the modified packet when the call returns to the Java program.

When I shrink the packet size to X34 it seems to be working. My guess is there might be a limit in wrun32.dll but I hope I'm just missing something.

Any thoughts?