Package com.softwaremining.util
Class CBLUtil
java.lang.Object
com.softwaremining.util.CBLUtil
- 
Constructor SummaryConstructors
- 
Method SummaryModifier 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- 
CBLUtilpublic CBLUtil()
 
- 
- 
Method Details- 
isEbcidicNumbercheck the content of field is a number- Parameters:
- field-
- Returns:
- - true if number
 
- 
isNumberpublic static final boolean isNumber(double field) check the content of field is a number- Parameters:
- field-
- Returns:
- - true if number
 
- 
isNumbercheck the content of field is a number- Parameters:
- field-
- Returns:
- - true if number
 
- 
isNumbercheck the content of a record is a number- Parameters:
- wrapper- : the record (CBLBean)
- Returns:
- - true if number
 
- 
isNumbercheck the content of field is a number- Parameters:
- field-
- Returns:
- - true if number
 
- 
isAlphacheck the content of field is a number- Parameters:
- field-
- Returns:
- - true if number
 
- 
isAlphacheck the content of field is a number- Parameters:
- field-
- Returns:
- - true if number
 
- 
isAlphaNumeric
- 
dateOfIntegerpublic 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
- 
integerOfDaypublic static final int integerOfDay(long date) SAS 11.03.2009- Returns:
- returns number of days since December 31, 1600 for the date DATE.
 
- 
dayOfIntegerpublic static final int dayOfInteger(long days) SAS 10.03.2009 Replacement for function 'day-of-integer' in MicroFocus
- 
integerOfDatepublic 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.
 
- 
integerOfDateReplacement 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.
 
- 
replaceUnderlinesUsed internally by SoftwareMining Framework replace '_' with '-'
- 
pad
- 
trimToSize
- 
capitalize- Parameters:
- name-
- Returns:
 
- 
integerPartpublic static final long integerPart(double value) translation of IBM Function IntegerPart ABCD- Parameters:
- field-
- Returns:
- - true if number
 
- 
integerPartpublic static final long integerPart(long value) translation of IBM Function IntegerPart ABCD- Parameters:
- field-
- Returns:
- - true if number
 
- 
isInRangecheck whether field is in range- Parameters:
- field-
- range-
- Returns:
- - true if range contains field's value as a string
 
- 
isInRange
- 
isInRangecheck 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
 
- 
isInRangecheck 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
 
- 
isUppercasecheck whether string is in upper case- Parameters:
- field-
- Returns:
- - true if range contains field's value as a string
 
- 
isUppercase
- 
isLowercasecheck whether string is in lower case- Parameters:
- field-
- Returns:
- - true if range contains field's value as a string
 
- 
isLowercase
- 
nationalOfto do ..
 Translation of NATIONAL-OF Function- Parameters:
- value-
- Returns:
 
- 
displayOfto do ..
 Translation of DISPLAY-OF Function- Parameters:
- value-
- Returns:
 
- 
displayOfto do ..
 Translation of DISPLAY-OF Function- Parameters:
- value-
- Returns:
 
- 
ordTranslation of COBOL INTRINSIC FUNCTION ORD.- Parameters:
- inputStr-
- Returns:
 
- 
charValueTranslation of COBOL INTRINSIC FUNCTION ORD.- Parameters:
- inputStr-
- Returns:
 
 
-