Package com.softwaremining.util
Class CBLUtil
java.lang.Object
com.softwaremining.util.CBLUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic final Stringcapitalize(String name) static StringcharValue(int ord) Translation of COBOL INTRINSIC FUNCTION ORD.static final intdateOfInteger(long days) Replacement for function 'date-of-integer' converts a date in the Gregorian calendar from integer date form to standard date form (YYYYMMDD).static StringdateOfIntegerAsStr(long days) static final intdayOfInteger(long days) SAS 10.03.2009 Replacement for function 'day-of-integer' in MicroFocusstatic final Stringto do ..static final Stringto do ..static final intintegerOfDate(long date) Replacement for function 'integer-of-date' in MicroFocus The INTEGER-OF-DATE function converts a date in the Gregorian calendar from standard date form (YYYYMMDD) to integer date form.static final intintegerOfDate(String date) Replacement for function 'integer-of-date' in MicroFocus The INTEGER-OF-DATE function converts a date in the Gregorian calendar from standard date form (YYYYMMDD) to integer date form.static final intintegerOfDay(long date) SAS 11.03.2009static final longintegerPart(double value) translation of IBM Function IntegerPart ABCDstatic final longintegerPart(long value) translation of IBM Function IntegerPart ABCDstatic final booleancheck the content of field is a numberstatic final booleancheck the content of field is a numberstatic final booleanisAlphaNumeric(ISMObject field) static final booleanisEbcidicNumber(ISMObject field) check the content of field is a numberstatic final booleancheck whether field is in rangestatic final booleancheck whether field is in range from FROM to TOstatic final booleanstatic final booleancheck whether field is in range from FROM to TOstatic final booleanisLowercase(ISMObject field) check whether string is in lower casestatic final booleanisLowercase(String str) static final booleanisNumber(double field) check the content of field is a numberstatic final booleancheck the content of a record is a numberstatic final booleancheck the content of field is a numberstatic final booleancheck the content of field is a numberstatic final booleanisUppercase(ISMObject field) check whether string is in upper casestatic final booleanisUppercase(String str) static final StringnationalOf(String value) to do ..static intTranslation of COBOL INTRINSIC FUNCTION ORD.static final Stringstatic final StringreplaceUnderlines(String src) Used internally by SoftwareMining Framework replace '_' with '-'static final StringtrimToSize(String toTrim, char filler, int length, boolean left)
-
Constructor Details
-
CBLUtil
public CBLUtil()
-
-
Method Details
-
isEbcidicNumber
check the content of field is a number- Parameters:
field-- Returns:
- - true if number
-
isNumber
public static final boolean isNumber(double field) check the content of field is a number- Parameters:
field-- Returns:
- - true if number
-
isNumber
check the content of field is a number- Parameters:
field-- Returns:
- - true if number
-
isNumber
check the content of a record is a number- Parameters:
wrapper- : the record (CBLBean)- Returns:
- - true if number
-
isNumber
check the content of field is a number- Parameters:
field-- Returns:
- - true if number
-
isAlpha
check the content of field is a number- Parameters:
field-- Returns:
- - true if number
-
isAlpha
check the content of field is a number- Parameters:
field-- Returns:
- - true if number
-
isAlphaNumeric
-
dateOfInteger
public static final int dateOfInteger(long days) Replacement for function 'date-of-integer' converts a date in the Gregorian calendar from integer date form to standard date form (YYYYMMDD).- Parameters:
days- - positive integer that represents a number of days succeeding December 31, 1600, in the Gregorian calendar. The valid range is 1 to 3,067,671, which corresponds to dates ranging from January 1, 1601 thru December 31, 9999.- Returns:
- - an integer of the form YYYYMMDD where YYYY represents a year in the Gregorian calendar; MM represents the month of that year; and DD represents the day of that month.
-
dateOfIntegerAsStr
-
integerOfDay
public static final int integerOfDay(long date) SAS 11.03.2009- Returns:
- returns number of days since December 31, 1600 for the date DATE.
-
dayOfInteger
public static final int dayOfInteger(long days) SAS 10.03.2009 Replacement for function 'day-of-integer' in MicroFocus -
integerOfDate
public static final int integerOfDate(long date) Replacement for function 'integer-of-date' in MicroFocus The INTEGER-OF-DATE function converts a date in the Gregorian calendar from standard date form (YYYYMMDD) to integer date form.- Parameters:
date- - Must be an integer of the form YYYYMMDD, whose value is retrieveed from the calculation (YYYY * 10,000) + (MM * 100) + DD, where: YYYY represents the year in the Gregorian calendar. It must be an integer greater than 1600, but not greater than 9999. MM represents a month and must be a positive integer less than 13. DD represents a day and must be a positive integer less than 32, provided that it is valid for the specified month and year combination.date-- Returns:
- - The returned value is an integer that is the number of days that the date represented by argument-1 succeeds December 31, 1600 in the Gregorian calendar.
-
integerOfDate
Replacement for function 'integer-of-date' in MicroFocus The INTEGER-OF-DATE function converts a date in the Gregorian calendar from standard date form (YYYYMMDD) to integer date form.- Parameters:
date- - Must be an integer of the form YYYYMMDD, whose value is retrieveed from the calculation (YYYY * 10,000) + (MM * 100) + DD, where: YYYY represents the year in the Gregorian calendar. It must be an integer greater than 1600, but not greater than 9999. MM represents a month and must be a positive integer less than 13. DD represents a day and must be a positive integer less than 32, provided that it is valid for the specified month and year combination.- Returns:
- - The returned value is an integer that is the number of days that the date represented by argument-1 succeeds December 31, 1600 in the Gregorian calendar.
-
replaceUnderlines
Used internally by SoftwareMining Framework replace '_' with '-' -
pad
-
trimToSize
-
capitalize
- Parameters:
name-- Returns:
-
integerPart
public static final long integerPart(double value) translation of IBM Function IntegerPart ABCD- Parameters:
field-- Returns:
- - true if number
-
integerPart
public static final long integerPart(long value) translation of IBM Function IntegerPart ABCD- Parameters:
field-- Returns:
- - true if number
-
isInRange
check whether field is in range- Parameters:
field-range-- Returns:
- - true if range contains field's value as a string
-
isInRange
-
isInRange
check whether field is in range from FROM to TO- Parameters:
field-from-to-- Returns:
- - true if field's value is lexicographically between FROM and TO
-
isInRange
check whether field is in range from FROM to TO- Parameters:
field-from-to-- Returns:
- - true if field's value is lexicographically between FROM and TO
-
isUppercase
check whether string is in upper case- Parameters:
field-- Returns:
- - true if range contains field's value as a string
-
isUppercase
-
isLowercase
check whether string is in lower case- Parameters:
field-- Returns:
- - true if range contains field's value as a string
-
isLowercase
-
nationalOf
to do ..
Translation of NATIONAL-OF Function- Parameters:
value-- Returns:
-
displayOf
to do ..
Translation of DISPLAY-OF Function- Parameters:
value-- Returns:
-
displayOf
to do ..
Translation of DISPLAY-OF Function- Parameters:
value-- Returns:
-
ord
Translation of COBOL INTRINSIC FUNCTION ORD.- Parameters:
inputStr-- Returns:
-
charValue
Translation of COBOL INTRINSIC FUNCTION ORD.- Parameters:
inputStr-- Returns:
-