Member Attributes

From Vital Soft Wiki
Revision as of 23:19, 30 November 2015 by >Johno (Sample ATTRFILE)
Jump to: navigation, search

Overview

Member attributes are used in the Membership_Analysis and Membership_Summary documents. Member attributes allow a quick selection of members who have (or don't have) a particular attribute.

Typical Attributes are:

  • Single Service
  • OK to Send Mail
  • Specific Services, like:
  • Online Banking
  • eStatements
  • Direct Deposit
  • RDC
  • Debit Card
  • Specific share products, like:
  • Savings
  • Checking
  • CD
  • IRA
  • Specific loan products, like:
  • LOC
  • Vehicle
  • Mortgage
  • Other:
  • Charged Off Share
  • Charged Off Loan
  • Delinquent Loan

Attributes can be determined in a variety of ways:

  • Calculated during the nightly core extract. Many attributes are calculated from member level flags, but almost any custom logic may be used.
  • Based on specific share products by editing the SHXREF file.
  • Based on specific loan products by editing the LNXREF file.

The definition of an attribute can combine multiple flags. For example, the OK to Send Mail attribute could check a bad address flag, a deceased flag and an opt-out flag. If any of these flags are set, the attribute would be false. At most 30 attributes can be defined.

Host ATTRFILE

The host ATTRFILE is used to define the attribute names, numbers and their calculation logic. This file is a text file, that must have a very precise layout.

Name (Note) Columns Required Purpose
NBR 1-5 Yes The attribute name.
IDX 6-10 Yes (*) The attribute variable index if this attribute is calculated during the core extract.
CNT 11-15 No The product number if this attribute is to be counted like a product.
PRIMARY.TOPIC 16-45 Yes The primary topic if the attribute is calculated during the core extract. Else N/A.
INCLUDE 46-55 Yes (*) Name of an AskPlus include file if this attribute is calculated during the core extract.
FIELD-NAME 56-75 Yes The name of the attribute field in the loaded document.
Attribute Description 76-105 Yes The displayed name of the attribute in the loaded document.
X 106 Yes A single X character that marks the end of each record.
* Required only if the attribute is being calculated during the host extract.
NBR:
Must be a number between 1 and 30. The number determines the position of the attribute when it is displayed in the document. Attribute numbers do not have to be contiguous.
IDX:
Is the index of the #ATTR variable that calculates the attribute. Refers to the calculation in the AskPlus include file in the INCLUDE column. See examples below.
CNT:
Is the corresponding product number for this attribute. Products are counted and selections can be made based on the product count. To be counted, products must be defined as attributes.
PRIMARY.TOPIC:
Is the name of the primary topic if the attribute is being calculated during the host extract. For example, MEMBRS.MEMBER-FILE. This column must be set to N/A if the attribute is calculated later using SHXREF or LNXREF.
INCLUDE:
The name of a host file located in the same directory as the ATTRFILE. This file must be a valid AskPlus include file that calculates the attribute as #ATTR(IDX), where the IDX is specified in the IDX column.
FIELD-NAME:
Is the name of the field that will be loaded in the Qlik documents. This name will be shown in the Current Selections window and used when making a Document Distribution selection.
Attribute Description:
The attribute description that will be displayed in the Qlik document. See screen shot below.
The X Column:
The last character on each record must be X. This column is used to help ensure that each record has exactly 106 characters. Trailing spaces are not allowed.

Transferring the file to UNIX:

If you edit the file locally and then transfer it to UNIX, make sure the file only contains linefeed characters and does not contain and carriage returns (^M). Using an ASCII file transfer is the easiest way to eliminate unwanted carriage returms. The dos2ux utility will also work. Viewing the file in vi is the easiest way to check for unwanted carriage returns as they will be displayed as ^M.

Sample ATTRFILE

The example below shows a partial ATTRFILE:

NBR__IDX__CNT__PRIMARY.TOPIC_________________INCLUDE___FIELD-NAME__________Attribute Description_________X
1    1         SHLNTOTS.SHLNTOTS             ITOTATTR  SINGLE_SERVICE      Single Service                X
2    1         MEMBRS.MEMBER-FILE            IMBRATTR  OK_TO_MAIL          OK to Mail                    X
3         1    N/A                                     SAVINGS             Savings                       X
4    2         MEMBRS.MEMBER-FILE            IMBRATTR  DIRECT_DEPOSIT      Direct Deposit                X
5         2    N/A                                     CLUB_ACCTS          Club Accounts                 X
6         3    N/A                                     CHECKING_ACCTS      Checking Accounts             X
7         5    N/A                                     SHARE_CERTS         Share Certificates            X
8         6    N/A                                     IRA_SAVING_CDS      IRA Savings/CDs               X
9         7    N/A                                     MMA_SAVINGS         MMA Savings                   X
10   3         MEMBRS.MEMBER-FILE            IMBRATTR  DORMANT             Dormant                       X
11   4         MEMBRS.MEMBER-FILE            IMBRATTR  INACTIVE            Inactive                      X

The first attribute is calculated from an SD file that is created during the load called SHLNTOTS which counts the total number of active (open) shares and loans for each member. The ITOTATTR file contains the following:

* Calculate MEMBER-FILE Attributes from SHLNTOTS:
*
<< Single Service >>
#ATTR(1)=(%VS-ACTIVE-MBR AND SHLNTOTS.MBR-ACTIVE-SH-CNT = 1 AND SHLNTOTS.MBR-ACTIVE-LN-CNT = 0)

Attributes 2, 4, 10 and 11 are calculated from MEMBER-FILE. Notice how the IDX values in the sample ATTRFILE match the #ATTR(idx) in the IMBRATTR file. The IMBRATTR file contains the following.

* Calculate MEMBER-FILE Attributes:

<< OK To Mail >>
#ATTR(1)=(MEMBER-FILE.CONTROL-FLAGS(21) <> 1 AND MEMBER-FILE.CONTROL-FLAGS(24) <> 1 AND
          MEMBER-FILE.CONTROL-FLAGS(29) <> 1 AND MEMBER-FILE.CONTROL-FLAGS(52) <> 1 AND
          MEMBER-FILE.CONTROL-FLAGS(53) <> 1 AND MEMBER-FILE.CONTROL-FLAGS(57) <> 1)

<< Direct Deposit >>
#ATTR(2)=(MEMBER-FILE.CONTROL-FLAGS(59)=1)

<< Dormant >>
#ATTR(3)=(MEMBER-FILE.REST-FLAG-11=79)

<< Inactive >>
#ATTR(4)=(MEMBER-FILE.REST-FLAG-11=90)

<< ATM/Debit Cards >>
#ATTR(5)=(MEMBER-FILE.CONTROL-FLAGS(26)=1)

Attributes from SHXREFCCYYMMDD.xls or LNXREFCCYYMMDD.xls