currentFormattedGregorianDate

The system variable VGVar.currentFormattedGregorianDate contains the current system date in long Gregorian format. The value is automatically updated each time system variable is referenced by your program.

The format is in this Java™ runtime property:
  vgj.datemask.gregorian.long.NLS
NLS
The NLS (national language support) code specified in the Java runtime property vgj.nls.code. The code is one of those listed for the targetNLS build descriptor option. Uppercase English (code ENP) is not supported.

For additional details on vgj.nls.code, see Java runtime properties (details).

The format specified in vgj.datemask.gregorian.long.NLS includes dd (for numeric day), MM (for numeric month), and yyyy (for numeric year), with characters other than d, M, y, or digits used as separators. You can specify the format in the dateMask build descriptor option, and the default format is specific to the locale.

You can use VGVar.currentFormattedGregorianDate as the source in an assignment or move statement or as the argument in a return or exit statement.

Make sure that this Gregorian long date format is the same as the date format specified for the SQL database manager. Matching the two formats enables VGVar.currentFormattedGregorianDate to produce dates in the format expected by the database manager.

The characteristics of VGVar.currentFormattedGregorianDate are as follows:
Primitive type
CHAR
Data length
10
Value saved across segments
No

Example

  myDate = VGVar.currentFormattedGregorianDate;
Feedback
(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.