"Kalpana Shridhar" <so***********@ compuware.com> writes:
I am on a project where I am converting COBOL to C++ on the mainframe.
I am new to COBOL and have a lot of questions - any websites or any
suggestions from experienced people will be really appreciated.
My main issue is with the CALL routine - I have to call a external function
which I believe is Assembly. Right now the call is made using 4 structures
in COBOL.
To convert to C++ - what should I be concerned about, should I pass 4
structures as input - what should I look for during data conversion.
Any input with the conversion would be very very helpful.
This is slightly off-topic in clc++, since the C++ standard doesn't
define any COBOL compatbility features - you might have more luck in a
COBOL group. This will always be platform-specific, anyway, so maybe a
group dedicated to the particular mainframe (you didn't say which).
Whatever, the trick will be ensuring memory-layout compatability
between the COBOL structures and the corresponding C structures. I say
C structures because you can't add much C++ stuff to a struct before
you lose any control of the memory layout. I did some stuff along
these lines a few years ago, and the COBOL compiler's reference manual
was very informative about memory layout of the various data types. I
would also suggest examining the raw data from the COBOL structures
(e.g. in a debugger or by writing to a binary file) to double-check
that you understand the layout. Then again, if you have the assembly
sources, you could use them to find out where everything goes. You
might need some C-compiler specific stuff to control structure
padding/packing.
--
Raoul Gough
"Let there be one measure for wine throughout our kingdom, and one
measure for ale, and one measure for corn" - Magna Carta