System date-related information transfer
System information contained in the specified conceptual data items DATE, DATE YYYYMMDD, DAY, DAY YYYYDDD, DAY-OF-WEEK, or TIME, can be transferred into the data item referenced by identifier-2. The transfer must follow the rules for the MOVE statement without the CORRESPONDING phrase.
For more information, see MOVE statement.
- identifier-2
- The receiving area. Can be:
- An alphanumeric group item
- A national group item
- An elementary data item of one of the following categories:
- alphanumeric
- alphanumeric-edited
- numeric-edited (with usage DISPLAY or NATIONAL)
- national
- national-edited
- numeric
- internal floating-point
- external floating-point (with usage DISPLAY or NATIONAL)
A national group item is processed as an elementary data item of category national.
Format 2 accesses the current date in two formats: the day of the week or the time of day as carried by the system (which can be useful in identifying when a particular run of an object program was executed). You can also use format 2 to supply the date in headings and footings.
The current date and time can also be accessed with the intrinsic function CURRENT-DATE, which also supports four-digit year values and provides additional information (see CURRENT-DATE).