Previous Topic: SORT Control StatementNext Topic: TIME Control Statement


DATE Control Statement

The DATE control statement is optional and is used to specify a single date or a range of dates to be selected. The format for the DATE control statement is:

1    6
DATE=yyyy/ddd[-yyyy/ddd]

Control Statement Definition

DATE

Is the control statement identifier and must start in position 1.

'yyyy/ddd'

A single date or range of dates to be selected. Use a dash (-) to indicate a range of dates. The date format must be consistent with the pattern optionally specified by the DATEFMT parameter on the EXEC statement, or in Julian date format (yyyy/ddd). In addition, dates that contain commas, blanks, or hyphens must be specified within delimiters to allow the program to correctly interpret the syntax of the statement; otherwise, a U0006 or S0C4 abend may occur. For example, DATE='MMMDD YYYY'-'MMMDD YYYY' must be delimited because the dates contain blanks.