Highlighted
Absent Member.
Absent Member.
264 views

[archive] CVM Java - Passing Linkage

[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?
0 Likes
2 Replies
Highlighted
Absent Member.
Absent Member.

RE: [archive] CVM Java - Passing Linkage

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
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] CVM Java - Passing Linkage

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?
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.