Default formats in COBOL

System variables in strLib contain default values for COBOL generation.
The following variables contain default COBOL generation values:
strLib.defaultDateFormat
The default date format from the user-definable NLS module in the runtime system.
strLib.defaultTimeFormat
"HH:mm:ss"
strLib.defaultTimestampFormat
"yyyy-MM-dd HH:mm:ss.SSSSSS"
strLib.defaultMoneyFormat
None set.
strLib.defaultNumericFormat
None set.

If the equivalent build descriptor option for a variable is set, EGL uses that value instead of the default value shown. For example, if the defaultDateFormat build descriptor option is set, EGL uses that value for strLib.defaultDateFormat.

EGL uses these build descriptor values for main programs only. Called programs do not check for these EGL build descriptor overrides and rely on the main program to set up any necessary overrides. When the calling program is not generated for COBOL from an EGL source (for example, an EGL Java™ generated program), the calling program might wrongly determine that the called program used the build descriptor to set the value of the corresponding variable. To avoid this problem, the calling program can explicitly set the system variable to the required value, as in the following example:
StrLib.defaultDateFormat = "yyyy/MM/dd";

Feedback