You can insert these micropatterns in the code of a Program, a Screen, a Server, or a Macro.
*!ADF "date1 date2"
*!ADn "xy date1 date2"
Where:Format values | Generated formats |
---|---|
I | Year, month day (YYMMDD) |
D | Day, month, year (DDMMYY) or Month, day, year (MMDDYY) according to the format type selected in the Generated date format of the Library Definition |
E | Day/month/year (DD/MM/YY) or Month/day/year (MM/DD/YY) according to the format type selected in the Generated date format of the Library Definition These dates have an extended format. |
S | Century, year, month, day (CCYYMMDD) |
G | Century year-month-day (CCYY-MM-DD) |
C | Day, month, century, year (DDMMCCYY) or Month, day, century year (MMDDCCYY) according to the format type selected in the Generated date format of the Library Definition |
M | Day/month/century year (DD/MM/CCYY) or Month/day/century year (MM/DD/CCYY) according to the format type selected in the Generated date format of the Library Definition |
You can invert a date or add slashes to it.
Micropattern identifier | Micropattern function and operands |
---|---|
ADI | Inverts the first two and the last two characters
of a six-character date. For example, YYMMDD becomes DDMMYY and
conversely. Enter:
where date1 and date2 are
both six-character date Data Elements. date2 is optional.
If it is not indicated, date1 gets the inverted date. |
ADS | Inverts a date with the century. CCYYMMDD becomes DDMMCCYY,
and conversely. Enter:
where date1 and date2 are
both eight-character date Data Elements. date2 is
optional. If it is not indicated, date1 gets the
inverted date. |
ADE | Adds slashes to a six-character date. For example, YYMMDD becomes YY/MM/DD. Enter:
where date1 is
a six-character date Data Element and date2 is an
eight-character date Data Element. |
ADM | Adds slashes to a date that includes the century.
For example CCYYMMDD becomes CCYY/MM/DD. Enter:
where date1 is
an eight-character date Data Element and date2 is
a 10-character date Data Element. |
Micropattern identifier | Micropattern function and operands |
---|---|
DAD | Computes the number of days between two dates. Enter:
where:x the format of date1 (optional). If you do not specify it, it will be extracted from the repository if the Data Element has a date format. y is the format of date2 (optional). If you do not specify it, it will be extracted from the repository if the Data Element has a date format. The comparison result is put in NUM-DAYS field, which is automatically declared in the WORKING-STORAGE SECTION. |
DAO | Adds days to a date or subtracts days from a
date. Enter:
where:x the format of date1 (optional). If you do not specify it, it will be extracted from the repository if the Data Element has a date format. s is the sign(+ for an addition or - for a subtraction). number the number to be added to or subtracted from the date It can be an integer or a work area. ffnn-date1 is the input date field. |
Micropattern identifier | Micropattern function and operands |
---|---|
TIM | Displays the time as HHMMSS from
the EIBTIME field for CICS, and the TIME field
for the other platforms. Enter:
where date1 is
an optional Data Element with a six-character date format. |
TIF | Transforms the time format from HHMMSS into HH:MM:SS. Enter:
where date1 is
a Data Element with a six-character date format. It represents the
input date field. date2 is an optional Data Element
with an eight-character date format. It represents the field that
receives the result of the time transformation. |