GENDATE
GENDATE is a test date generator for the specified field. It is a working example of using Data Solutions to fill a new field with generated serial test dates. This exit generates both valid and invalid dates. It creates 31 days for all Gregorian months and 366 days for all Julian years. The below table describes the parameters for the GENDATE exit.
GENDATE Parameters - General
Position | Value Description |
|---|---|
1 | G or J: Gregorian or Julian dates. Must be uppercase. |
2 | A through I Series identifier. Must be uppercase. Using GA through GI allows up to 9 separate Gregorian dates and JA through JI allows up to 9 separate Julian dates. To use the same series ID on multiple fields, the parameters must be identical with the same field data type and length. If you use the same series ID for more than 1 field, each field receives a unique date. For example: Using the same series ID for two different fields results in: FIELD 1: DATE 1 Use unique series IDs and the same initial date to generate the same date in multiple fields. |
The remaining parameter values depend on the value specified in position 1.
GENDATE Parameters - Gregorian
Position | Value Description |
|---|---|
3-10 | Initial date in the form CCYYMMDD (non-complement). |
11-21 | Output date format (optional). See following example and Output Date Format Guidelines. |
GENDATE Parameters - Julian
Position | Value Description |
|---|---|
3-9 | Initial date in the form CCYYDDD (non-complement). |
10-18 | Output date format (optional). See following example and Output Date Format Guidelines. |
Output Date Format Guidelines
Use the following guidelines for specifying your output date format. Code only the parts of the date that you want. The requested output date is right-justified with leading zeros for non-character dates. This field is optional and of variable length.
blank | Blank means use the default format. CCYYMMDD is the Gregorian default. CCYYDDD is the Julian default. |
The following codes are valid non-blank entries (must be uppercase):
9C | 9’S Complement date. If coded, this must be the first entry. When coded, dates are decremented and will be progressively older. When not coded, dates are incremented and will progressively newer. |
CC | Century. For example: 19 or 20. |
18 | Century minus 18. For example: 0=18, 1=19. |
19 | Century minus 19. For example: 0=19, 1=20. |
YY | Year. |
MM | Month. |
MMM | Three-character month abbreviation (character fields only). |
DD | Gregorian day. |
DDD | Julian day. |
blank | Insert an embedded blank. For example: MM DD YY |
/ | Insert a slash. For example: MM/DD/YY |
- | Insert a hyphen. For example: MM-DD-YY |
The output date is formatted according to the field length and data type, as follows:
- Binary (COMP) fields are 2, 4, or 8 bytes. Binary fields are signed positive.
- Character fields are 2-11 bytes depending on the specified format. Generated dates are unsigned.
- Numeric (EXTERNAL,DISPLAY) fields are 2 - 18 digits. Generated dates have embedded trailing positive signs.
- Packed (COMP-3) fields are 2 - 18 digits (2 - 10 bytes). Generated dates have a positive sign.