JAMS User Guide
Contents Index JAMS Home Support

JAMS User Guide


Previous Contents Index


Chapter 10
Entering Generic Date Specifications

This chapter explains generic, English language based date specifications.

10.1 Date Specifications

There are many places in the JAMS system where you need to specify a date. Sometimes an exact date specification is adequate, but usually not. Most of the time, you want to specify a generic date.

In cases where a generic date is desirable, JAMS accepts an English language based date specification. JAMS capability for understanding date specifications is quite extensive.

There are three key times when JAMS will accept a generic date specification, in a scheduled date, as default parameter values and as Setup parameter values.

10.1.1 Scheduled Date

When you specify the scheduled date for a Job or Setup, you use generic date specifications.

10.1.2 Default Parameter Values

When you define a parameter for a Job, if the parameter's data type is DATE, you can specify a default value for the parameter using generic date specifications.

When a user selects the Job, they are presented with a screen based form used to obtain the values for the Jobs parameters. Parameters with a data type of DATE are presented as a standard MM/DD/YY date field but JAMS uses the generic date specification to determine what the default date should be.

10.1.3 Setup Parameter Values

When you define a Setup, you are prompted for the values for the Job's parameters. If the Job has any parameters which have a data type of DATE, the parameter form will have a sixty character text field for the date parameter, rather than the standard MM/DD/YY type of field. You can then enter a generic date specification.

This is extremely important for Setups which are automatically submitted. When JAMS automatically submits Jobs, prompting for the value of parameters is not possible. The generic date specification is evaluated to obtain the value for the parameter.

10.2 Simple Specifications

Simple date specifications specify a date relative to the current date. The format for a simple date specification is:

[+/- number-of-days]

10.2.1 Description of components

day-of-week

The day-of-week can be the full name of a weekday or the first three characters of a weekday name.

When you specify a day of the week, such as MONDAY, JAMS interprets this as "Monday of this week". In this context, a week begins on Monday and ends on Sunday.

The days of the week can be preceeded by a modifier such as LAST, THIS or NEXT. The THIS modifier has no effect and is supported for readability.

When you use a modifier, such as LAST, JAMS interprets this to mean "weekday of last week". Thus, the text "LAST THURSDAY" will return the same date no matter what day of the week it is interpreted.

WORKDAYS

This specifies the first workday which is on or after the current date. Workdays are defined in the JAMS configuration and in Date Definitions.

WEEKDAYS

This specifies the first weekday which is on or after the current date.

TODAY

Specifies the current date.

TOMORROW

Specifies the current date plus one day.

YESTERDAY

Specifies the current date minus one day.

DAILY

This is synonymous with TODAY and is provided for readability. Specifies the current date.

+/- number-of-days

A simple date specification can optionally have a positive or negative integer appended to it which adds or subtracts the indicated number of days.

10.2.2 Valid Simple Date Specifications

Some examples of valid, simple date specifications are:

10.3 Complex Specifications

Complex date specifications are used to specify a date relative to an arbitrary period of time. By period of time, we mean something like a month, or fiscal period.

A complex date specification may be thought of as two components, the day specification and the period specification. For example, in the text "1st WORKDAY of NEXT MONTH", the day specification is "1st WORKDAY" and the period specification is "NEXT MONTH".

The general format of a Complex Date specification is as follows:

[day-of-period OF] period [+/- number-of-days]

The syntax for the day-of-period specification can take one of two forms. Both forms are equivalent, the choice of which form to use is left to the user. The two forms of the day-of-period specification are:

or

If you do not specify the day of period, the default is the current day.

The syntax for the period specification is:

While this syntax specification seems ominous, it is actually a representation of how people commonly specify dates.

10.3.1 User Defined Periods

If you specify a period by using user defined Date Types, you may have to specify both the Specific and generic Date Types. For example, if you have defined the Date Type FISCAL with Specific Date Types of PERIOD_01 through PERIOD_12, you can specify the second period as:

"FISCAL PERIOD_02" or "PERIOD_02".

If you defined two Date Types which both use the Specific Type of PERIOD_02, then you must specify "FISCAL PERIOD_02".

10.3.2 Weeks

When used in the context of a period, a week is defined as starting on the first day of the period and continuing for seven days.

10.3.3 Valid Complex Date Specifications

The following examples of valid complex date specifications are based on the current date being March 1st, 1991.
Specification Date
FIRST MONDAY OF NEXT MONTH 01-APR-1991
2ND MONDAY OF THIS MONTH 12-MAR-1991
FIRST MONDAY OF LAST MARCH 05-MAR-1990
6TH WEEKDAY OF NEXT MONTH 08-APR-1991
6TH WEEKDAY OF MONTH 08-MAR-1991


Previous Next Contents Index
JAMS Copyright © 2000, MVP Systems, Inc. All rights reserved.