|
FORMATTIME |
|
|
This command is used to transform the absolute date and/or time into any of a variety of formats, as described in the list of options.
Options ABSTIME(data-area) specifies the data value for the time, in packed decimal, since 00:00 hours on 1 January 1900 (in milliseconds rounded to the nearest hundredth of a second) that is to be converted to an alternative format. 01 DATA-AREA PIC S9(15) COMP-3. DATEFORM(data-area) specifies the format of the installation-defined date. CICS returns YYMMDD, DDMMYY, or MMDDYY (six characters) according to the DATFORM system initialization parameter. DATESEP(data-value) specifies the character to be inserted as the separator between the year and the month, and between the day and the month; or between the year and the day if form YYDDD is specified. DAYCOUNT(data-area) returns the number of days since 1 January 1900 (day 1), as a fullword binary number. This is useful if you need to compare the current date with a previous date that has, for example, been stored in a data set. DAYOFMONTH(data-area) returns the number of the day in the month as a fullword binary number. DAYOFWEEK(data-area) returns the relative day number of the week as a fullword binary number: Sunday=0, Saturday=6. This number can be converted to a textual form of day in any language. DDMMYY(data-area) specifies the 8-character user field where CICS is to return the date, in day/month/year format (for exmple, 21/10/95). A separator is present if requested by the DATESEP option. DDMMYYYY(data-area) specifies the 10-character user field where CICS is to return the date, in day/month/year format (for example 17/06/1995). A separator is present if requested by the DATESEP option. FULLDATE(data-area) specifies the 10-character user field where CICS is to return the date, in the format specified in the DATFORM system initialization parameter, with the year expanded to 4 digits. You should normally use this option only when a date is needed for output purposes. A separator is present if requested by the DATESEP option. MMDDYY(data-area) specifies the 8-character user field in which CICS is to return the date, in month/day/year format (for example, 10/21/95). MMDDYYYY(data-area) specifies the 10-character user field where CICS is to return the date, in month/day/year format (for example 11/21/1995). A separator is present if requested by the DATESEP option. MONTHOFYEAR(data-area) "data-area" is set to the relative month number of the year as a fullword binary number (January=1, December=12). You can convert this number, in your application program, to the name of the month in any language. TIME(data-area) "data-area" is set as an 8-character field to the current 24-hour clock time in the form hh:mm:ss, where the separator is specified by the TIMESEP option. TIMESEP(data-value) specifies the character to be used as the separator in the returned time. If you omit this option, no separator is assumed and six bytes are returned in an 8-character field. If you omit the "data-value", a colon (:) is used as a separator. YEAR(data-area) specifies the full 4-figure number of the year as a fullword binary number (for example, 1995, 2001) YYDDD(data-area) specifies the 6-character user field where CICS is to return the date, in year/day format (for exmple, 95/301). A separator is present if requested by the DATESEP option. YYDDMM(data-area) specifies the 8-character user field where CICS is to return the date, in year/day/month format (for example, 95/30/10). A separator is present if requested by the DATESEP option. YYMMDD(data-area) specifies the 8-character user field where CICS is to return the date, in year/month/day format (for example, 95/10/21). A separator is present if requested by the DATESEP option. YYYYDDD(data-area) specifies the 8-character user field where CICS is to return the date, in year/day format (for example 1995/200). A separator is present if requested by the DATESEP option. YYYYDDMM(data-area) specifies the 10-character user field where CICS is to return the date, in year/day/month format (for example 1995/21/06). A separator is present if requested by the DATESEP option. YYMMDD(data-area) specifies the 10-character user field where CICS is to return the date, in year/month/day format (for example 1995/06/21). A separator is present if requested by the DATESEP option. |