When you generate Java™ code,
the genProperties build descriptor option
specifies where to generate Java runtime
properties (if any) and, in some cases, whether to generate a linkage
properties file. This build descriptor option is meaningful only when
you are generating a Java program
(which can use either kind of output) or
a Java wrapper (which can use
only the linkage properties file). The effect of this build descriptor
option depends on the value of the j2ee, genProject,
and genDirectory build descriptor options.
When you generate with the
genProperties build
descriptor option set to either PROGRAM or GLOBAL, then the values
of certain other build descriptor options are stored as Java runtime properties in one of several possible
locations, as in these situations:
- If you have set the j2ee build descriptor
option to NO, then EGL generation creates a properties file, and the Java runtime properties are stored
in that file. The "Values" section below describes how the value of
the genProperties build descriptor option
affects this properties file.
- If you have set the j2ee build descriptor
option to YES and you have set the genProject build
descriptor option to the location of a J2EE project, EGL generation
adds the Java runtime properties
to the J2EE deployment descriptor in that project.
- If you have set the j2ee build descriptor
option to YES, but you have set the genDirectory build
descriptor option instead of the genProject build
descriptor option, EGL generation creates a J2EE environment file
in the folder specified by genDirectory,
and the Java runtime properties
are stored in that file.
Note: If you choose to generate to a directory
in this manner, the Java runtime
properties in the J2EE environment file will not be automatically
updated the next time you generate. The J2EE environment file contains
the XML code that would have been added to the J2EE deployment descriptor
if you had chosen to generate to a J2EE project. When you import your
code into a J2EE project, you must manually copy the XML code from
the J2EE environment file and paste it into the J2EE deployment descriptor.
The J2EE environment file is named pgmAlias-env.txt,
where pgmAlias is the name of the program
or other logic part.
- If you are generating a VGWebTransaction, the properties are stored
in the rununit.properties file or the pgmAlias.properties file,
depending on the value of the genProperties build
descriptor option.
- If you have set the j2ee build descriptor
option to YES and you have set the genProject build
descriptor option to the location of a non-J2EE project, then EGL
creates a J2EE environment file in the same way as if you had set
the genDirectory build descriptor option.
See the note in the previous list item for information about the J2EE
environment file.
An EGL generation appends new or changed properties to the end
of the output file. If a property is set more than once, only the
last setting has an effect at run time.
Values
- NO (the default value)
- EGL does not generate runtime or linkage properties.
- PROGRAM
- The effects of this setting are as follows:
- If you are generating a program or other logic part to run outside
of J2EE, or if you are generating a VGWebTransaction program, EGL
generates a properties file that is specific to the program or other
logic part being generated. The name of that file is:
pgmAlias.properties
where pgmAlias is the name of
the program or other logic part at runtime. This properties file is
generated to the same place as the rest of the generated output, as
specified by genProject or genDirectory.
The properties file is updated when you generate different output
later.
- If you are generating a program or other logic part to run within
J2EE, EGL adds the Java runtime
properties to the J2EE deployment descriptor or environment file,
as explained earlier in this topic.
- GLOBAL
- The effects of this setting are as follows:
- If you are generating a program or other logic part to run outside
of J2EE, or if you are generating a VGWebTransaction program, EGL
generates a properties file that is used throughout the run unit,
but is not named for the initial program in the run unit. The name
of that properties file is rununit.properties.
This properties file is generated to the same place as the rest of
the generated output, as specified by genProject or genDirectory.
The properties file is updated when you generate different output
later.
This option is especially useful when the first program of
a run unit does not access a file or database but calls programs or
other logic parts in the same run unit that do.
When generating
the caller, you can generate a properties file named for the program,
and the content might include no database-related properties. When
you generate the called program, you can generate rununit.properties,
and the content would be available for both programs.
- If you are generating a program or other logic part to run within
J2EE, EGL adds the Java runtime
properties to the J2EE deployment descriptor or environment file,
as explained earlier in this topic.
Whether you specify PROGRAM or GLOBAL, if you are
generating a Java wrapper
or calling program, EGL may generate a linkage properties file.
For details on the situation in which this file is generated, see
the topic "Linkage properties file."
For further details on Java runtime
properties, see the topics "Overview of Java runtime
properties" and "Linkage properties file."