|
|
|||
|
Academic Programs |
LegacyJ FAQ |
||
|
Calls between COBOL and Java Question: "We would like more information about implementing CALLS between the PERCobol compiled programs and our own hand crafted Java. The issue concerns how we should code the inclusion of a packed decimal number in a parameter string. Our Cobol programs send parameters in a single block - this is constructed and de-constructed into individual fields within each program. These fields have datatypes of their own right such as string, zoned and packed". Passing numerics between COBOL and Java with PERCobol:
Here is some information on how VS Cobol II (AIX/ASCII) stores numbers:
Additional TipsAn easy method for passing data back and
forth from Java to COBOL is by using the GET-PROPERTY, SET-PROPERTY
feature:
Then use:
or
For arrays in the LINKAGE SECTION, as long as the USING item is a 01/77 group item, it'll be fine for calling. The getElements will work when calling from COBOL to Java. To have Java call COBOL with it, it'll have to fill a byte[] with the data image (there's no extra magic for dealing with Integer arrays, for instance). |
|
||
Home
About Us
Privacy
Legal
© Copyright LegacyJ Corp. 1998, 2008
All Rights Reserved.
All trademarks are the properties of their respective owners or licensers.