Package com.softwaremining.vendors.cics
Class CicsDateTimeHelper
java.lang.Object
com.softwaremining.vendors.cics.CicsDateTimeHelper
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
getDateTime
(double millis, String pattern) Reference http://publib.boulder.ibm.com/infocenter/txformp/v6r0m0/index.jsp?topic=/com.ibm.cics.te.doc/erziai0024.htmstatic String
getDateTime
(BigDecimal millis, String format) Reference http://publib.boulder.ibm.com/infocenter/txformp/v6r0m0/index.jsp?topic=/com.ibm.cics.te.doc/erziai0024.htmstatic int
getDayCount
(double millis) static int
getDayOfMonth
(double millis) return the day of Monthstatic int
getDayOfMonth
(BigDecimal millis) return the day of Monthstatic int
getDayOfWeek
(double millis) return the day of weekstatic int
getDayOfWeek
(BigDecimal millis) return the day of weekstatic long
Translation of CICS GET ABSOLUTE TIME From: http://publib.boulder.ibm.com/infocenter/txformp/v6r0m0/index.jsp?topic=/com.ibm.cics.te.doc/erziai0024.htm ASKTIME updates the date (EIBDATE) and CICS time-of-day clock (EIBTIME) fields in the EIB.static int
getMonthOfYear
(double millis) static int
getMonthOfYear
(BigDecimal millis) static String
getTime
(double millis) From CICS Format ...static String
static String
getTime
(BigDecimal millis) From CICS Format ...static String
getTime
(BigDecimal millis, String format) static long
getYear
(double millis) static long
getYear
(BigDecimal millis) static long
analyzes three different date and time stamp formats which are commonly used on the Internet, and converts them to the ABSTIME (absolute date and time) format.
-
Field Details
-
log
-
-
Constructor Details
-
CicsDateTimeHelper
public CicsDateTimeHelper()
-
-
Method Details
-
getMillis
Translation of CICS GET ABSOLUTE TIME From: http://publib.boulder.ibm.com/infocenter/txformp/v6r0m0/index.jsp?topic=/com.ibm.cics.te.doc/erziai0024.htm ASKTIME updates the date (EIBDATE) and CICS time-of-day clock (EIBTIME) fields in the EIB. These two fields initially contain the date and time of when the task started. Refer to Appendix A, EXEC interface block (EIB) fields for details of the EIB.- Parameters:
eibaid
-- Returns:
-
getDateTime
Reference http://publib.boulder.ibm.com/infocenter/txformp/v6r0m0/index.jsp?topic=/com.ibm.cics.te.doc/erziai0024.htm- Parameters:
millis
- - as returned by getAbsoluteTimeformat
- - one of "YYYYMMDD" , DDMMYY, DDMMYYYY, MMDDYY, MMDDYYYY , YYDDD, YYDDMM, YYMMDD, YYYYDDMM, YYYYMMDD YYYYDDD - Specifies an eight-character field that is to receive the date in YYYYDDD format; for example, 1996/200.separator
- - typically "-" or "/" A separator is present if requested by the DATESEP option. If no separator is requested, the returned value is left-justified in the 8-character user field. You should normally use this option only when a date is needed for output purposes. Where a date is needed for analysis, you should request the date in explicit form, for example, using the MMDDYY option.millis
- : since 00:00 on 1 January 1900 (in milliseconds rounded to the nearest hundredth of a second).- Returns:
- formatted date
-
getDateTime
Reference http://publib.boulder.ibm.com/infocenter/txformp/v6r0m0/index.jsp?topic=/com.ibm.cics.te.doc/erziai0024.htm- Parameters:
millis
- - as returned by getAbsoluteTimepattern
- - one of "YYYYMMDD" , DDMMYY, DDMMYYYY, MMDDYY, MMDDYYYY , YYDDD, YYDDMM, YYMMDD, YYYYDDMM, YYYYMMDD YYYYDDD - Specifies an eight-character field that is to receive the date in YYYYDDD format; for example, 1996/200.separator
- - typically "-" or "/" A separator is present if requested by the DATESEP option. If no separator is requested, the returned value is left-justified in the 8-character user field. You should normally use this option only when a date is needed for output purposes. Where a date is needed for analysis, you should request the date in explicit form, for example, using the MMDDYY option.millis
- : since 00:00 on 1 January 1900 (in milliseconds rounded to the nearest hundredth of a second).- Returns:
- formatted date
-
getTime
From CICS Format ... TIME Returns an an eight-character String representing 24-hour clock time in the form hh:mm:ss, where the separator (shown here as :) is determined by the TIMESEP option. Documentation http://publib.boulder.ibm.com/infocenter/txformp/v6r0m0/index.jsp?topic=/com.ibm.cics.te.doc/erziai0024.htm- Parameters:
millis
- - as returned by getAbsoluteTimeseparator
- - typically "-" or "/" A separator is present if requested by the DATESEP option. If no separator is requested, the returned value is left-justified in the 8-character user field. You should normally use this option only when a date is needed for output purposes. Where a date is needed for analysis, you should request the date in explicit form, for example, using the MMDDYY option.- Returns:
- formatted time in HH:mm:ss format
-
getTime
-
getTime
-
getTime
From CICS Format ... TIME Returns an an eight-character String representing 24-hour clock time in the form hh:mm:ss, where the separator (shown here as :) is determined by the TIMESEP option. Documentation http://publib.boulder.ibm.com/infocenter/txformp/v6r0m0/index.jsp?topic=/com.ibm.cics.te.doc/erziai0024.htm- Parameters:
millis
- - as returned by getAbsoluteTimeseparator
- - typically "-" or "/" A separator is present if requested by the DATESEP option. If no separator is requested, the returned value is left-justified in the 8-character user field. You should normally use this option only when a date is needed for output purposes. Where a date is needed for analysis, you should request the date in explicit form, for example, using the MMDDYY option.- Returns:
- formatted time in HH:mm:ss format
-
getYear
public static long getYear(double millis) - Parameters:
millis
-- Returns:
- : a 32-bit binary field that is to receive the full four-digit number of the year; for example, 1990
-
getYear
- Parameters:
millis
-- Returns:
- : a 32-bit binary field that is to receive the full four-digit number of the year; for example, 1990
-
getMonthOfYear
public static int getMonthOfYear(double millis) - Parameters:
millis
-- Returns:
- : a 32-bit binary field that is to receive the relative month number of the year: January=1, December=12.
-
getMonthOfYear
- Parameters:
millis
-- Returns:
- : a 32-bit binary field that is to receive the relative month number of the year: January=1, December=12.
-
getDayOfWeek
public static int getDayOfWeek(double millis) return the day of week- Parameters:
millis
-- Returns:
- : Sunday:0, Monday:1 ...
-
getDayOfWeek
return the day of week- Parameters:
millis
-- Returns:
- : Sunday:0, Monday:1 ...
-
getDayOfMonth
public static int getDayOfMonth(double millis) return the day of Month- Parameters:
millis
-
-
getDayOfMonth
return the day of Month- Parameters:
millis
-
-
getDayCount
public static int getDayCount(double millis) - Parameters:
millis
-- Returns:
- : a 32-bit binary field that is to receive the number of days since 1 January 1900 (day 0). This option is useful if you need to compare the current date with a previous date that has, for example, been stored in a file
-
parse
analyzes three different date and time stamp formats which are commonly used on the Internet, and converts them to the ABSTIME (absolute date and time) format. ABSTIME format gives the time, in packed decimal, since 00:00 on 1 January 1900 (in milliseconds rounded to the nearest hundredth of a second). The FORMATTIME command can be used to change this into other formats. The architected date and time stamp string formats recognized by the CONVERTTIME command are:- RFC 1123 format The preferred standard format for date and time stamps for the HTTP protocol, as specified in RFC 1123. An example of a date and time stamp in this format is "Tue, 01 Apr 2003 10:01:02 GMT".
- RFC 850 format An older date and time stamp format for the Internet. An example of a date and time stamp in this format is "Tuesday, 01-Apr-03 10:01:02 GMT". Important: Because the year has only two digits in this format, CICS uses the assumption that the years are in the range 1970 to 2069. In the example above, CICS would assume that the date of the document was 1 April 2003. Given the date and time stamp "Thursday, 13-Feb-98 15:30:00 GMT", CICS would assume that the date of the document was 13 February 1998. Be aware of this when coding your application, if you think that you could receive date and time stamps in this format.
- ASCtime format A date and time stamp format output from the C ASCtime function. An example of a date and time stamp in this format is "Tue Apr 1 10:01:02 2003".
- Returns:
-