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


Future 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 future date relative to the current date of the run. d is days in the future and m is months in the future. d and m can be 0 to 9999.

Table 1 shows the form of the character string constant generated for each future 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 Future Dates
Character Strings for Future DatesFormat of Operand
Format of Constant Example of Operand Example of Constant
DATE1+d C'yyyymmdd' DATE1+11 C'20050702'
DATE1(c)+d C'yyyycmmcdd' DATE1(/)+90 C'2005/09/19'
DATE2+m C'yyyymm' DATE2+2 C'200508'
DATE2(c)+m C'yyyycmm' DATE2(.)+25 C'2007.07'
DATE3+d C'yyyyddd' DATE3+200 C'2006007'
DATE3(c)+d C'yyyycddd' DATE3(-)+1 C'2005-171'
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