AskPlus Release Information
AskPlus
Version 8.4.0 - Beta Version Released August 25th, 2016
- Enhancements:
- Updated Special Operators:
- !isdate(parm[, "format"])
- Now returns True/False (K1) if parm is a valid date. (Previously the actual date was returned when true.)
- The format is now optional. If not specified a CYMD format is assumed.
- The original version is still available with the name !isdateorig
- !isnum(parm)
- Now returns True/False (K1) if parm is numeric. (Previously the return value was the actual number, or 0.)
- Any numeric parm returns True
- An ASCII value that contains only digits and optional sign and decimal point returns True.
- (At least one digit is required.)
- The original version is still available with the name !isnumorig
- !getstr(str, "off, len") - See !mid (below)
- Len is no longer required, default is the rest of the str (starting at off).
- Offset can be passed as a numeric value (since len is no longer required).
- !datext
- New formats for displaying dates
Date formats may be used directly with dates that are stored in CYMD format. Use the !DATEINT and !DATEXT operators with dates stored in other formats. When using date formats, the characters d (day), m (month) and y (year) have a special meaning according to the table shown below. All other characters are treated as insertion characters - see examples. WHen DDD, DDDD, MMM or MMMM appear in all caps, the corresponding name will also be all upper case. Any other combination with display the day/month name using initial caps. (Case has no meaning for d, dd, m, mm, yy and yyyy.)
} Examples: Value Format Result 20160704 "mm/dd/yyyy" 07/04/2016 20160704 "ddd mmmm dd, yyyy" Mon July 4, 2016 20160704 "d-MMM" 4-JUL 20160704 "DDDD MMMM D, YY" MONDAY JULY 4, 16 20160704 "d-m-yy" 4-7-16- New Special Operators:
- !isint(parm)
- Similar to !isnum returns True/False (K1) if parm is integer.
- If parm is type E or R - return False
- If parm is any other numeric type - return True
- An ASCII value that contains only digits and an optional sign returns True.
- (At least one digit is required.)
- !mid(str, "off[,len]") - return a substring
- Return the middle part of str for the specified off and len. (off is 1 based.)
- If the len is not specified, the remainder of str is returned (starting at off.)
- Functionally equivalent to !getsr().
- !left(str, len) - return a first len characters of a string
- Return the left part of str for the specified len (off = 1).
- !right(str, len) - return the last len characters of a string.
- Return the right part of str for the specified len.
- Trailing blanks are counted. Use !right(!rtrim(str), len) to eliminate trailing blanks.
- !trim(str) - return a trimmed string
- Trim leading & trailing blanks (and control characters < BLANK) from str.
- !ltrim(str) - return a trimmed string
- Trim all leading (left) blanks (and control characters < BLANK) from str.
- !rtrim(str) - return a trimmed string
- Trim all trailing (right) blanks (and control characters < BLANK) from str.
- !upper(str) - return an upshifted string
- Upshift all characters in str.
- Functionally equivalent to !shift(str, "U")
- !lower(str) - return an downshifted string
- Downshift all characters in str.
- Functionally equivalent to !shift(str, "D")
- !initcap(str) - return an string using InitCap logic
- Upshift the first character after each non letter in str (Downshift all of the other characters.)
- Similar to !shift(str, "I"), except shift only upshifts after a BLANK, whereas initcap upshifts after every non alpha character.
Format Chars | Meaning | Output Length' | |||
d, dd | Day of month | One or two digits. (dd is always two). | |||
ddd, dddd | Day name | Three chars (ddd) or full name (dddd). | |||
m, mm | Month number | One or two digits. (dd is always two). | |||
mmm, mmmm | Month name | Three chars (mmm) or full name (mmmm). | |||
yy, yyyy | Tear. | Two digits (yy) or four (yyyy). | |||
initcap("PATRICK O'BRIEN") = "Patrick O'Brien" | shift("PATRICK O'BRIEN", "I") = "Patrick O'brien"
|
purgechar(NAME, """'") will purge all double and single quotes in NAME.
|
replacechar(NAME, """'") will replace all double quotes in NAME with a single quote.
* New !DatExt Formats for Dates: * Support a new !DatExt format to print formatted dates like Excel {{{ |
datext(intdate, "Ddd Mmmm d, yyyy") = "Wed August 3, 2016" | datext(intdate, "DDD MMM dd, yy") = "WED AUG 03, 16"
}}} * d & dd: day (in month) in digits, dd will display leading 0 when day <= 9 * ddd & dddd: day name, ddd first 3 letters, dddd full name * m & mm: month in digits, mm will display leading 0 when month <= 9 * mmm & mmmm: month name, mmm first 3 letters, mmmm full name * If DDD, DDDD, MMM, MMMM is all upper, then name will also be all upper case * yy & yyyy: year in digits, yy is two digit year, yyyy is 4 digit year * New Format (Edit Mask) for Dates: * The new !DatExt format described above can be used directly as a print format for dates (CYMD date format is assumed.) {{{ D1, LOAN-FILE.DUE-DATE, "Ddd Mmmm d, yyyy", tab1 }}}
* Rename !isnum() and !isdate() to !isnumorig() and !isdateorig() * Create new versions of !isnum() and !isdate() * Both !isnum() and !isdate() now return K1 ($FALSE or $TRUE) * !isnum() uses !match internally. * Fix !Even() on Itanium. * Had to change a declaration from long to int32 (apparently long on Itanium is not int32) * Fix !cymd_diff_mnths when one of the dates is EOM?? AskPlus 8.3.3Released to patch a critical bug dealing with database updates potentially causing data loss in older releases. It is highly recommended to upgrade to AskPlus e.8.3.3 as soon as possible on any HPUX systems that run older versions and where UPDATES are run on eloquence data. Along with the patches, several performance improvements where included when dealing with date comparisons. |
---|