-SET &ECHO = ALL;
JOIN
AA_GIFT_DETAIL.AA_GIFT_DETAIL.GIFT_ENTRY_USER IN AA_GIFT_DETAIL TO MULTIPLE
V_NCAT_AG_CASHIER.V_NCAT_AG_CASHIER.AGBCSHR_USER IN V_NCAT_AG_CASHIER AS J0
END
JOIN
AA_GIFT_DETAIL.AA_GIFT_DETAIL.ID IN AA_GIFT_DETAIL TO UNIQUE
SPRIDEN.SPRIDEN.SPRIDEN_ID IN SPRIDEN AS J1
END
JOIN
SPRIDEN.SPRIDEN.SPRIDEN_PIDM IN AA_GIFT_DETAIL TO MULTIPLE
SPRADDR.SPRADDR.SPRADDR_PIDM IN SPRADDR AS J2
END
JOIN SPRADDR.SPRADDR.SPRADDR_PIDM IN AA_GIFT_DETAIL TO
APBCONS.APBCONS.APBCONS_PIDM IN APBCONS AS J7
END
JOIN
LEFT_OUTER SPRIDEN.SPRIDEN.SPRIDEN_ID IN AA_GIFT_DETAIL TO UNIQUE
AA_CONSTITUENT_IDENTIFICATION.AA_CONSTITUENT_IDENTIFICATION.ID_NUMBER
IN AA_CONSTITUENT_IDENTIFICATION AS J3
END
JOIN
LEFT_OUTER AA_GIFT_DETAIL.AA_GIFT_DETAIL.PIDM_KEY IN AA_GIFT_DETAIL TO MULTIPLE
AOBORGN_PIDM IN AOBORGN AS J4
END
JOIN
LEFT_OUTER AA_GIFT_DETAIL.AA_GIFT_DETAIL.PIDM_KEY IN AA_GIFT_DETAIL TO UNIQUE
AGRGAUX_PIDM IN AGRGAUX AS J5
END
JOIN
AA_GIFT_DETAIL.AA_GIFT_DETAIL.DESIGNATION_KEY IN AA_GIFT_DETAIL TO UNIQUE
ADBDESG.ADBDESG.ADBDESG_DESG IN ADBDESG AS J6
END
JOIN
AA_CONSTITUENT_IDENTIFICATION.AA_CONSTITUENT_IDENTIFICATION.SPOUSE_ID IN
AA_GIFT_DETAIL TO UNIQUE
AA_CONSTITUENT_IDENTIFICATION.AA_CONSTITUENT_IDENTIFICATION.ID_NUMBER
IN AA_CONSTITUENT_IDENTIFICATION AS J9
END
DEFINE FILE AA_GIFT_DETAIL
GOTO_IND/A3=IF SPRIDEN_FIRST_NAME EQ MISSING THEN 'ORG' ELSE 'IND';
LETTERCODE/A4=
IF PGVE_CODE EQ 'UNIV' THEN 'UNIV'
ELSE IF PGVE_CODE EQ 'ALUM' THEN 'UNIV'
ELSE IF PGVE_CODE IS MISSING OR PGVE_CODE EQ 'TPPT' AND ADBDESG_DGRP_CODE NE 'VICT' THEN 'FOUN'
ELSE IF ADBDESG_DGRP_CODE EQ 'VICT' AND DESIGNATION_NAME LIKE '%Victory%' THEN 'FOUN'
ELSE ' ';
CNT/I5=1;
PREF/A22=IF NAME_PREFIX NE ' ' THEN NAME_PREFIX ELSE '';
CONT_PREF/A22=IF AOBORGN_PREFIX_CONTACT NE ' ' THEN AOBORGN_PREFIX_CONTACT||'. ' ELSE ' ';
MID_INIT/A3=IF MIDDLE_INITIAL EQ MISSING THEN '' ELSE MIDDLE_INITIAL||'. ';
CONT_MID_INIT/A3=IF AOBORGN_MI_CONTACT EQ MISSING THEN '' ELSE AOBORGN_MI_CONTACT||'. ';
SPMID/A2=IF J9MIDDLE_INITIAL EQ MISSING THEN ' ' ELSE J9MIDDLE_INITIAL||('.');
SPLT_AMT/D20.2=GIFT_CREDIT_AMT * 2;
JT_FLAG/A1=IF SPLT_AMT EQ GIFT_AMT THEN 'Y' ELSE 'N';
SUFF/A25=IF NAME_SUFFIX EQ 'Jr' OR NAME_SUFFIX EQ 'Sr' OR NAME_PREFIX EQ 'III' OR NAME_PREFIX EQ 'IV' THEN NAME_SUFFIX ELSE ' ';
SUFF2/A28=IF SUFF EQ 'Jr' OR 'Sr' THEN ','||(' '|SUFF)||'.' ELSE SUFF;
SPOUSEPREF/A39=IF J9NAME_PREFIX EQ 'Hon' THEN 'Honorable' ELSE J9NAME_PREFIX||'.';
SPOUSESUFF/A25=IF SPOUSE_NAME_SUFFIX EQ 'Jr' OR SPOUSE_NAME_SUFFIX EQ 'Sr' OR SPOUSE_NAME_SUFFIX EQ 'III' OR SPOUSE_NAME_SUFFIX EQ 'IV' THEN SPOUSE_NAME_SUFFIX ELSE ' ';
SPOUSESUFF2/A28=IF SPOUSESUFF EQ 'Jr' OR 'Sr' THEN ','||(' '|SPOUSESUFF)||'.' ELSE SPOUSESUFF;
SPOUSE/A200=SPOUSE_NAME_PREFIX||('. '|SPOUSE_FIRST_NAME)||(' '|SPMID)||(' '|SPOUSE_LAST_NAME)||SPOUSESUFF2;
JTPREF/A150=
IF NAME_PREFIX EQ 'Hon' AND J9NAME_PREFIX EQ 'Hon' THEN 'Honorables'||(' '|LAST_NAME)
ELSE IF NAME_PREFIX EQ J9NAME_PREFIX THEN PREF || 's'||('. '|LAST_NAME)
ELSE IF GENDER EQ 'M' THEN PREF||'.'||(' and '|SPOUSEPREF)||(' '|LAST_NAME)
ELSE SPOUSEPREF||(' and '|PREF)||'.'||(' '|LAST_NAME);
NAME/A140=
(NAME_PREFIX) ||
(' ' |FIRST_NAME) ||
(' ' |MIDDLE_NAME) ||
(' ' |LAST_NAME)||
(' ' |NAME_SUFFIX);
IND_ENTIRE_NAME/A190=
IF FIRST_NAME NE MISSING THEN PREF||('. ' |SPRIDEN_FIRST_NAME)||(' ' |MID_INIT)||('' |SPRIDEN_LAST_NAME)||SUFF2
ELSE ' ';
DESG/A2=EDIT(DESIGNATION_KEY, '$9$$$$');
GIFT_TOT/D7.2CSM=GIFT_AMT;
GDATE/YYMD=HDATE(GIFT_DATE, 'YYMD');
GDATE2/MDYY=HDATE(GIFT_DATE, 'MDYY');
USER_START_DATE/MDYY=HDATE(AGBCSHR_START_DATE, 'MDYY');
USER_END_DATE/MDYY=HDATE(AGBCSHR_END_DATE, 'MDYY');
V1/A190=SPRADDR_STREET_LINE1;
V2/A190=
IF V1 CONTAINS 'Way' OR 'Drop' OR 'State' OR 'Drive' OR 'Road' OR 'Street' OR 'Terrace' OR 'Lane' OR 'Boulevard' OR 'Avenue' OR 'Circle' OR 'Parkway' OR 'Apartment' OR 'Trail' OR 'Court'
THEN SPRADDR_STREET_LINE1
ELSE IF V1 CONTAINS 'Dr ' THEN STRREP(90, V1, 2, 'Dr', 5, 'Drive', 90, 'A190')
ELSE IF V1 CONTAINS 'Rd' THEN STRREP(90, V1, 2, 'Rd', 4, 'Road', 90, 'A190')
ELSE IF V1 CONTAINS 'Ter ' THEN STRREP(90, V1, 3, 'Ter', 7, 'Terrace', 90, 'A190')
ELSE IF V1 CONTAINS 'Cir ' THEN STRREP(90, V1, 3, 'Cir', 6, 'Circle', 90, 'A190')
ELSE IF V1 CONTAINS 'Ave' THEN STRREP(90, V1, 3, 'Ave', 6, 'Avenue', 90, 'A190')
ELSE IF V1 CONTAINS 'Blvd' THEN STRREP(90, V1, 4, 'Blvd', 9, 'Boulevard', 90, 'A190')
ELSE IF V1 CONTAINS 'Ln' THEN STRREP(90, V1, 2, 'Ln', 4, 'Lane', 90, 'A190')
ELSE IF V1 CONTAINS 'Pkwy' THEN STRREP(90, V1, 4, 'Pkwy', 7, 'Parkway', 90, 'A190')
ELSE IF V1 CONTAINS 'Trl' THEN STRREP(90, V1, 3, 'Trl', 5, 'Trail', 90, 'A190')
ELSE IF V1 CONTAINS 'Apt' THEN STRREP(90, V1, 3, 'Apt', 9, 'Apartment', 90, 'A190')
ELSE IF V1 CONTAINS 'Ct' THEN STRREP(90, V1, 2, 'Ct', 5, 'Court', 90, 'A190')
ELSE IF V1 CONTAINS 'St ' THEN STRREP(90, V1, 2, 'St', 6, 'Street', 90, 'A190')
ELSE SPRADDR_STREET_LINE1;
V3/A190=SPRADDR_STREET_LINE2;
V4/A190=
IF V3 CONTAINS 'Way' OR 'Drop' OR 'State' OR 'Drive' OR 'Road' OR 'Street' OR 'Terrace' OR 'Lane' OR 'Boulevard' OR 'Avenue' OR 'Circle' OR 'Parkway' OR 'Apartment' OR 'Trail' OR 'Court'
THEN SPRADDR_STREET_LINE2
ELSE IF V3 CONTAINS 'Dr ' THEN STRREP(90, V3, 2, 'Dr', 5, 'Drive', 90, 'A190')
ELSE IF V3 CONTAINS 'Rd' THEN STRREP(90, V3, 2, 'Rd', 4, 'Road', 90, 'A190')
ELSE IF V3 CONTAINS 'Ter ' THEN STRREP(90, V3, 3, 'Ter', 7, 'Terrace', 90, 'A190')
ELSE IF V3 CONTAINS 'Cir ' THEN STRREP(90, V3, 3, 'Cir', 6, 'Circle', 90, 'A190')
ELSE IF V3 CONTAINS 'Ave' THEN STRREP(90, V3,3, 'Ave', 6, 'Avenue', 90, 'A190')
ELSE IF V3 CONTAINS 'Blvd' THEN STRREP(90, V3, 4, 'Blvd', 9, 'Boulevard', 90, 'A190')
ELSE IF V3 CONTAINS 'Ln' THEN STRREP(90, V3, 2, 'Ln', 4, 'Lane', 90, 'A190')
ELSE IF V3 CONTAINS 'Pkwy' THEN STRREP(90, V3, 4, 'Pkwy', 7, 'Parkway', 90, 'A190')
ELSE IF V3 CONTAINS 'Trl' THEN STRREP(90, V3, 3, 'Trl', 5, 'Trail', 90, 'A190')
ELSE IF V3 CONTAINS 'Apt' THEN STRREP(90, V3, 3, 'Apt', 9, 'Apartment', 90, 'A190')
ELSE IF V3 CONTAINS 'Ct' THEN STRREP(90, V3, 2, 'Ct', 5, 'Court', 90, 'A190')
ELSE IF V3 CONTAINS 'St ' THEN STRREP(90, V3, 2, 'St', 6, 'Street', 90, 'A190')
ELSE SPRADDR_STREET_LINE2;
V5/A190=SPRADDR_STREET_LINE3;
V6/A190=
IF V5 CONTAINS 'Way' OR 'Drop' OR 'State' OR 'Drive' OR 'Road' OR 'Street' OR 'Terrace' OR 'Lane' OR 'Boulevard' OR 'Avenue' OR 'Circle' OR 'Parkway' OR 'Apartment' OR 'Trail' OR 'Court'
THEN SPRADDR_STREET_LINE3
ELSE IF V5 CONTAINS 'Dr ' THEN STRREP(90, V5, 2, 'Dr', 5, 'Drive', 90, 'A190')
ELSE IF V5 CONTAINS 'Rd' THEN STRREP(90, V5, 2, 'Rd', 4, 'Road', 90, 'A190')
ELSE IF V5 CONTAINS 'Ter ' THEN STRREP(90, V5, 3, 'Ter', 7, 'Terrace', 90, 'A190')
ELSE IF V5 CONTAINS 'Cir ' THEN STRREP(90, V5, 3, 'Cir', 6, 'Circle', 90, 'A190')
ELSE IF V5 CONTAINS 'Ave' THEN STRREP(90, V5, 3, 'Ave', 6, 'Avenue', 90, 'A190')
ELSE IF V5 CONTAINS 'Blvd' THEN STRREP(90, V5, 4, 'Blvd', 9, 'Boulevard', 90, 'A190')
ELSE IF V5 CONTAINS 'Ln' THEN STRREP(90, V5, 2, 'Ln', 4, 'Lane', 90, 'A190')
ELSE IF V5 CONTAINS 'Pkwy' THEN STRREP(90, V5, 4, 'Pkwy', 7, 'Parkway', 90, 'A190')
ELSE IF V5 CONTAINS 'Trl' THEN STRREP(90, V5, 3, 'Trl', 5, 'Trail', 90, 'A190')
ELSE IF V5 CONTAINS 'Apt' THEN STRREP(90, V5, 3, 'Apt', 9, 'Apartment', 90, 'A190')
ELSE IF V5 CONTAINS 'Ct' THEN STRREP(90, V5, 2, 'Ct', 5, 'Court', 90, 'A190')
ELSE IF V5 CONTAINS 'St ' THEN STRREP(90, V5, 2, 'St', 6, 'Street', 90, 'A190')
ELSE SPRADDR_STREET_LINE3;
V7/A190=PREF_STREET_LINE1;
V8/A190=
IF V7 CONTAINS 'Way' OR 'Drop' OR 'State' OR 'Drive' OR 'Road' OR 'Street' OR 'Terrace' OR 'Lane' OR 'Boulevard' OR 'Avenue' OR 'Circle' OR 'Parkway' OR 'Apartment' OR 'Trail' OR 'Court'
THEN PREF_STREET_LINE1
ELSE IF V7 CONTAINS 'Dr ' THEN STRREP(90, V7, 2, 'Dr', 5, 'Drive', 90, 'A190')
ELSE IF V7 CONTAINS 'Rd' THEN STRREP(90, V7, 2, 'Rd', 4, 'Road', 90, 'A190')
ELSE IF V7 CONTAINS 'Ter ' THEN STRREP(90, V7, 3, 'Ter', 7, 'Terrace', 90, 'A190')
ELSE IF V7 CONTAINS 'Cir ' THEN STRREP(90, V7, 3, 'Cir', 6, 'Circle', 90, 'A190')
ELSE IF V7 CONTAINS 'Ave' THEN STRREP(90, V7, 3, 'Ave', 6, 'Avenue', 90, 'A190')
ELSE IF V7 CONTAINS 'Blvd' THEN STRREP(90, V7, 4, 'Blvd', 9, 'Boulevard', 90, 'A190')
ELSE IF V7 CONTAINS 'Ln' THEN STRREP(90, V7, 2, 'Ln', 4, 'Lane', 90, 'A190')
ELSE IF V7 CONTAINS 'Pkwy' THEN STRREP(90, V7, 4, 'Pkwy', 7, 'Parkway', 90, 'A190')
ELSE IF V7 CONTAINS 'Trl' THEN STRREP(90, V7, 3, 'Trl', 5, 'Trail', 90, 'A190')
ELSE IF V7 CONTAINS 'Apt' THEN STRREP(90, V7, 3, 'Apt', 9, 'Apartment', 90, 'A190')
ELSE IF V7 CONTAINS 'Ct' THEN STRREP(90, V7, 2, 'Ct', 5, 'Court', 90, 'A190')
ELSE IF V7 CONTAINS 'St ' THEN STRREP(90, V7, 2, 'St', 6, 'Street', 90, 'A190')
ELSE PREF_STREET_LINE1;
V9/A190=PREF_STREET_LINE2;
V10/A190=
IF V9 CONTAINS 'Way' OR 'Drop' OR 'State' OR 'Drive' OR 'Road' OR 'Street' OR 'Terrace' OR 'Lane' OR 'Boulevard' OR 'Avenue' OR 'Circle' OR 'Parkway' OR 'Apartment' OR 'Trail' OR 'Court'
THEN PREF_STREET_LINE2
ELSE IF V9 CONTAINS 'Dr ' THEN STRREP(90, V9, 2, 'Dr', 5, 'Drive', 90, 'A190')
ELSE IF V9 CONTAINS 'Rd' THEN STRREP(90, V9, 2, 'Rd', 4, 'Road', 90, 'A190')
ELSE IF V9 CONTAINS 'Ter ' THEN STRREP(90, V9, 3, 'Ter', 7, 'Terrace', 90, 'A190')
ELSE IF V9 CONTAINS 'Cir ' THEN STRREP(90, V9, 3, 'Cir', 6, 'Circle', 90, 'A190')
ELSE IF V9 CONTAINS 'Ave' THEN STRREP(90, V9, 3, 'Ave', 6, 'Avenue', 90, 'A190')
ELSE IF V9 CONTAINS 'Blvd' THEN STRREP(90, V9, 4, 'Blvd', 9, 'Boulevard', 90, 'A190')
ELSE IF V9 CONTAINS 'Ln' THEN STRREP(90, V9, 2, 'Ln', 4, 'Lane', 90, 'A190')
ELSE IF V9 CONTAINS 'Pkwy' THEN STRREP(90, V9, 4, 'Pkwy', 7, 'Parkway', 90, 'A190')
ELSE IF V9 CONTAINS 'Trl' THEN STRREP(90, V9, 3, 'Trl', 5, 'Trail', 90, 'A190')
ELSE IF V9 CONTAINS 'Apt' THEN STRREP(90, V9, 3, 'Apt', 9, 'Apartment', 90, 'A190')
ELSE IF V9 CONTAINS 'Ct' THEN STRREP(90, V9, 2, 'Ct', 5, 'Court', 90, 'A190')
ELSE IF V9 CONTAINS 'St ' THEN STRREP(90, V9, 2, 'St', 6, 'Street', 90, 'A190')
ELSE PREF_STREET_LINE2;
V11/A190=PREF_STREET_LINE3;
V12/A190=
IF V11 CONTAINS 'Way' OR 'Drop' OR 'State' OR 'Drive' OR 'Road' OR 'Street' OR 'Terrace' OR 'Lane' OR 'Boulevard' OR 'Avenue' OR 'Circle' OR 'Parkway' OR 'Apartment' OR 'Trail' OR 'Court'
THEN PREF_STREET_LINE3
ELSE IF V11 CONTAINS 'Dr ' THEN STRREP(90, V11, 2, 'Dr', 5, 'Drive', 90, 'A190')
ELSE IF V11 CONTAINS 'Rd' THEN STRREP(90, V11, 2, 'Rd', 4, 'Road', 90, 'A190')
ELSE IF V11 CONTAINS 'Ter ' THEN STRREP(90, V11, 3, 'Ter', 7, 'Terrace', 90, 'A190')
ELSE IF V11 CONTAINS 'Cir ' THEN STRREP(90, V11, 3, 'Cir', 6, 'Circle', 90, 'A190')
ELSE IF V11 CONTAINS 'Ave' THEN STRREP(90, V11, 3, 'Ave', 6, 'Avenue', 90, 'A190')
ELSE IF V11 CONTAINS 'Blvd' THEN STRREP(90, V11, 4, 'Blvd', 9, 'Boulevard', 90, 'A190')
ELSE IF V11 CONTAINS 'Ln' THEN STRREP(90, V11, 2, 'Ln', 4, 'Lane', 90, 'A190')
ELSE IF V11 CONTAINS 'Pkwy' THEN STRREP(90, V11, 4, 'Pkwy', 7, 'Parkway', 90, 'A190')
ELSE IF V11 CONTAINS 'Trl' THEN STRREP(90, V11, 3, 'Trl', 5, 'Trail', 90, 'A190')
ELSE IF V11 CONTAINS 'Apt' THEN STRREP(90, V11, 3, 'Apt', 9, 'Apartment', 90, 'A190')
ELSE IF V11 CONTAINS 'Ct' THEN STRREP(90, V11, 2, 'Ct', 5, 'Court', 90, 'A190')
ELSE IF V11 CONTAINS 'St ' THEN STRREP(90, V11, 2, 'St', 6, 'Street', 90, 'A190')
ELSE PREF_STREET_LINE3;
ADDRESS/A200=IF SPRIDEN_FIRST_NAME NE ' ' THEN V8 ELSE V2;
ADDRESS1/A200=IF SPRIDEN_FIRST_NAME NE ' ' THEN V10 ELSE V4;
ADDRESS2/A200=IF SPRIDEN_FIRST_NAME NE ' ' THEN V12 ELSE V6;
ADDRESS3/A200=
IF SPRIDEN_FIRST_NAME NE ' ' THEN PREF_CITY||(', '|PREF_STAT_CODE)||(' '|PREF_ZIP)
ELSE SPRADDR_CITY||(', '|SPRADDR_STAT_CODE)||(' '|SPRADDR_ZIP);
TOTALADDRESS2/A290=IF ADDRESS1 EQ ' ' THEN ADDRESS3 ELSE ADDRESS1;
TOTALADDRESS3/A290=IF TOTALADDRESS2 NE ADDRESS3 THEN (IF ADDRESS2 EQ ' ' THEN ADDRESS3 ELSE ADDRESS2) ELSE ' ';
TOTALADDRESS4/A290=IF TOTALADDRESS3 EQ ADDRESS3 THEN ' ' ELSE IF TOTALADDRESS3 EQ ' ' THEN ' ' ELSE ADDRESS3;
SESS_NUM/A7=EDIT(AGBCSHR_SESSION_NUMBER, '$$$9999');
AMPER/A2='&'||'T';
DEAR_INDNAME/A190=
IF SPRIDEN_FIRST_NAME NE MISSING AND JT_FLAG EQ 'N' THEN PREF||('. '|LAST_NAME)
ELSE IF JT_FLAG EQ 'Y' THEN JTPREF ELSE ' ';
END
TABLE FILE AA_GIFT_DETAIL
SUM
COMPUTE CNTR/I5 = IF SPRIDEN_ID EQ LAST SPRIDEN_ID THEN CNTR + 1 ELSE 1;
'SPRIDEN_FIRST_NAME'
'SPRIDEN_LAST_NAME'
'IND_ENTIRE_NAME'
'ADDRESS'
ADDRESS1
ADDRESS2
ADDRESS3
'TOTALADDRESS2'
TOTALADDRESS3
TOTALADDRESS4
'GIFT_TOT'
'V_NCAT_AG_CASHIER.V_NCAT_AG_CASHIER.SESS_NUM'
AMPER
'CONT_MID_INIT'
'AOBORGN.AOBORGN.AOBORGN_FIRST_NAME_CONTACT'
'AOBORGN.AOBORGN.AOBORGN_LAST_NAME_CONTACT'
'AOBORGN.AOBORGN.AOBORGN_SUFFIX_CONTACT'
'AOBORGN.AOBORGN.AOBORGN_TITLE_CONTACT'
'CONT_PREF'
'PREF'
CNT
'LAST_NAME'
'DESG'
DEAR_INDNAME
JT_FLAG
SPOUSE
BY 'GDATE2'
BY 'GIFT_NO_KEY'
BY 'DESIGNATION_NAME'
BY 'GIFT_DESC'
BY 'SPRIDEN_ID'
BY GOTO_IND
WHERE ( GIFT_AMT GT 0 );
WHERE GIFT_CODE EQ 'CK' OR 'CS' OR 'MG' OR 'MO' OR 'WT' OR 'CC' OR 'SE' OR 'ET';
WHERE ( GIFT_ENTRY_DATE GE AGBCSHR_START_DATE ) AND ( GIFT_ENTRY_DATE LE AGBCSHR_END_DATE );
WHERE ( GIFT_ENTRY_USER EQ '&GIFT_ENTRY_USER' );
WHERE ( AGBCSHR_SESSION_NUMBER EQ &AGBCSHR_SESSION_NUMBER);
WHERE LETTERCODE EQ 'FOUN';
WHERE SPRIDEN_CHANGE_IND EQ MISSING;
WHERE SPRADDR_ATYP_CODE EQ APBCONS_ATYP_CODE_PREF OR SPRADDR_ATYP_CODE IN ('MA','HO','E1','W2', 'AP');
WHERE SPRADDR_TO_DATE EQ MISSING AND SPRADDR_STATUS_IND EQ MISSING;
WHERE CAMPAIGN_KEY NE 'EVENT';
ON TABLE NOTOTAL
ON TABLE HOLD AS LETTER FORMAT ALPHA
END
DEFINE FILE LETTER
JACQ/A35='Ms. Jacqueline C. McMillan, COO';
NATA/A45='Ms. Shirlye Grandy, Director of Accounting';
ID_NUM/A30=DESG||SPRIDEN_ID||('-'|SESS_NUM);
TMP_DESIGNATION_NAME/A62 = IF SPRIDEN_ID EQ LAST SPRIDEN_ID
THEN ', ' | DESIGNATION_NAME ELSE DESIGNATION_NAME;
DESGS/A1548 = IF SPRIDEN_ID EQ LAST SPRIDEN_ID
THEN SUBSTR(1548, DESGS, 1, 1486, 1486, 'A1486') || TMP_DESIGNATION_NAME
ELSE TMP_DESIGNATION_NAME;
TITLE/A90=IF AOBORGN_TITLE_CONTACT NE MISSING THEN (', '|AOBORGN_TITLE_CONTACT) ELSE ' ';
DEAR_ORGNAME/A100=IF AOBORGN_LAST_NAME_CONTACT NE ' ' AND SPRIDEN_FIRST_NAME EQ ' ' THEN CONT_PREF||(' '|AOBORGN_LAST_NAME_CONTACT) ELSE 'Sir or Madam';
ORG_CONTACT_NAME/A190=IF AOBORGN_FIRST_NAME_CONTACT EQ ' ' THEN ' '
ELSE CONT_PREF||(''|AOBORGN_FIRST_NAME_CONTACT)||(' '|CONT_MID_INIT)||(''|AOBORGN_LAST_NAME_CONTACT)||(' '|AOBORGN_SUFFIX_CONTACT)||(TITLE);
ORG_NAME/A200=IF SPRIDEN_FIRST_NAME EQ MISSING THEN SPRIDEN_LAST_NAME ELSE IF JT_FLAG EQ 'Y' THEN SPOUSE ELSE IND_ENTIRE_NAME;
DEAR_NAME/A192=IF DEAR_INDNAME EQ ' ' THEN DEAR_ORGNAME||':' ELSE DEAR_INDNAME||':';
NAME1/A190=IF IND_ENTIRE_NAME EQ ' ' THEN ORG_CONTACT_NAME ELSE IND_ENTIRE_NAME;
LETTER1/A3000='in support of the'||(' '|DESGS)||('. '| 'The Foundation and its staff are committed to supporting the University''s programs and to making a difference in the lives of current and future students who attend North Carolina A'||AMPER||' State University.');
TODAY_DT/A20 = DATETRAN(DATECVT(&YYMD, 'I8YYMD', 'DMYY'), '(MDYY)', '(trD)', 'EN', 20, 'A20');
LINE8/A300=IF TOTALADDRESS4 NE ' ' THEN TOTALADDRESS4 ELSE IF TOTALADDRESS3 NE ' ' THEN TOTALADDRESS3 ELSE TOTALADDRESS2;
LINE7/A300=IF LINE8 EQ TOTALADDRESS4 THEN TOTALADDRESS3 ELSE IF LINE8 EQ TOTALADDRESS3 THEN TOTALADDRESS2 ELSE ADDRESS;
LINE6/A300=IF LINE7 EQ TOTALADDRESS3 THEN TOTALADDRESS2 ELSE IF LINE7 EQ TOTALADDRESS2 THEN ADDRESS ELSE IF LINE7 EQ ADDRESS THEN ORG_NAME;
LINE5/A300=IF LINE6 EQ TOTALADDRESS2 THEN ADDRESS ELSE IF LINE6 EQ ADDRESS THEN ORG_NAME ELSE IF (LINE6 EQ ORG_NAME AND ORG_NAME NE NAME1) THEN NAME1 ELSE ' ';
LINE4/A300=IF LINE5 EQ ADDRESS THEN ORG_NAME ELSE IF (LINE5 EQ ORG_NAME AND ORG_NAME NE NAME1) THEN NAME1 ELSE ' ';
LINE3/A300=(IF LINE4 EQ ORG_NAME AND ORG_NAME NE NAME1) THEN NAME1 ELSE IF LINE4 EQ ' ' THEN ' ' ELSE ' ';
LINE2/A300=IF LINE5 EQ ' ' AND LINE6 NE ' ' THEN TODAY_DT ELSE ' ';
LINE1/A300=IF LINE4 EQ ' ' AND LINE5 NE ' ' THEN TODAY_DT ELSE ' ';
LINE0/A300=IF LINE3 EQ ' ' AND LINE4 NE ' ' THEN TODAY_DT ELSE ' ';
LINE/A300=IF LINE3 NE ' ' THEN TODAY_DT ELSE ' ';
END
-RUN
-READ LETTER &GOTO_IND.A3
-IF &GOTO_IND EQ 'IND' THEN GOTO IND ELSE GOTO ORG;
-*-IF &SPRIDEN_FIRST_NAME NE MISSING THEN GOTO IND;
-*-IF &SPRIDEN_FIRST_NAME EQ MISSING THEN GOTO ORG;
-ORG
TABLE FILE LETTER
SUM
GIFT_TOT NOPRINT
BY SPRIDEN_ID NOPRINT
ON SPRIDEN_ID PAGE-BREAK
HEADING
" "
" "
" "
"
""""""""" "
"Dear " "
"On behalf of the Board of Directors of the North Carolina A"Foundation, Inc., I thank you for your generous contribution from"
""" "
"Your continued support is critical to our efforts on behalf of the University."
"Thank you for choosing the University Foundation as a way to share your"
"resources. "
" "
" "
" "
"Sincerely,"
" "
" "
" "
"Mark Kiel"
"Executive Director"
" "
"cc: " " "
" "
" "
" "
"" "
"In accordance with IRS requirements, no goods or services were provided in return "
"for this contribution unless stated otherwise above."
WHERE TOTAL GIFT_TOT GE 250;
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
UNITS=IN,
LEFTMARGIN=1.930556,
RIGHTMARGIN=0.500000,
TOPMARGIN=0.888889,
BOTTOMMARGIN=0.000000,
SQUEEZE=ON,
ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
GRID=OFF,
FONT='TIMES NEW ROMAN',
SIZE=11,
COLOR='BLACK',
BACKCOLOR='NONE',
STYLE=NORMAL,
RIGHTGAP=0.125000,
TOPGAP=0.013889,
BOTTOMGAP=0.027778,
$
TYPE=DATA,
COLUMN=N1,
SIZE=11,
STYLE=NORMAL,
$
TYPE=DATA,
COLUMN=N6,
FONT='TIMES NEW ROMAN',
SIZE=12,
$
TYPE=DATA,
COLUMN=N7,
FONT='TIMES NEW ROMAN',
SIZE=12,
$
TYPE=DATA,
COLUMN=N8,
FONT='TIMES NEW ROMAN',
SIZE=12,
$
TYPE=DATA,
COLUMN=N9,
FONT='TIMES NEW ROMAN',
SIZE=12,
$
TYPE=DATA,
COLUMN=N10,
FONT='TIMES NEW ROMAN',
$
TYPE=TITLE,
STYLE=BOLD,
$
TYPE=TITLE,
COLUMN=N1,
SIZE=12,
$
TYPE=TITLE,
COLUMN=N6,
SIZE=12,
$
TYPE=TITLE,
COLUMN=N7,
SIZE=12,
$
TYPE=TITLE,
COLUMN=N8,
SIZE=12,
$
TYPE=TITLE,
COLUMN=N9,
SIZE=12,
$
TYPE=HEADING,
LINE=18,
OBJECT=FIELD,
ITEM=1,
WRAP=12.00,
$
TYPE=HEADING,
LINE=19,
OBJECT=FIELD,
ITEM=1,
WRAP=6.00,
$
TYPE=TABHEADING,
SIZE=12,
STYLE=BOLD,
$
TYPE=TABFOOTING,
SIZE=12,
STYLE=BOLD,
$
TYPE=HEADING,
LINE=17,
OBJECT=FIELD,
ITEM=1,
WRAP=6,
$
TYPE=FOOTING,
SIZE=12,
$
TYPE=FOOTING,
LINE=2,
OBJECT=TEXT,
ITEM=1,
SIZE=9,
STYLE=ITALIC,
$
TYPE=FOOTING,
LINE=2,
OBJECT=TEXT,
ITEM=2,
SIZE=10,
STYLE=ITALIC,
$
TYPE=SUBHEAD,
SIZE=10,
STYLE=BOLD,
$
TYPE=SUBFOOT,
SIZE=10,
STYLE=BOLD,
$
TYPE=SUBTOTAL,
BY=1,
STYLE=BOLD,
$
TYPE=ACROSSVALUE,
SIZE=9,
$
TYPE=ACROSSTITLE,
STYLE=BOLD,
$
TYPE=GRANDTOTAL,
BACKCOLOR=RGB(210 210 210),
STYLE=BOLD,
$
TYPE=REPORT,
COLUMN=N8,
WRAP=1.555556,
$
ENDSTYLE
-GOTO DONE
-IND
TABLE FILE LETTER
SUM
GIFT_TOT NOPRINT
BY SPRIDEN_ID NOPRINT
ON SPRIDEN_ID PAGE-BREAK
HEADING
" "
" "
" "
"""""""""" "
"Dear " "
"On behalf of the Board of Directors of the North Carolina A"Foundation, Inc., I thank you for your generous contribution of "" "
"Your continued support is critical to our efforts on behalf of the University."
"Thank you for choosing the University Foundation as a way to share your"
"resources. "
" "
" "
" "
"Sincerely,"
" "
" "
" "
"Mark Kiel"
"Executive Director"
" "
"cc: " " "
" "
" "
" "
"" "
"In accordance with IRS requirements, no goods or services were provided in return "
"for this contribution unless stated otherwise above."
WHERE TOTAL GIFT_TOT GE 250;
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
UNITS=IN,
LEFTMARGIN=1.930556,
RIGHTMARGIN=0.500000,
TOPMARGIN=0.888889,
BOTTOMMARGIN=0.000000,
SQUEEZE=ON,
ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
GRID=OFF,
FONT='TIMES NEW ROMAN',
SIZE=11,
COLOR='BLACK',
BACKCOLOR='NONE',
STYLE=NORMAL,
RIGHTGAP=0.125000,
TOPGAP=0.013889,
BOTTOMGAP=0.027778,
$
TYPE=DATA,
COLUMN=N1,
SIZE=11,
STYLE=NORMAL,
$
TYPE=DATA,
COLUMN=N6,
FONT='TIMES NEW ROMAN',
SIZE=12,
$
TYPE=DATA,
COLUMN=N7,
FONT='TIMES NEW ROMAN',
SIZE=12,
$
TYPE=DATA,
COLUMN=N8,
FONT='TIMES NEW ROMAN',
SIZE=12,
$
TYPE=DATA,
COLUMN=N9,
FONT='TIMES NEW ROMAN',
SIZE=12,
$
TYPE=DATA,
COLUMN=N10,
FONT='TIMES NEW ROMAN',
$
TYPE=TITLE,
STYLE=BOLD,
$
TYPE=TITLE,
COLUMN=N1,
SIZE=12,
$
TYPE=TITLE,
COLUMN=N6,
SIZE=12,
$
TYPE=TITLE,
COLUMN=N7,
SIZE=12,
$
TYPE=TITLE,
COLUMN=N8,
SIZE=12,
$
TYPE=TITLE,
COLUMN=N9,
SIZE=12,
$
TYPE=TABHEADING,
SIZE=12,
STYLE=BOLD,
$
TYPE=TABFOOTING,
SIZE=12,
STYLE=BOLD,
$
TYPE=HEADING,
LINE=18,
OBJECT=FIELD,
ITEM=1,
WRAP=6,
$
TYPE=FOOTING,
SIZE=12,
$
TYPE=FOOTING,
LINE=2,
OBJECT=TEXT,
ITEM=1,
SIZE=9,
STYLE=ITALIC,
$
TYPE=FOOTING,
LINE=2,
OBJECT=TEXT,
ITEM=2,
SIZE=10,
STYLE=ITALIC,
$
TYPE=SUBHEAD,
SIZE=10,
STYLE=BOLD,
$
TYPE=SUBFOOT,
SIZE=10,
STYLE=BOLD,
$
TYPE=SUBTOTAL,
BY=1,
STYLE=BOLD,
$
TYPE=ACROSSVALUE,
SIZE=9,
$
TYPE=ACROSSTITLE,
STYLE=BOLD,
$
TYPE=GRANDTOTAL,
BACKCOLOR=RGB(210 210 210),
STYLE=BOLD,
$
TYPE=REPORT,
COLUMN=N8,
WRAP=1.555556,
$
ENDSTYLE
-GOTO DONE
-DONE
END
tbj
Prod WF 8.1.05,Test WF 8.1.05, WINDOWS 7 Platform, Oracle 12
Excel, PDF, Alpha