Creating the AskPlus Macro File

From Vital Soft Wiki
Revision as of 19:02, 14 July 2020 by >Johno (Created page with "AskPlus macros are an easy way to save commonly used calculations. When macros are used, the definition of the macro is expanded and the definition is used as though it had b...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

AskPlus macros are an easy way to save commonly used calculations. When macros are used, the definition of the macro is expanded and the definition is used as though it had been typed. Macros may contain parameters.

Sample macros:

macro PRINT-AC-PHONE(area-code, phone-nbr) =  "(" cat !format:X3("ZZZ", area-code) cat ") " cat !format:X8("ZZZ-ZZZZ", phone-nbr)
macro MEM-PHONE =  %PRINT-AC-PHONE(MEMBER-FILE.PHONE-AC, MEMBER-FILE.PHONE)
macro MEM-CSZ = !CVT:X37(MEMBER-FILE.CITY splice "," join MEMBER-FILE.STATE join %fzip)
macro CYMD-TODAY = !datext:x8($SECONDS - %DFLT-HR-OFFSET, "CYMD" )
macro CU-NAME = "Vital Soft Employees Credit Union"
macro share-is-open = (SHARE-FILE.REST-FLAG-11 <> 80,81 and SHARE-FILE.REST-FLAG-12 <> 80, 81 and SHARE-FILE.DESC-ABRV <> "COS")
macro loan-is-chgoff = (LOAN-FILE.ACTION = "O")

The above examples demonstrate a variety of different macros, some with parameters and some without. Several of the macro definitions include other macros. When used, the macro name is always preceded by a percent sign (%macro-name).

Default Spectrum Macro Definitions

Vital Soft provides two sets of default macros for Spectrum clients. The definitions are provided as part of the AskPlus installation and they can also be downloaded separately. The definitions provided in macrodef.samp should not be modified by individual Credit Unions. Vital Soft will periodically provide updates to macrodef so any local changes could be overwritten in future releases. On the other hand, Credit Unions are encouraged to make changes to the definitions provided in usermdef.samp by either modifying existing macros, or by adding new macros.