z/OS DFSORT Application Programming Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Past date as character string

z/OS DFSORT Application Programming Guide
SC23-6878-00

DATE1-d, &DATE1-d, DATE1(c)-d, &DATE1(c)-d, DATE2-m, &DATE2-m, DATE2(c)-m, &DATE2(c)-m, DATE3-d, &DATE3-d, DATE3(c)-d or &DATE3(c)-d can be used to generate a character string for a past date relative to the current date of the run. d is days in the past and m is months in the past. d and m can be 0 to 9999.

Table 1 shows the form of the character string constant generated for each past date operand along with an example of the actual character string generated when the date of the run is June 21, 2005. yyyy represents the year, mm represents the month (01-12), dd represents the day (01-31), ddd represents the day of the year (001-366), and c can be any character except a blank.

Table 1. Character Strings for Past Dates
Character Strings for Past DatesFormat of Operand
Format of Constant Example of Operand Example of Constant
DATE1-d C'yyyymmdd' DATE1-1 C'20050620'
DATE1(c)-d C'yyyycmmcdd' DATE1(-)-60 C'2005-04-22'
DATE2-m C'yyyymm' DATE2-6 C'200412'
DATE2(c)-m C'yyyycmm' DATE2(/)-1 C'2005/05'
DATE3-d C'yyyyddd' DATE3-300 C'2004238'
DATE3(c)-d C'yyyycddd' DATE3(.)-21 C'2005.151'
Note: You can precede each of the operands in the table with an & with identical results.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014