/* This version: Jan 18, 2012 */ /* This program will add the created variables to an existing */ /* SAS data set that contains a current version of the CFM data */ /* Replace "cfm1" with the name of the existing data set */ /* Replace "cfm2" with the name of the new data set (in both data steps) */ /* The following variables are created: */ /* cc_version have_logo_card have_nonlogo_card have_card */ /* ccnum_logo_1 ccnum_all_1 intrate_1 ccpay_logo_1 */ /* ccpay_all_1 ccdebt_logo_1 ccdebt_nonlogo_1 ccdebt_old_1 */ /* ccdebt_all_1 ccamtowed_logo_1 ccamtowed_all_1 minpay_logo_1 */ /* minpay_all_1 cclimit_logo_1 cclimit_all_1 cccarry_logo_1 */ /* cccharge_logo_1 ccrev_1 ccmaxed_logo_1 ccmaxed_all_1 */ /**********************************************************************/ OPTIONS PAGESIZE=59 LINESIZE=80 PAGENO=1 NODATE ERRORS=1 NOLABEL; %macro range1 (TheValue, First, Second); if &First >= 0 and &Second >= 0 then &TheValue = int((&First + &Second)/2); %mend range1; /************************/ /* READ DATA SECTION */ /************************/ /* Extract all CFM variables. Put file name of SAS file created by NLS Investigator is below. EDIT this file by dropping the format; proc means; and run; commands at the end of the file. */ %Include "C:\Documents and Settings\All Users\Desktop\CFM\AllCFMVariables.sas"; /* Comment the next line out if you want created variables for ALL CFM cases */ %Include "C:\Documents and Settings\All Users\Desktop\CFM\DatesToUse.sas"; TRUE = 1; FALSE = 0; ID = R0000100; run; /**********************************************************************/ DATA CFM; SET new_data; /* Recode SAS internal missing values back to negative numbers */ array nvarlist _numeric_; do over nvarlist; if nvarlist = .R then nvarlist = -1; /* Refused */ if nvarlist = .D then nvarlist = -2; /* Dont know */ if nvarlist = .I then nvarlist = -3; /* Invalid missing */ if nvarlist = .V then nvarlist = -4; /* Valid missing */ if nvarlist = .N then nvarlist = -5; /* Non-interview */ end; /* Begin credit card created variables */ /* -------------------------------------------------------------- */ /* cc_version: survey version (relevant to credit-card variables) */ /* -------------------------------------------------------------- */ /* R5574000 is survey wave */ /* Get interview start and close dates (YYYYMMDD) */ start_date = R0030002*10000 + R0030001*100 + R0030000; close_date = R5430002*10000 + R5430001*100 + R5430000; if close_date <= 20050811 then cc_version = 1; else if R5574000 <= 2 then cc_version = 2; else if R5574000 <= 3 then cc_version = 3; else if close_date <= 20080619 or (close_date <= 20080623 & start_date <= 20080619) then cc_version = 4; else cc_version = 5; /* end cc_version */ /* ------------------------------------------------------ */ /* have_logo_card: one or more logo credit cards */ /* have_nonlogo_card: one or more non-logo credit cards */ /* have_card: one or more credit cards (any type) */ /* ------------------------------------------------------ */ /* Does not include "old" credit cards */ /* Waves 3 and up */ if R5574000 >= 3 then do; /* Any valid response in R0350000 (number of cards) */ /* or R0410000 (paid/not paid) overrides R0340000 */ if (R0340000 > 0 & R0350000 ne 0) or R0350000 > 0 or R0410000 > 0 then have_logo_card = 1; else if R0340000 = 0 or R0350000 = 0 then have_logo_card = 0; else have_logo_card = R0340000; /* Any valid response in R0731000 (number of cards) overrides R0730000 */ if (R0730000 > 0 & R0731000 ne 0) or R0731000 > 0 then have_nonlogo_card = 1; else if R0730000 = 0 or R0731000 = 0 then have_nonlogo_card = 0; else have_nonlogo_card = R0730000; have_card = max(have_logo_card, have_nonlogo_card); end; /* Waves 1 and 2 */ if R5574000 <= 2 then do; /* ncard is a temporary variable used here only */ ncard = max(R9023000, R9024000); /* Any valid response in R9023000 or R9024000 (number of cards) */ /* overrides R0340000 */ if (R0340000 > 0 & ncard ne 0) or ncard > 0 then have_card = 1; else if R0340000 = 0 or ncard = 0 then have_card = 0; else have_card = R0340000; /* logo, nonlogo distinction not made in waves 1 and 2 */ have_logo_card = -6; have_nonlogo_card = -6; end; /* end have_logo_card, have_nonlogo_card, have_card */ /* ---------------------------------------------- */ /* ccnum_logo_1: number of credit cards with logo */ /* ---------------------------------------------- */ /* Waves 3 and up */ if R5574000 >= 3 then do; /* Any valid response in R0350000 overrides R0340000 */ if R0340000 > 0 or R0350000 >= 0 then ccnum_logo_1 = R0350000; else ccnum_logo_1 = R0340000; end; /* Waves 1 and 2: not defined */ if R5574000 <= 2 then ccnum_logo_1 = -6; /* end ccnum_logo_1 */ /* ----------------------------------------------------------------------- */ /* ccnum_all_1: total number of credit cards, including those without logo */ /* ----------------------------------------------------------------------- */ /* Waves 3 and up */ if R5574000 >= 3 then do; /* Get actual number of non-logo cards, if available, */ /* in temporary variable ccnumnologo */ if R0731000 > -4 then ccnumnologo = R0731000; else ccnumnologo = R0730000; /* If there is a valid response for at least one card type, then use it */ /* otherwise use missing data code with higher precedence */ if ccnum_logo_1 < 0 and ccnumnologo < 0 then ccnum_all_1 = max(ccnum_logo_1, ccnumnologo); else ccnum_all_1 = max(0, ccnum_logo_1) + max(0, ccnumnologo); end; /* Waves 1 and 2 */ /* (no distinction made between logo and nonlogo cards) */ if R5574000 <= 2 then do; /* Two versions, one of them must be -4 */ ccnum_all_1 = max(R9023000, R9024000); /* Any valid response in R9023000 or R9023000 overrides R0340000 */ if R0340000 <= 0 and ccnum_all_1 < 0 then ccnum_all_1 = R0340000; end; /* This should account for everyone -- if not, it's an error */ if ccnum_all_1 = -4 then ccnum_all_1 = -3; /* end ccnum_all_1 */ /* --------------------------------------- */ /* intrate_1: interest rate on credit card */ /* --------------------------------------- */ /* Card with highest balance/charged most on/most likely to use */ /* Waves 3 & up */ if R5574000 >= 3 then do; if R0440000 > -4 then do; /* Single card, paid off */ intrate_1 = R0440000; %range1 (intrate_1, R0440000, R0450000); end; else if R0470000 > -4 then do; /* Multiple cards, paid off */ intrate_1 = R0470000; %range1 (intrate_1, R0470000, R0480000); end; else if R0520000 > -4 then do; /* Single card, carry a balance */ intrate_1 = R0520000; %range1 (intrate_1, R0520000, R0530000); end; else if R0570000 > -4 then do; /* Multiple cards, carry a balance */ intrate_1 = R0570000; %range1 (intrate_1, R0570000, R0571000); end; else intrate_1 = -4; end; /* Waves 1 and 2 */ if R5574000 <= 2 then do; /* Card 1 */ intrate_1 = R9047000; %range1 (intrate_1, R9047000, R9048000); end; /* end intrate_1 */ /* --------------------------------------------- */ /* ccpay_logo_1: credit card payments, logo only */ /* --------------------------------------------- */ /* Waves 3 and up */ if R5574000 >= 3 then do; if R5574000 = 3 & R0410000 = 1 then do; /* Wave 3: no payoff amount given if all logo cards paid off */ /* so use previous month's charges and advances as proxy */ if R0360000 > 0 or R0370000 > 0 then ccpay_logo_1 = R0380000; /* No charges or advances in previous month */ else if R0360000 = 0 or R0370000 = 0 then ccpay_logo_1 = 0; /* Missing data */ else ccpay_logo_1 = max(R0360000, R0370000); end; /* One of these 4 variables should contain the payoff amount */ else ccpay_logo_1 = max(R0430000, R0460000, R0500000, R0540000); if ccpay_logo_1 < 0 and have_logo_card < 0 then ccpay_logo_1 = max(ccpay_logo_1, have_logo_card); end; /* Logo/nologo distinction not made in waves 1 and 2 */ if R5574000 <= 2 then ccpay_logo_1 = -6; /* end ccpay_logo_1 */ /* --------------------------------------------------------- */ /* ccpay_all_1: credit card payments, all including non-logo */ /* --------------------------------------------------------- */ /* Waves 3 and up */ if R5574000 >= 3 then do; /* If there is a valid response for at least one card type, then use it */ /* otherwise use missing data code with higher precedence */ if ccpay_logo_1 < 0 and R0740000 < 0 then do; ccpay_all_1 = max(ccpay_logo_1, R0740000); if have_nonlogo_card < 0 then ccpay_all_1 = max(ccpay_all_1, have_nonlogo_card); end; else ccpay_all_1 = max(0, ccpay_logo_1) + max(0, R0740000); end; /* Waves 1 and 2 -- not yet done */ /* end ccpay_all_1 */ /* ---------------------------------------------------------------- */ /* ccdebt_logo_1: credit card debt after payment, logo cards */ /* (including old cards) */ /* ccdebt_old_1: credit card debt, old cards */ /* ccdebt_nonlogo_1: credit card debt after payment, non-logo cards */ /* ---------------------------------------------------------------- */ /* cc1_1 is a temporary variable (debt on current logo cards */ /* after payment) used here and later in this program, but */ /* does not correspond to an R-numbered variable */ /* ccdebt_old_1 is the same in all waves */ ccdebt_old_1 = R0710000; %range1 (ccdebt_old_1, R0710000, R0720000); /* Waves 3 and up */ if R5574000 >= 3 then do; /* Single card or multiple cards, not paid off */ cc1_1 = max(R0510000, R0550000); %range1 (cc1_1, R0510000, R0511000); %range1 (cc1_1, R0550000, R0560000); /* If current logo cards paid off, only debt is on old cards */ if R0410000 = 1 then ccdebt_logo_1 = max(0, ccdebt_old_1); /* Otherwise combine current and old debt */ else do; if cc1_1 < 0 & ccdebt_old_1 < 0 then ccdebt_logo_1 = max(cc1_1, ccdebt_old_1); else ccdebt_logo_1 = max(0, cc1_1) + max(0, ccdebt_old_1); /* Positive value of debt overrides "no card" */ /* "no card" overrides missing value of debt */ /* Otherwise pick missing value code with higher precedence */ if have_logo_card <= 0 then ccdebt_logo_1 = max(ccdebt_logo_1, have_logo_card); end; /* Non-logo cards */ ccdebt_nonlogo_1 = R0750000; end; /* Logo/non-logo distinction not made in waves 1 and 2 */ if R5574000 <= 2 then do; ccdebt_logo_1 = -6; ccdebt_nonlogo_1 = -6; end; /* end ccdebt_logo_1, ccdebt_old_1, ccdebt_nonlogo_1 */ /* ---------------------------------------------------------- */ /* ccdebt_all_1: credit card debt after payment, all cards */ /* ---------------------------------------------------------- */ /* Waves 3 and up */ if R5574000 >= 3 then do; /* Combine debt on logo and non-logo cards */ if ccdebt_logo_1 < 0 & ccdebt_nonlogo_1 < 0 then ccdebt_all_1 = max(ccdebt_logo_1, ccdebt_nonlogo_1); else ccdebt_all_1 = max(0, ccdebt_logo_1) + max(0, ccdebt_nonlogo_1); if have_card <= 0 then ccdebt_all_1 = max(ccdebt_all_1, have_card); end; /* Waves 1 and 2 -- not yet done */ /* end ccdebt_all_1 */ /* -------------------------------------------------------------- */ /* ccamtowed_logo_1: credit card debt before payment, logo cards */ /* (including old cards) */ /* -------------------------------------------------------------- */ /* Waves 3 and up */ if R5574000 >= 3 then do; /* Add payments to get balances before payment */ if ccdebt_logo_1 >= 0 or ccpay_logo_1 >= 0 then ccamtowed_logo_1 = max(0, ccdebt_logo_1) + max(0, ccpay_logo_1); else ccamtowed_logo_1 = max(ccdebt_logo_1, ccpay_logo_1); end; /* Logo/non-logo distinction not made in waves 1 and 2 */ if R5574000 <= 2 then do; ccamtowed_logo_1 = -6; end; /* end ccamtowed_logo_1 */ /* ----------------------------------------------------------- */ /* ccamtowed_all_1: credit card debt before payment, all cards */ /* (waves 3 and up) */ /* ----------------------------------------------------------- */ if R5574000 >= 3 then do; /* Add payments to get balances before payment */ if ccdebt_all_1 >= 0 or ccpay_all_1 >= 0 then ccamtowed_all_1 = max(0, ccdebt_all_1) + max(0, ccpay_all_1); else ccamtowed_all_1 = max(ccdebt_all_1, ccpay_all_1); end; /* end ccamtowed_all_1 (waves 3 and up) */ /* ----------------------------------------------------------- */ /* ccamtowed_all_1: credit card debt before payment, all cards */ /* (waves 1 and 2) */ /* ----------------------------------------------------------- */ if R5574000 <= 2 then do; /* Add total balances before payment */ /* Cards 1-3 */ if R9050000 < 0 & R9050100 < 0 & R9050200 < 0 then ccamtowed_all_1 = max(R9050000, R9050100, R9050200); else ccamtowed_all_1 = max(0, R9050000) + max(0, R9050100) + max(0, R9050200); /* "All other" cards: add charges, cash advances, and balance carried over */ /* (other_charge, other_cash, other_carry are temporary variables */ /* used here only) */ other_charge = R9081000; %range1 (other_charge, R9081000, R9082000); other_cash = R9084000; %range1 (other_cash, R9084000, R9085000); other_carry = R9087000; %range1 (other_carry, R9087000, R9088000); if ccamtowed_all_1 < 0 & other_charge < 0 & other_cash < 0 & other_carry < 0 then do; ccamtowed_all_1 = max(ccamtowed_all_1, other_charge, other_cash, other_carry); /* Identify (some) sources of skips */ if have_card <= 0 then ccamtowed_all_1 = max(ccamtowed_all_1, have_card); /* Missing number of cards */ if R9023000 < 0 & R9024000 < 0 then ccamtowed_all_1 = max(ccamtowed_all_1, R9023000, R9024000); end; else ccamtowed_all_1 = max(0, ccamtowed_all_1) + max(0, other_charge) + max(0, other_cash) + max(0, other_carry); end; /* end ccamtowed_all_1 (waves 1 and 2) */ /* ----------------------------------------------------------- */ /* minpay_logo_1: minimum payment on current logo credit cards */ /* ----------------------------------------------------------- */ /* Does not include any payments on old cards */ /* Waves 3 and up */ if R5574000 >= 3 then do; minpay_logo_1 = R0650000; %range1 (minpay_logo_1, R0650000, R0660000); end; /* Logo/non-logo distinction not made in waves 1 and 2 */ if R5574000 <= 2 then minpay_logo_1 = -6; /* end minpay_logo_1 */ /* ------------------------------------------ */ /* minpay_all_1: minimum payment on all cards */ /* ------------------------------------------ */ /* Does not include any payments on old cards */ /* Waves 3 and up */ if R5574000 >= 3 then do; /* Combine minimum payments on logo cards and non-logo cards */ if minpay_logo_1 < 0 & R0736000 < 0 then minpay_all_1 = max(minpay_logo_1, R0736000); else minpay_all_1 = max(0, minpay_logo_1) + max(0, R0736000); end; /* Waves 1 and 2 */ if R5574000 <= 2 then do; /* Start with "other" cards */ minpay_all_1 = R9089000; %range1 (minpay_all_1, R9089000, R9090000); /* Combine with cards 1-3 */ if minpay_all_1 < 0 & R9052000 < 0 & R9052100 < 0 & R9052200 < 0 then minpay_all_1 = max(minpay_all_1, R9052000, R9052100, R9052200); else minpay_all_1 = max(0, minpay_all_1) + max(0, R9052000) + max(0, R9052100) + max(0, R9052200); end; /* end minpay_all_1 */ /* --------------------------------------------- */ /* cclimit_logo_1: credit limit, logo cards only */ /* --------------------------------------------- */ /* Note: old credit cards are not taken into account */ /* Waves 3 and up */ if R5574000 >= 3 then do; cclimit_logo_1 = R0630000; %range1 (cclimit_logo_1, R0630000, R0640000); /* If maxed out on all (>= 2) cards, use total balance after payment */ /* plus payment if any */ if R0620000 = 1 then do; if cc1_1 >= 0 or R0540000 >= 0 then cclimit_logo_1 = max(0, cc1_1) + max(0, R0540000); else cclimit_logo_1 = max(cc1_1, R0540000); /* (not the same as ccamtowed_logo_1 because */ /* it doesn't include ccdebt_old_1) */ end; /* Impute a value if have_logo_card = 1 but credit limit is zero */ /* 2nd term in the list is balance on logo cards before payoff */ /* (or zero if missing), but not including old cards */ /* Last term in the list is balance corresponding to 2% minimum payment */ if have_logo_card = 1 & cclimit_logo_1 = 0 then cclimit_logo_1 = max (500, max(0, cc1_1) + max(0, ccpay_logo_1), R0380000, minpay_logo_1/0.02); /* Allow a positive value of cclimit_logo_1 to override have_logo_card < 1 */ else if have_logo_card < 1 then cclimit_logo_1 = max(cclimit_logo_1, have_logo_card); end; /* Logo/non-logo distinction not made in waves 1 and 2 */ if R5574000 <= 2 then cclimit_logo_1 = -6; /* end cclimit_logo_1 */ /* ---------------------------------------------------- */ /* cclimit_all_1: credit limit, logo and non-logo cards */ /* ---------------------------------------------------- */ /* Waves 3 and up */ if R5574000 >= 3 then do; /* cclimit_nonlogo is a temporary variable used here only */ cclimit_nonlogo = R0735000; /* Impute a value if have_nonlogo_card = 1 but credit limit is zero */ /* 2nd term in the list is balance on non-logo cards before payoff */ /* (or zero if missing) */ /* Last term in the list is balance corresponding to 2% minimum payment */ /* No data available for charges on non-logo cards */ if have_nonlogo_card = 1 & cclimit_nonlogo = 0 then cclimit_nonlogo = max (500, max(0, R0750000) + max(0, R0740000), R0736000/0.02); else if have_nonlogo_card < 1 then cclimit_nonlogo = max(cclimit_nonlogo, have_nonlogo_card); /* Only one type of credit card */ if have_logo_card = 1 & cclimit_nonlogo = 0 then cclimit_all_1 = cclimit_logo_1; else if have_nonlogo_card = 1 & cclimit_logo_1 = 0 then cclimit_all_1 = cclimit_nonlogo; /* Both types of credit card (or no cards) */ else if cclimit_logo_1 < 0 & cclimit_nonlogo < 0 then cclimit_all_1 = max(cclimit_logo_1, cclimit_nonlogo); else cclimit_all_1 = max(0, cclimit_logo_1) + max(0, cclimit_nonlogo); end; /* Waves 1 and 2 */ if R5574000 <= 2 then do; /* Add credit limits for cards 1-3 and "other" cards*/ if R9044000 < 0 & R9044100 < 0 & R9044200 < 0 & R9078000 < 0 then cclimit_all_1 = max(R9044000, R9044100, R9044200, R9078000); else cclimit_all_1 = max(0, R9044000) + max(0, R9044100) + max(0, R9044200) + max(0, R9078000); /* Impute a value if have_card = 1 but credit limit is zero */ if have_card = 1 & cclimit_all_1 = 0 then cclimit_all_1 = max (500, max(0, ccamtowed_all_1) - max(0, ccdebt_old_1), minpay_all_1/0.02); /* Allow a positive value of cclimit_all_1 to override have_card < 1 */ if have_card < 1 then cclimit_all_1 = max(cclimit_all_1, have_card); /* skip may be due to missing number of cards */ if R9023000 < 0 & R9024000 < 0 then cclimit_all_1 = max(cclimit_all_1, R9023000, R9024000); end; /* end cclimit_all_1 */ /* -------------------------------------------------------- */ /* cccarry_logo_1: balance carried over from previous month */ /* -------------------------------------------------------- */ /* Logo credit card debt before payment, minus previous */ /* month's charges and advances */ /* Does not include balances on "old" cards */ /* Does not include nonlogo cards because charges on these */ /* cards are not available */ if R5574000 >= 3 then do; if ccamtowed_logo_1 >= 0 or R0380000 >= 0 then cccarry_logo_1 = max(0, max(0, ccamtowed_logo_1) - max(0, R0380000)); else cccarry_logo_1 = max(ccamtowed_logo_1, R0380000); end; /* Comparable data not available for waves 1 and 2 */ if R5574000 <= 2 then cccarry_logo_1 = -6; /* end cccarry_logo_1 */ /* ---------------------------------------------------------------------- */ /* cccharge_logo_1: amount charged on logo credit cards in previous month */ /* ---------------------------------------------------------------------- */ /* Waves 3 and up */ if R5574000 >= 3 then do; if R0360000 > 0 or R0370000 > 0 then cccharge_logo_1 = R0380000; else cccharge_logo_1 = max(R0360000, R0370000); end; /* Comparable data not available for waves 1 and 2 */ if R5574000 <= 2 then cccharge_logo_1 = -6; /* end cccharge_logo_1 */ /* ---------------------------------------------------- */ /* ccrev_1: revolver (2), transactor (1) or no card (0) */ /* -----------------------------------------------------*/ /* ccrevlogo, ccrevstore are temporary variables used here only */ /* Waves 3 and up */ if R5574000 >= 3 then do; /* Logo cards (not including old cards) */ /* Paid off */ if R0410000 = 1 then ccrevlogo = 1; else if have_logo_card = 1 then do; /* Check whether balance is zero anyway */ if cc1_1 = 0 then ccrevlogo = 1; /* Didn't pay off balance (including don't know, refused) */ else ccrevlogo = 2; end; else if have_logo_card = 0 then ccrevlogo = 0; else ccrevlogo = max(have_logo_card, R0410000); /* Non-logo cards */ /* If there is a card, any missing balance is assumed to be nonzero */ if (R0730000 = 1 & ccdebt_nonlogo_1 ne 0) or ccdebt_nonlogo_1 > 0 then ccrevstore = 2; else if R0730000 = 1 & ccdebt_nonlogo_1 = 0 then ccrevstore = 1; /* No store card, or missing data */ else ccrevstore = R0730000; ccrev_1 = max(ccrevlogo, ccrevstore); end; /* waves 1 and 2 -- not yet done */ /* end ccrev_1 */ /* ------------------------------------------------------ */ /* ccmaxed_logo_1: number of logo credit cards maxed out */ /* ccmaxed_all_1: total number of credit cards maxed out */ /* ------------------------------------------------------ */ /* Waves 3 and up */ if R5574000 >= 3 then do; /* Multiple cards, not paid off */ if R0600000 = 1 then ccmaxed_logo_1 = R0610000; /* Paid off (one or more cards) */ else if R0410000 = 1 then ccmaxed_logo_1 = 0; /* Single logo card, not paid off */ else do; if cc1_1 >= 0 & cclimit_logo_1 >= 0 then ccmaxed_logo_1 = (cc1_1 >= cclimit_logo_1); /* If either is missing, we can't tell if card is maxed out */ /* so pick the relevant missing data code */ else if cc1_1 >= 0 or cclimit_logo_1 >= 0 then ccmaxed_logo_1 = min(cc1_1, cclimit_logo_1); else ccmaxed_logo_1 = max(cc1_1, cclimit_logo_1); end; /* Add number of non-logo cards maxed out */ if ccmaxed_logo_1 >= 0 or R0760000 >= 0 then ccmaxed_all_1 = max(0, ccmaxed_logo_1) + max(0, R0760000); else ccmaxed_all_1 = max(ccmaxed_logo_1, R0760000); end; /* Comparable data not available for waves 1 and 2 */ if R5574000 <= 2 then do; ccmaxed_logo_1 = -6; ccmaxed_all_1 = -6; end; /* end ccmaxed_logo_1, ccmaxed_all_1*/ /* Drop temporary variables */ drop cc1_1 cclimit_nonlogo ccnumnologo ccrevlogo ccrevstore ncard other_cash other_carry other_charge start_date close_date; if (CCREV_1 = .) then CCREV_1 = -4; if (ccdebt_all_1 = .) then ccdebt_all_1 = -4; if (ccpay_all_1 = .) then ccpay_all_1 = -4; /**********************************************************************/ /* CcCcCcCcCcCcC CREDIT CARDS: End CcCcCcCcCcCcC */ /* Current list of CFM variable names USERID CV-CC_VERSION CV-HAVE_LOGO_CARD CV-HAVE_NONLOGO_CARD CV-HAVE_CARD CV-CCNUM_LOGO CV-CCNUM_ALL CV-INTRATE CV-CCPAY_LOGO CV-CCPAY_ALL CV-CCDEBT_LOGO CV-CCDEBT_NONLOGO CV-CCDEBT_OLD CV-CCDEBT_ALL CV-CCAMTOWED_LOGO CV-CCAMTOWED_ALL CV-MINPAY_LOGO CV-MINPAY_ALL CV-CCLIMIT_LOGO CV-CCLIMIT_ALL CV-CCCARRY_LOGO CV-CCCHARGE_LOGO CV-CCREV CV-CCMAXED_LOGO CV-CCMAXED_ALL */ file 'C:\Documents and Settings\All Users\Desktop\CFM\Step2_CreatedVariables\CFM_Created_CreditCardVars_out.dat' dlm=',' lrecl=512; PUT ID cc_version have_logo_card have_nonlogo_card have_card ccnum_logo_1 ccnum_all_1 intrate_1 ccpay_logo_1 ccpay_all_1 ccdebt_logo_1 ccdebt_nonlogo_1 ccdebt_old_1 ccdebt_all_1 ccamtowed_logo_1 ccamtowed_all_1 minpay_logo_1 minpay_all_1 cclimit_logo_1 cclimit_all_1 cccarry_logo_1 cccharge_logo_1 ccrev_1 ccmaxed_logo_1 ccmaxed_all_1 ; RUN; /**************************/ /* Produce the QName file */ data; file 'C:\Documents and Settings\All Users\Desktop\CFM\Step2_CreatedVariables\CFM_List_CreditCardVars.dat' dlm=',' lrecl=512; PUT 'CV-CC_VERSION'; PUT 'CV-HAVE_LOGO_CARD'; PUT 'CV-HAVE_NONLOGO_CARD'; PUT 'CV-HAVE_CARD'; PUT 'CV-CCNUM'; PUT 'CV-CCNUMX'; PUT 'CV-INTRATE'; PUT 'CV-CCPAY'; PUT 'CV-CCPAYX'; PUT 'CV-CCDEBTLOGO'; PUT 'CV-CCSTOREDEBT'; PUT 'CV-CCDEBT_OLD'; PUT 'CV-CCDEBT'; PUT 'CV-CCDEBTO'; PUT 'CV-CCDEBTOX'; PUT 'CV-MINPAY_LOGO'; PUT 'CV-MINPAY_ALL'; PUT 'CV-CCLIMIT'; PUT 'CV-CCLIMIT_ALL'; PUT 'CV-CCCARRYO'; PUT 'CV-CCCHARGE'; PUT 'CV-CCREV'; PUT 'CV-CCMAXED'; PUT 'CV-CCMAXEDX'; run;