AskPlus Release Information

From Vital Soft Wiki
Revision as of 00:41, 13 December 2018 by >Johno (AskPlus)
Jump to: navigation, search

AskPlus

Installing AskPlus

Installing AskPlus E.8.5.4:

There are currently no Beta Versions of AskPlus.

AskPlus E.8.4.8

Enhancements:

  • Improve error messages in certain special operators (!cvt, !mid, !left, !right, !uniqueid).
  • Change export ASKERR=n to specify the max number of displayed errors. (Max number is still 50.)
  • Warning message when a register (variable) is used in an expression without first being created in a NEWREG statement.
This warning will also be displayed in Visimage3 (requires version 3.3.1)

Fixes:

  • Re-write OUTER join logic to fix several bugs.
  • Fix a bug with the !sum operator. An invalid total was calculated in rare circumstances.
  • Fix a bug when an implicit conversion error occurred while evaluating a link.

AskPlus E.8.4.7

Fixes:

  • Fix a bug with SUBSET/SUBSEL and UNDO commands on Itanium systems.
  • Fix a bug when parsing formatted dates with two digit months and two digit days.

AskPlus E.8.4.6

Enhancements:

SUBSEL/SUBSET Command
  • Based on the query3k SUBSET command.
  • SUBSEL/SUBSET is a shortcut command to refine the current selection.
  • May be abbreviated SUB.
  • Performs an implicit FIND with INSEL=* and creates a new OUTSEL with the same set list as the previous FIND or SUBSEL.
  • Supports all FIND statements, except PRIMARY, INSEL and OUTSEL which are automatically set.
  • Use UNDO to step back to the previous selection.

Example:

FIND PRIMARY=MEMBER-FILE;OUTSEL=(@)
(LOAN-FILE.BALANCE > 100000)
Current OUTPUT select file is ./ASK97701
using serial read
entries read 396 591
entries qualified 107
SUB LOAN-FILE.ACTION <> "O"
Current INPUT select file is ./ASK97701
Current OUTPUT select file is ./ASK97702
using previous select file
entries read 107 107
entries qualified 93
UNDO Command
  • Based on the query3k UNDO command.
  • Switches the current select file back to the results of the previous SUBSEL/SUBSET or FIND command.

Example:

UNDO
Current select file is ./ASK97701
entries qualified 107

Fixes:

  • Fix a bug with global OUTER keyword when the OUTSEL was an explicit set list, not "@".

AskPlus E.8.4.5

Enhancements:

Outer Join:
  • In version E.8.4.4 (and the E.8.4.3 Beta) the OUTER keyword was introduced to support outer joins in the FIND command. This was a global keyword that effected all sets used in the FIND.
  • In version E.8.4.5 the syntax of the OUTSEL statement was enhanced so that the OUTER join logic could be applied to individual sets (rather than all sets).
  • To specify an outer join in the OUTSEL, prefix the topic name with a plus sign as shown below.

Selection Syntax Using OUTER Keyword:

FIND PRIMARY=MEMBER-FILE;OUTSEL=(@)
OUTER
(LOAN-FILE.BALANCE > 100000 AND LOAN-FILE.REST-FLAG-11 <> 80 AND
 LOAN-FILE.SUFFIX = VEHICLE-INFO.SUFFIX)
Using the above syntax, because the OUTER applies to all secondary sets, all member-file records will be selected, even members that do not have qualifying loans. Of course this problem could be fixed by changing the primary to LOAN-FILE, but it can also be resolved using the following syntax.

Selection Syntax Using OUTSEL OUTER syntax:

FIND PRIMARY=MEMBER-FILE
OUTSEL=(MEMBER-FILE, LOAN-FILE, +VEHICLE-INFO)
(LOAN-FILE.BALANCE > 100000 AND LOAN-FILE.REST-FLAG-11 <> 80 AND
 LOAN-FILE.SUFFIX = VEHICLE-INFO.SUFFIX)
The plus sign that prefixes VEHICLE-INFO in the OUTSEL indicates that the outer logic should only apply to the join with VEHICLE-INFO. Therefore this selection will select members with qualifying loans, and it will select any matching VEHICLE-INFO records, however, no loans will be dropped when no matching VEHICLE-INFO record is found.
  • New Special Operators:
  • !recno(topic_name)
  • Returns the current record number of the specified dataset or file.
  • Spectrum uses the record number as a sub-sequence number in SH-HISTORY and LN-HISTORY.
  • Example, !recno(HISTRY.SH-HISTORY)
  • Works in both find, report and save, but probably only useful in report and save.
  • Specifying !recno(field-name) is syntactically valid and equivalent to specifying the set or filename.
  • !recwidth(topic_name)
  • Returns the record width in bytes of the specified dataset or file.
  • Example, !recno(HISTRY.SH-HISTORY)
  • Works in find, report and save, but probably only useful in report and save.
  • Specifying !recwidth(field-name) is syntactically valid and equivalent to specifying the set or filename.
  • New System Variable:
  • $rowno
  • Returns the row number (starting from 1) of each record being read.
  • The value of $ROWNO is equivalent to creating a numeric variable and adding one for each detail record.
  • Works in find, report and save.

AskPlus E.8.4.4

Enhancements:

Outer Join:
  • The AskPlus selection was modified to support the concept of an OUTER join. When using the selection OUTER keyword, AskPlus will no longer drop any primary set records when no secondary set records are retrieved. (Initially released in E.8.4.3 Beta Version)
Selection Syntax Using Outer:
FIND PRIMARY=LOAN-FILE;OUTSEL=(@)
OUTER
(LOAN-FILE.BALANCE > 0 AND LOAN-FILE.REST-FLAG-11 <> 80 AND
 LOAN-FILE.SUFFIX = VEHICLE-INFO.SUFFIX)
  • In previous versions of AskPlus, only loans with matching VEHICLE-INFO records would be selected
  • Now, when using the OUTER keyword, all open loans with a balance greater than zero will be selected.
  • Vehicle information will be available for loans with a matching suffix, but no loans will be dropped if no vehicle-info record is found.
  • The OUTER keyword is required, and is not the default.
Watch video sample.
Formatting Data:
  • The date formats introduced in version E.8.4.2 are now supported with file output like ASD files:
  • Formats like "mm-dd-yyyy" and "MMM-dd-yyyy" will be applied to file output. See date formatting for more information on these formats.
  • Remove leading blanks from formatted numeric data output to asd files.
  • Numeric formats now support "masking" digits:
  • When printing account numbers or SSNs it is possible to mask certain digits using an edit mask.
  • Use an underscore in the mask to represent the position of a digit and in the final output the underscore will be replaced by an * character.
  • This is supported in regular report output and local file output.
The mask "_____9999" will produce *****1234
New special operator names were added for clarity:
  • Use !len(str) or !strlen(str) to return the length of a string (trailing blanks are ignored.)
  • It is now valid to pass a numeric value to !len (and !strlen). The value will be converted to ASCII and that length will be returned.
  • Use !pos(str1, str2) or !strpos(str1, str2) to return the position of str2 in str1.

Backwards Compatibility:

  • The underscore character now has a special meaning in numeric formats. It is unlikely that this character was used previously in numeric edit masks, however, if it was the new behavior is different. Previously an underscore was treated as an insertion character, starting with E.8.4.4, the underscore (in numeric masks) will be replaced by an * to mask certain digits.

Bug Fixes:

  • Fix a coredump that could occur when an invalid special operator was specified.
  • Fix a coredump with E4 fields being output to a local file with the mask "$,$$$,$$9.99-".
  • Fix a bug when reading HISTRY data change records (a few records were being ignored)

AskPlus E.8.4.2

Backwards Compatibility:

User Exits !isdate and !isnum:
The return values of !isdate and !isnum have been modified and consequently may not be fully backwards compatible with previous versions of AskPlus. See below for more details.
Users should scan production reports to search for any occurrences of these operators prior to installing this version as the default version.
There are two options for jobs (contexts) that use these operators:
  • Rename !isdate(...) to !isdateorig(...) and rename !isnum(...) to !isnumorig(...), or
  • Modify the job (context) to use the new operators which now return True/False instead of the actual date or number.
Contact support if you would like assistance with this update.

Enhancements:

  • Report Output to ASCII file:
By default, Report output to an ASCII file will only fill the last page with blank lines (or a formfeed when CCTL is specified) if the file is created by Visimage, or when a trailer statement (Z1, Z2) is specified. To force the last page to be filled with blank lines in other situations, use the FILLPAGE keyword on the OUT statement.
 REPORT
 OUT=filename, DELETE, FILLPAGE
 ...


  • New System Variables:
  • $DQUOTE - Double Quote
  • This variable returns the value of a double quote which can be used in an expression. For example,
 D1, $DQUOTE splice MEMBER-FILE.NAME splice $DQUOTE, 1 left


  • Updated Special Operators:
  • !getval:typelen(filename.filename, parm])
  • GetVal will strip trailing carriage return (\r) characters from a DOS formatted file (previously only linefeed (\n) chars were stripped.)
  • If no typelen is specified, the default return length is automatically calculated.
  • !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).
  • !datint(date, ["format"])
  • If no format is specified, "CYMD" will be used
  • When converting dates, !datint now supports the formatting characters '-' and '/', if the specified format is one of CYMD, YMD, MDCY, MDY, DMCY and DMY. For example: "3/15/2016" and "9/9/2009" can be converted using the format "MDCY".
  • !datext(int-date, ["format"])
  • Where "int-date" is any date in internal format (usually a call to !datint)
  • If no format is specified, "CYMD" will be used
  • New date formats for displaying and converting dates:
  • 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 will display the day/month name using initial caps. Case has no meaning for d, dd, m, mm, yy and yyyy.)
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. (mm is always two).
mmm, mmmm Month name Three chars (mmm) or full name (mmmm).
yy, yyyy Year Two digits (yy) or four (yyyy).
  • Examples:
Date Value Format Result
20160704 "mm/dd/yyyy" 07/04/2016
20160704 "dd-MMM" 04-JUL
20160704 "d-m-yy" 4-7-16
20160714 "ddd mmmm d, yyyy" Thu July 14, 2016
20160714 "DDDD MMMM DD, YY" THURSDAY JULY 14, 16
  • For CYMD dates, these formats can be used as print formats (Visimage & AskPlus) and with !format()
  • New Special Operators:
  • !uniqueid(number)
  • Returns a unique ID based on the input number, example: !uniqueid(member-file.account)
  • The generated ID is guaranteed to be unique and repeatable
  • The calculation of the unique ID is mathematically reversible, however, no reverse function is provided and the algorithm is not documented
  • This function will be useful if you want to provide a 3rd party a unique identifier for a member without disclosing the member's actual account number
  • !iseven(parm)
  • Similar to !even, except !iseven returns True/False (1/0), not 1 and -1.
  • !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 (see note)
  • 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 the first len characters of a string (see note)
  • Return the left part of str for the specified len (off = 1).
  • !right(str, len) - return the last len characters of a string. (see note)
  • Return the right part of str for the specified len.
  • Trailing blanks are counted. Use !right(!rtrim(str), len) to eliminate trailing blanks.
  • Special note for !mid, !left & !right:
In most cases the first parm will be an ASCII (string) value, however, these operators will accept numeric values. The value will be converted to a character string and then the appropriate chars will be extracted.
  • !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.
       !initcap("PATRICK O'BRIEN") = "Patrick O'Brien"
       !shift("PATRICK O'BRIEN", "I") = "Patrick O'brien"
  • !keepchar(str, chars) - return a string keeping only certain chars
  • Parse str and only keep the characters present in chars (all other characters are purged.)
  • !purgechar(str, chars) - return a string purging certain chars
  • Parse str and purge/drop any characters present in chars (all other characters are kept.)
       !purgechar(NAME, """'")  will purge all double and single quotes in NAME.
  • !replacechar(str, "c1c2") - return a string replacing chars
  • Parse str and replace all occurrences of c1 with c2.
  • Only the first two characters of parm2 are used.
       !replacechar(NAME, """'")  will replace all double quotes in NAME with a single quote.
  • !minval(parm1, parm2) - return the min value using a numeric comparison
  • Return the smaller value (numerically) between parm1 and parm2
  • Any ASCII parms are converted to R4 before the compare is done.
  • !maxval(parm1, parm2) - return the max value using a numeric comparison
  • Return the larger value (numerically) between parm1 and parm2
  • Any ASCII parms are converted to R4 before the compare is done.
  • !minstring(parm1, parm2) - return the min value using a string/ASCII comparison
  • Return the smaller value (using a string comparison) between parm1 and parm2
  • Any numeric parms are converted to ASCII before the compare is done.
  • !maxstring(parm1, parm2) - return the max value using a string/ASCII comparison
  • Return the larger value (using a string comparison) between parm1 and parm2
  • Any numeric parms are converted to ASCII before the compare is done.
  • New Formats (Edit Mask) for Dates
  • For dates stored in CYMD format the new !Datext formats described above can be used directly as a print format.
  • These formats are valid in Visimage3 and on AskPlus print statements and with the !format() operator.
  • If dates are stored in a format other than CYMD, a combination of !datint and !datext is still necessary.
        D1, LOAN-FILE.DUE-DATE, "Ddd Mmmm d, yyyy", tab1
Fixes:
  • Fix a bug in !cymd-diff-mths - The wrong number of months could be calculated when one of the dates was eom.
  • Fix Convert Bug (Float to Int), for example, "67.71" * 100 did not work.
In a few instances, reading a float from an ASCII file and converting to INT had a rounding error in earlier releases.
  • Limit warning messages in the selection to print a maximum of 50 times.
Previously available in Report/Save, now also in Find.
  • Modify !isnum() and !isdate() to return True/False (K1) instead of attempting to return a numeric value
  • Previous versions of !isnum returned inconsistent results
  • For backwards compatibility rename the original versions as !isnumorig() and !isdateorig()
  • Fix !Even() on Itanium.
  • Fix a core dump when opening SD or INDEXED files with missing files or inconsistent access permissions
  • Fix a core dump when the select file cannot be created.

AskPlus E.8.3.3

Released 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 were included when dealing with date comparisons.