Creating your own date pattern exits
File-AID/Data Solutions uses date pattern exits to define and process the various date formats. The exit converts your date to one of two standard formats (Gregorian or Julian) and then converts the date back to its original format.
Supplied Date Pattern Exits
Since Data Solutions is distributed with more than 50 date exits, it handles the vast majority of the date formats you encounter in your data. The following table describes the characteristics of the sample formatted date pattern exits supplied with File-AID/Data Solutions.
Supplied Date Pattern Exits
Load Module Name | Date Pattern | Data Type(s) | Description | Example |
---|---|---|---|---|
MONTH-DAY-YEAR | ||||
UDAA0100 | MMDDYY | B,C,N,P | 6 DIGIT Gregorian | 090197 |
UDAA0102 | MMDDCCYY | B,C,N,P | 8 DIGIT Gregorian | 09011997 |
UDAA0101 | MM*DD*YY | C,N | 8 CHAR. Gregorian | 09/01/97 |
UDAA0103 | MM*DD*CCYY | C,N | 10 CHAR. Gregorian | 09/01/1997 |
UDAA0112 | MMMDDYY | C | 7 CHAR. Gregorian | SEP0197 |
UDAA0113 | MMM*DD*YY | C | 9 CHAR. Gregorian | SEP/01/97 |
UDAA0114 | MMMDDCCYY | C | 9 CHAR. Gregorian | SEP011997 |
UDAA0115 | MMM*DD*CCYY | C | 11 CHAR. Gregorian | SEP/01/1997 |
UDAA0130 | MDY | C | 3 CHAR. Gregorian | 090197 Pseudo packed. |
UDAA0132 | MMDDCCYYJJJ | B,C,N,P | 11 DIGIT Gregorian/Julian | 09011997244 |
UDAA0141 | MMDDYYJJJ | B,C,N,P | 9 DIGIT Gregorian/Julian | 090197244 |
UDAA0137 | MMYY | B,C,N,P | 4 DIGIT Gregorian | 0997 No day of month. |
UDAA0140 | MMCCYY | B,C,N,P | 6 DIGIT Gregorian | 091997 No day of month. |
YEAR-MONTH-DAY | ||||
UDAA0104 | YYMMDD | B,C,N,P | 6 DIGIT Gregorian | 970901 |
UDAA0106 | CCYYMMDD | B,C,N,P | 8 DIGIT Gregorian | 19970901 |
UDAA0105 | YY*MM*DD | C,N | 8 CHAR. Gregorian | 97/09/01 |
UDAA0107 | CCYY*MM*DD | C,N | 10 CHAR. Gregorian | 1997/09/01 |
UDAA0138 | DB2-TIMESTAMP | C,N | 26 CHAR. Gregorian | 1997-09-01- 23.59.59.999999 |
UDAA0116 | YYMMMDD | C,N | 7 CHAR. Gregorian | 97SEP01 |
UDAA0117 | YY*MMM*DD | C,N | 9 CHAR. Gregorian | 97/SEP/01 |
UDAA0118 | CCYYMMMDD | C,N | 9 CHAR. Gregorian | 1997SEP01 |
UDAA0119 | CCYY*MMM*DD | C,N | 11 CHAR. Gregorian | 1997/SEP/01 |
UDAA0124 | YYMMDD-9COMP | B,C,N,P | 6 DIGIT Gregorian | 029098 (970901) 9’s complement |
UDAA0125 | CCYYMMDD-9COMP | B,C,N,P | 8 DIG. Gregorian | 80029098 (19970901) 9’s complement |
UDAA0127 | CYYMMDD-18 | B,C,N,P | 7 DIGIT Gregorian | 0970901 (18970901) Digit 1: 0=18yy, 1=19yy, ETC. |
UDAA0128 | CYYMMDD | B,C,N,P | 7 DIGIT Gregorian | 0970901 (19970901) Digit 1: 0=19yy, 1=20yy, ETC. |
UDAA0136 | CYYMMDD-9COMP | B,C,N,P | 7 DIGIT Gregorian | 9029098 (19970901) Digit 1: 9=19yy, 8=20yy, ETC. |
UDAA0133 | CCYYMMDDJJJ | B,C,N,P | 11 DIGIT Gregorian/Julian | 19970901244 |
UDAA0134 | CCYYJJJMMDD | B,C,N,P | 11 DIGIT Gregorian/Julian | 19972440901 |
UDAA0135 | CFODATE | P | 5+3 DIGIT Gregorian Two separate packed fields. | 02373001 (19970901) MMMMMDDD (00001001 = 1/1/1800) |
UDAA0209 | YMD | C,M | 3 Byte unsigned packed, Gregorian | 970901 |
UDAA0210 | CYMD | C,M | 4 Byte unsigned packed, Gregorian | 19970901 |
UDAA0211 | YMD-9COMP | C,M | 3 Byte, unsigned packed, 9s compliment, Gregorian | 020998 |
UDAA0212 | CYMD-9COMP | C,M | 4 Byte, unsigned packed, 9s compliment, Gregorian | 80020998 |
YEAR-MONTH | ||||
UDAA0126 | CCYYMM | B,C,N,P | 6 DIGIT Gregorian | 199709 No day of month. |
UDAA0139 | YYMM | B,C,N,P | 4 DIGIT Gregorian | 9709 No day of month. |
YEAR | ||||
UDAA0129 | CCYY | B,C,N,P | 4 DIGIT Gregorian | 1997 Just year. |
UDAA0131 | YY | B,C,N,P | 2 DIGIT Gregorian | 97 Just year. |
DAY-MONTH-YEAR | ||||
UDAA0108 | DDMMYY | B,C,N,P | 6 DIGIT Gregorian | 010997 |
UDAA0110 | DDMMCCYY | B,C,N,P | 8 DIGIT Gregorian | 01091997 |
UDAA0109 | DD*MM*YY | C,N | 8 CHAR. Gregorian | 01/09/97 |
UDAA0111 | DD*MM*CCYY | C,N | 10 CHAR. Gregorian | 01/09/1997 |
UDAA0120 | DDMMMYY | C,N | 7 CHAR. Gregorian | 01SEP97 |
UDAA0121 | DD*MMM*YY | C,N | 9 CHAR. Gregorian | 01/SEP/97 |
UDAA0122 | DDMMMCCYY | C,N | 9 CHAR. Gregorian | 01SEP1997 |
UDAA0123 | DD*MMM*CCYY | C,N | 11 CHAR. Gregorian | 01/SEP/1997 |
JULIAN DATES | ||||
UDAA0200 | YYDDD | B,C,N,P | 5 DIGIT Julian | 97244 |
UDAA0208 | YYDDDHHMM | B,C,N,P | 9 DIGIT Julian With time. | 972442359 |
UDAA0201 | CCYYDDD | B,C,N,P | 7 DIGIT Julian | 1997244 |
UDAA0202 | 00YYDDD | B,C,N,P | 7 DIGIT Julian | 0097244 (1997244) Digits 1-2: 00=19yy, 01=20yy, etc. |
UDAA0203 | YYDDD-9COMP | B,C,N,P | 5 DIGIT Julian | 02755 (97244) 9’s complement |
UDAA0204 | CCYYDDD-9COMP | B,C,N,P | 7 DIGIT Julian | 8002755 (1997244) 9’s complement |
UDAA0205 | 00YYDDD-9COMP | B,C,N,P | 7 DIGIT Julian | 9902755 (1997244) 9’s complement and 99=19yy, etc. 98=18YY = |
UDAA0206 | CYYDDD | B,C,N,P | 6 DIGIT Julian | 097244 (1897244) Digit 1: 0=18yy, 1=19yy, etc. |
UDAA0207 | CYY-DDD | P | 3+3 DIGIT Julian Two separate packed fields. | 197244 (1997244) Digit 1: 0=18yy, 1=19yy, etc. |
Miscellaneous | ||||
UDAA0213 | YYQ-QUARTAL | B,C,N,P | 3 DIGIT Gregorian | 973 |
UDAA0214 | CCYYMMDD-MORIZ | B,C,N,P | 8 DIGIT Gregorian | 10029099 |
UDAA0215 | CCYYMMDD-HYPER | B,C,N,P | 8 DIGIT Gregorian | 19970133 |
Customizing Date Pattern Exits
If you want to add your own date pattern exits for processing by Data Solutions, you need to do the following:
- Use one of the File-AID/Data Solutions-provided COBOL date exits, AGERnnnn-named members in the sample library (hlq.SXVJSAMP), as a model. Look for an exit that is similar to your date pattern. Save it under a new date exit name, use AGER0700 – AGER0999 if the exit is non-LE enabled or AGER1000 – AGER9999 if the exit is LE enabled. Make any modifications or adjustments required for your date pattern. Use UDAEXITL to compile and link your new date pattern exit.
Identify your environment library names (See Step 12. Specify external files in BMC Installer Mainframe Products SMP/E Installation).
- Update DATELIST in SXVJSAMP to add your new date pattern exit.
- Use sample JCL UDADLIST in the sample library (hlq.SXVJSAMP) to assemble and link to LOAD module DATELIST in your Configuration LOAD library (hlq.CXVJLOAD).
Each entry in the Date Pattern Exit Table consists of the following six fields:
Data type
Specify B (Binary), C (Character), G (Graphic, Double Byte Character Set), N (Numeric), P (Packed), V (Variable length Character), or W (Variable length Graphic, Variable length Double Byte Character Set). The data type is determined by the record layout specified for the Formatted aging criteria. It has a length of one byte. If your exit handles more than one data type, add a date entry for each data type to the Date Pattern Exit Table (DATELIST).
Date pattern name
Specify a unique name alphanumeric 1 to 15 characters. The date pattern name is the name that you specify on the Formatted Aging Criteria screen or select from the Available Date Patterns screen.
Date length
Specify the number of bytes (not digits) that Data Solutions will pass to and return from the date pattern exit. For example, packed 7 digits is 4 bytes.
Load module name
Specify the load module name of your new exit (AGER0700 – AGER0999 if the exit is non-LE enabled or AGER1000 – AGER9999 if the exit is LE enabled). It must begin with “AGER” and end with a four-digit number from 0700 to 9999. Numbers from 0000 to 0699 are reserved for date pattern exits.
Description
Specify up to 30 characters describing your new date pattern exit. This description is displayed on the Available Date Patterns screen.
Filler
Specify a 3 byte filler.
Hint
A suggestion to avoid assembling and linking DATELIST every time anyone at your site wants to add a new date exit is to add a group of new entries at one time and assign one or more to each programmer. Once the assigned date exit entry (hook) is linked into Data Solutions, each programmer can modify and test their date pattern exits without requiring a systems programmer to modify DATELIST.
To manually compile and link your new COBOL date exit, use the JCL that is appropriate for your COBOL version.
Date Exit Compile/Link JCL
COBOL Version | Use JCL: |
---|---|
LE 370 / COBOL for MVS | UDAEXITL |
Add the appropriate information (in above table) for your COBOL date exit to the Date Pattern Exit Table in Sample PDS member DATELIST. Use UDADLIST to reassemble and link edit the table.
The following figure shows the date pattern exit flow for File-AID/Data Solutions and COBOL.
File-AID/Data Solutions and COBOL Date Pattern Exit Flow
Input and Output Specifications
The input and output options are the same for each Data Solutions function. See Input Specification and Output Specification for a sample and field descriptions for these screens. In addition, the Criteria Menu is displayed within each Data Solutions function. See Criteria Menu for a description of the Criteria Menu.