SETDAY
Change System/Task Date
This directive assigns a specific date to the DAY system variable for this task. It has no impact on the system date maintained by the operating system.
Syntax
Section titled “Syntax”SETDAY string-valuestring-value- is a valid date normally in the format MM/DD/YY.
Remarks
Section titled “Remarks”Starting with release level 8.2, the string-value can have any character as the date delimiter.
Starting with release level 8.1B2, string-value is fully tested for validity. In prior release levels, date checking is limited and it is possible, under some conditions, to set the DAY system variable for this task to an improper date.
In some environments, the format for string-value and the DAY system variable can be configured using supplied utilities. For more information, please refer to the chapter on System Files in the Thoroughbred Basic Customization and Tuning Guide.
When a task is STARTed, the DAY system variable for this task is assigned the system date. This directive is used to set a value for DAY that is independent of the system value. This task-specific value is not automatically updated by the system.
Examples
Section titled “Examples”SETDAY "04/26/85"assigns the DAY system variable for this task the value representing April 26, 1985.
SETDAY D$If D$=“04/26/85”, then the DAY system variable for this task represents APRIL 26, 1985.
SETDAY NTD (CDN + 15, "MM/DD/YY")sets this task’s DAY system variable to today’s date plus 15 days; this can be useful in projecting what Accounts Payable checks must be cut over the next 15 days.
SETDAY "11-01-86"assigns the string “11-01-86” to the system variable DAY.
See also
Section titled “See also”SETTIME directive
DAY and TIM system variables
From the Thoroughbred Basic Language Reference, Volume III: R–Z, version 8.9.1. Open this page in the PDF