Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Primitve type

Status
Not open for further replies.

upoirier

Programmer
Mar 6, 2003
5
CL
Hi:

I'm needing to convert a Cobol type, that I received from other application by mqseries, to Java type. My servlet is taken "29{" from message queue for a number "290". I assume that other application is sending a pic s9(3) or pic s9(3) comp, becuse this applcation is written in Cobol.

Thanks in advance,

Ulises Poirier.

 
I'm not sure what "pic s9(3) or pic s9(3)" are, but if you want to interface two languages (and data types) I would suggest doing it via some intermediate structure such as CORBA.
 
If you know what the data is underneath the applications, I suggest you read it in as binary (or hex) and convert it yourself to the data type you want.

Bob Rashkin
rrashkin@csc.com
 
The easiest way to do it is probably (if possible on your Cobol system) to let the Cobol program do a conversion to all Strings of a fixed size and on your java system convert from Strings to the types you want. [This is an (easy) example of what sedj proposed].
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top