D
dmckeon
I am in the process of converting a COBOL system to Java using web
services, but I am realy new to Java. We currently use COBOL copybooks
that contain record layouts so we don't need to redefine database
fields and things like that. I'm not seeing anything similar in Java.
In C++, we used structures, but they don't seem to exist in Java. I
attempted to set up a class for the record layout that simply contained
methods to set field values and get field values. I figured I could
use the class to populate the fields, return the class to the calling
method, and use the "get" functions to retrieve the data. However,
when I attempt to use the methods within the class, they are not
available to me. I assume they are protected somehow, which is
probably a good thing.
My question is, does anyone have any ideas of how I can accomplish what
I am trying to do? I considered returning a delimited string of all of
the fields, but if we later add fields to the layout, we would have to
change EVERY program that tokenized the delimited string. Clearly not
a good thing.
Any ideas would be very much appreciated.
Thanks,
Dan
services, but I am realy new to Java. We currently use COBOL copybooks
that contain record layouts so we don't need to redefine database
fields and things like that. I'm not seeing anything similar in Java.
In C++, we used structures, but they don't seem to exist in Java. I
attempted to set up a class for the record layout that simply contained
methods to set field values and get field values. I figured I could
use the class to populate the fields, return the class to the calling
method, and use the "get" functions to retrieve the data. However,
when I attempt to use the methods within the class, they are not
available to me. I assume they are protected somehow, which is
probably a good thing.
My question is, does anyone have any ideas of how I can accomplish what
I am trying to do? I considered returning a delimited string of all of
the fields, but if we later add fields to the layout, we would have to
change EVERY program that tokenized the delimited string. Clearly not
a good thing.
Any ideas would be very much appreciated.
Thanks,
Dan