NonStop Server for Java (NSJ) Tools Reference Pages (NSJ 2.0+)
dependent_info[] = { new Dependent_info_class(),
new Dependent_info_class(),
new Dependent_info_class() };
class Dependent_info_class {
protected String name;
protected String age;
}
If a DDL field is defined as occurs depending on, ddl2java generates an
array whose size is the maximum number of occurrances for the field. For example, for
a field defined as:
02 num-of-deps binary 16.
02 dependent-info occurs 0 to 5 times depending on num-of-deps.
03 name pic x(20).
03 age pic 99.
ddl2java generates these instance variables, using the value of num_of_deps
when converting the members of dependent_info:
string num_of_deps;
Dependent_info_class
dependent_info[] = { new Dependent_info_class(),
new Dependent_info_class(),
new Dependent_info_class(),
new Dependent_info_class(),
new Dependent_info_class()};
class Dependent_info_class {
protected String name;
protected String age;
}
Unions/Redefinitions
If a DDL field is part of a union/redefinition, ddl2java generates an instance
variable for each field and a discriminator instance variable. For example, for the
following data description:
def a.
02 b pic 9(4).
02 c pic 9(6).
02 d pic x(6) redefines c.
end
ddl2java generates:
private String b;