*pbp_b17.sas;

libname out '.\sas_data_sets\PBP';
options pageno=1 linesize = 200 nocenter;

data pbp_b17;

length
	pbp_a_hnumber                    $5
	pbp_a_plan_identifier            $3
	pbp_a_ben_cov                    $1
	pbp_a_plan_type                  $2
	orgtype                          $2
	bid_id                           $13
	pbp_b17a_bendesc_yn              $1
	pbp_b17a_bendesc_enh             $1
	pbp_b17a_bendesc_amo_rex         $1
	pbp_b17a_bendesc_lim             $1
	pbp_b17a_bendesc_per             $1
	pbp_b17a_maxplan_yn              $1
	pbp_b17a_maxplan_in_oon          $1
	pbp_b17a_maxplan_per             $1
	pbp_b17a_maxenr_yn               $1
	pbp_b17a_maxenr_per              $1
	pbp_b17a_coins_yn                $1
	pbp_b17a_coins_ehc               $2
	pbp_b17a_ded_yn                  $1
	pbp_b17a_copay_yn                $1
	pbp_b17a_copay_ehc               $2
	pbp_b17a_cost_share              $1
	pbp_b17a_cost_share_coins_yn     $1
	pbp_b17a_cost_share_copay_yn     $1
	pbp_b17a_auth                    $5
	pbp_b17a_refer_yn                $1
	pbp_b17b_bendesc_yn              $1
	pbp_b17b_bendesc_enh             $5
	pbp_b17b_bendesc_amo_cl          $1
	pbp_b17b_bendesc_lim_cl          $1
	pbp_b17b_bendesc_per_cl          $1
	pbp_b17b_bendesc_amo_egs         $1
	pbp_b17b_bendesc_lim_egs         $1
	pbp_b17b_bendesc_per_egs         $1
	pbp_b17b_bendesc_amo_egi         $1
	pbp_b17b_bendesc_lim_egl         $1
	pbp_b17b_bendesc_per_egl         $1
	pbp_b17b_bendesc_amo_egf         $1
	pbp_b17b_bendesc_lim_egf         $1
	pbp_b17b_bendesc_per_egf         $1
	pbp_b17b_bendesc_amo_upg         $1
	pbp_b17b_maxplan_yn              $1
	pbp_b17b_maxplan_in_oon          $1
	pbp_b17b_maxplan_type            $1
	pbp_b17b_comb_maxplan_yn         $1
	pbp_b17b_comb_maxplan_per        $1
	pbp_b17b_indv_maxplan_bendesc    $5
	pbp_b17b_indv_maxplan_per_cl     $1
	pbp_b17b_indv_maxplan_per_egs    $1
	pbp_b17b_indv_maxplan_per_egl    $1
	pbp_b17b_indv_maxplan_per_egf    $1
	pbp_b17b_indv_maxplan_per_upg    $1
	pbp_b17b_maxenr_yn               $1
	pbp_b17b_maxenr_type             $1
	pbp_b17b_maxenr_per              $1
	pbp_b17b_coins_yn                $1
	pbp_b17b_coins_ehc               $6
	pbp_b17b_ded_yn                  $1
	pbp_b17b_copay_yn                $1
	pbp_b17b_copay_ehc               $6
	pbp_b17b_auth                    $5
	pbp_b17b_refer_yn                $1
;

infile '.\pbp\pbp_b17_eye_exams_wear.txt' delimiter = '09'x
dsd lrecl = 30000 firstobs=2 missover;


input
	pbp_a_hnumber
	pbp_a_plan_identifier
	segment_id
	pbp_a_ben_cov
	pbp_a_plan_type
	orgtype
	bid_id
	version
	pbp_b17a_bendesc_yn
	pbp_b17a_bendesc_enh
	pbp_b17a_bendesc_amo_rex
	pbp_b17a_bendesc_lim
	pbp_b17a_bendesc_numv
	pbp_b17a_bendesc_per
	pbp_b17a_maxplan_yn
	pbp_b17a_maxplan_in_oon
	pbp_b17a_maxplan_amt
	pbp_b17a_maxplan_per
	pbp_b17a_maxenr_yn
	pbp_b17a_maxenr_amt
	pbp_b17a_maxenr_per
	pbp_b17a_coins_yn
	pbp_b17a_coins_ehc
	pbp_b17a_coins_mcmin_pct
	pbp_b17a_coins_mcmax_pct
	pbp_b17a_coins_rexmin_pct
	pbp_b17a_coins_rexmax_pct
	pbp_b17a_ded_yn
	pbp_b17a_ded_amt
	pbp_b17a_copay_yn
	pbp_b17a_copay_ehc
	pbp_b17a_copay_mcmin_amt
	pbp_b17a_copay_mcmax_amt
	pbp_b17a_copay_rexmin_amt
	pbp_b17a_copay_rexmax_amt
	pbp_b17a_cost_share
	pbp_b17a_cost_share_coins_yn
	pbp_b17a_cost_share_coins_min
	pbp_b17a_cost_share_coins_max
	pbp_b17a_cost_share_copay_yn
	pbp_b17a_cost_share_copay_min
	pbp_b17a_cost_share_copay_max
	pbp_b17a_auth
	pbp_b17a_refer_yn
	pbp_b17b_bendesc_yn
	pbp_b17b_bendesc_enh
	pbp_b17b_bendesc_amo_cl
	pbp_b17b_bendesc_lim_cl
	pbp_b17b_bendesc_numv_cl
	pbp_b17b_bendesc_per_cl
	pbp_b17b_bendesc_amo_egs
	pbp_b17b_bendesc_lim_egs
	pbp_b17b_bendesc_numv_egs
	pbp_b17b_bendesc_per_egs
	pbp_b17b_bendesc_amo_egi
	pbp_b17b_bendesc_lim_egl
	pbp_b17b_bendesc_numv_egl
	pbp_b17b_bendesc_per_egl
	pbp_b17b_bendesc_amo_egf
	pbp_b17b_bendesc_lim_egf
	pbp_b17b_bendesc_numv_egf
	pbp_b17b_bendesc_per_egf
	pbp_b17b_bendesc_amo_upg
	pbp_b17b_maxplan_yn
	pbp_b17b_maxplan_in_oon
	pbp_b17b_maxplan_type
	pbp_b17b_comb_maxplan_yn
	pbp_b17b_comb_maxplan_amt
	pbp_b17b_comb_maxplan_per
	pbp_b17b_indv_maxplan_bendesc
	pbp_b17b_indv_maxplan_amt_cl
	pbp_b17b_indv_maxplan_per_cl
	pbp_b17b_indv_maxplan_amt_egs
	pbp_b17b_indv_maxplan_per_egs
	pbp_b17b_indv_maxplan_amt_egl
	pbp_b17b_indv_maxplan_per_egl
	pbp_b17b_indv_maxplan_amt_egf
	pbp_b17b_indv_maxplan_per_egf
	pbp_b17b_indv_maxplan_amt_upg
	pbp_b17b_indv_maxplan_per_upg
	pbp_b17b_maxenr_yn
	pbp_b17b_maxenr_type
	pbp_b17b_maxenr_amt
	pbp_b17b_maxenr_per
	pbp_b17b_coins_yn
	pbp_b17b_coins_ehc
	pbp_b17b_coins_pct_mc
	pbp_b17b_coins_pct_cl
	pbp_b17b_coins_pct_egs
	pbp_b17b_coins_pct_egl
	pbp_b17b_coins_pct_egf
	pbp_b17b_coins_pct_upg
	pbp_b17b_ded_yn
	pbp_b17b_ded_amt
	pbp_b17b_copay_yn
	pbp_b17b_copay_ehc
	pbp_b17b_copay_amt_mc
	pbp_b17b_copay_amt_cl
	pbp_b17b_copay_amt_egs
	pbp_b17b_copay_amt_egl
	pbp_b17b_copay_amt_egf
	pbp_b17b_copay_amt_upg
	pbp_b17b_auth
	pbp_b17b_refer_yn
;


label
	pbp_a_hnumber                    = 'H Number'
	pbp_a_plan_identifier            = 'Plan ID'
	segment_id                       = 'Segment ID'
	pbp_a_ben_cov                    = 'Coverage Criteria'
	pbp_a_plan_type                  = 'Plan Type'
	orgtype                          = 'Organization Type'
	bid_id                           = 'Bid ID'
	version                          = 'Version Number'
	pbp_b17a_bendesc_yn              = 'Eye Exams Ben Desc YN'
	pbp_b17a_bendesc_enh             = 'Eye Exams Ben Desc Enhance'
	pbp_b17a_bendesc_amo_rex         = 'Eye Exams REX Ben Desc AMO'
	pbp_b17a_bendesc_lim             = 'Eye Exams REX Ben Desc Lim YN'
	pbp_b17a_bendesc_numv            = 'Eye Exams REX Ben Desc Num'
	pbp_b17a_bendesc_per             = 'Eye Exams REX Ben Desc Per'
	pbp_b17a_maxplan_yn              = 'Eye Exams Max Plan YN'
	pbp_b17a_maxplan_in_oon          = 'In or Out'
	pbp_b17a_maxplan_amt             = 'Eye Exams Max Plan Amt'
	pbp_b17a_maxplan_per             = 'Eye Exams Max Plan Per'
	pbp_b17a_maxenr_yn               = 'Eye Exams Max Enr YN'
	pbp_b17a_maxenr_amt              = 'Eye Exams Max Enr Amt'
	pbp_b17a_maxenr_per              = 'Eye Exams Max Enr Per'
	pbp_b17a_coins_yn                = 'Eye Exams Coinsurance YN'
	pbp_b17a_coins_ehc               = 'Eye Exams have a Coinsurance'
	pbp_b17a_coins_mcmin_pct         = 'Eye Exams MC Min Coins Pct'
	pbp_b17a_coins_mcmax_pct         = 'Eye Exams MC Max Coins Pct'
	pbp_b17a_coins_rexmin_pct        = 'Eye Exams REX Min Coins Pct'
	pbp_b17a_coins_rexmax_pct        = 'Eye Exams REX Max Coins Pct'
	pbp_b17a_ded_yn                  = 'Eye Exams Deductible YN'
	pbp_b17a_ded_amt                 = 'Eye Exams Deductible Amt'
	pbp_b17a_copay_yn                = 'Eye Exams Copayment YN'
	pbp_b17a_copay_ehc               = 'Eye Exams have a Copayment'
	pbp_b17a_copay_mcmin_amt         = 'Eye Exams MC Min Copay Amt'
	pbp_b17a_copay_mcmax_amt         = 'Eye Exams MC Max Copay Amt'
	pbp_b17a_copay_rexmin_amt        = 'Eye Exams REX Min Copay Amt'
	pbp_b17a_copay_rexmax_amt        = 'Eye Exams REX Max Copay Amt'
	pbp_b17a_cost_share              = 'Eye Exam Cost Share YN'
	pbp_b17a_cost_share_coins_yn     = 'Eye Exam Cost Share Coin YN'
	pbp_b17a_cost_share_coins_min    = 'Eye Exam Cost Share Coin Min'
	pbp_b17a_cost_share_coins_max    = 'Eye Exam Cost Share Coin Max'
	pbp_b17a_cost_share_copay_yn     = 'Eye Exam Cost Share Copay YN'
	pbp_b17a_cost_share_copay_min    = 'Eye Exam Cost Share Copay Min'
	pbp_b17a_cost_share_copay_max    = 'Eye Exam Cost Share Copay Max'
	pbp_b17a_auth                    = 'Eye Exams Enrollee Auth'
	pbp_b17a_refer_yn                = 'Eye Exams Referral YN'
	pbp_b17b_bendesc_yn              = 'Eye Wear Ben Desc YN'
	pbp_b17b_bendesc_enh             = 'Eye Wear Ben Desc Enhance'
	pbp_b17b_bendesc_amo_cl          = 'Eye Wear CL Ben Desc AMO'
	pbp_b17b_bendesc_lim_cl          = 'Eye Wear CL Ben Desc Lim YN'
	pbp_b17b_bendesc_numv_cl         = 'Eye Wear CL Ben Desc Num'
	pbp_b17b_bendesc_per_cl          = 'Eye Wear CL Ben Desc Per'
	pbp_b17b_bendesc_amo_egs         = 'Eye Wear EGS Ben Desc AMO'
	pbp_b17b_bendesc_lim_egs         = 'Eye Wear EGS Ben Desc Lim YN'
	pbp_b17b_bendesc_numv_egs        = 'Eye Wear EGS Ben Desc Num'
	pbp_b17b_bendesc_per_egs         = 'Eye Wear EGS Ben Desc Per'
	pbp_b17b_bendesc_amo_egi         = 'Eye Wear EGL Ben Desc AMO'
	pbp_b17b_bendesc_lim_egl         = 'Eye Wear EGL Ben Desc Lim YN'
	pbp_b17b_bendesc_numv_egl        = 'Eye Wear EGL Ben Desc Num'
	pbp_b17b_bendesc_per_egl         = 'Eye Wear EGL Ben Desc Per'
	pbp_b17b_bendesc_amo_egf         = 'Eye Wear EGF Ben Desc AMO'
	pbp_b17b_bendesc_lim_egf         = 'Eye Wear EGF Ben Desc Lim YN'
	pbp_b17b_bendesc_numv_egf        = 'Eye Wear EGF Ben Desc Num'
	pbp_b17b_bendesc_per_egf         = 'Eye Wear EGF Ben Desc Per'
	pbp_b17b_bendesc_amo_upg         = 'Eye Wear UPG Ben Desc AMO'
	pbp_b17b_maxplan_yn              = 'Eye Wear Max Plan YN'
	pbp_b17b_maxplan_in_oon          = 'In or Out'
	pbp_b17b_maxplan_type            = 'Eye Wear Max Plan Type'
	pbp_b17b_comb_maxplan_yn         = 'Eye Wear Comb Max Plan YN'
	pbp_b17b_comb_maxplan_amt        = 'Eye Wear Comb Max Plan Amt'
	pbp_b17b_comb_maxplan_per        = 'Eye Wear Comb Max Plan Per'
	pbp_b17b_indv_maxplan_bendesc    = 'Eye Wear Indiv Max Plan Bendsc'
	pbp_b17b_indv_maxplan_amt_cl     = 'Eye Wear Indv Max Plan Amt CL'
	pbp_b17b_indv_maxplan_per_cl     = 'Eye Wear Indv Max Plan Per CL'
	pbp_b17b_indv_maxplan_amt_egs    = 'Eye Wear Indv Max Plan Amt EGS'
	pbp_b17b_indv_maxplan_per_egs    = 'Eye Wear Indv Max Plan Per EGS'
	pbp_b17b_indv_maxplan_amt_egl    = 'Eye Wear Indv Maxplan Amt EGL'
	pbp_b17b_indv_maxplan_per_egl    = 'Eye Wear Indv Max Plan Per EGL'
	pbp_b17b_indv_maxplan_amt_egf    = 'Eye Wear Indv Max Plan Amt EGF'
	pbp_b17b_indv_maxplan_per_egf    = 'Eye Wear Indv Max Plan Per EGF'
	pbp_b17b_indv_maxplan_amt_upg    = 'Eye Wear Indv Max Plan Amt UPG'
	pbp_b17b_indv_maxplan_per_upg    = 'Eye Wear Indv Max Plan Per UPG'
	pbp_b17b_maxenr_yn               = 'Eye Wear Max Enr YN'
	pbp_b17b_maxenr_type             = 'Eye Wear Max Enr Type'
	pbp_b17b_maxenr_amt              = 'Eye Wear Max Enr Amt'
	pbp_b17b_maxenr_per              = 'Eye Wear Max Enr Per'
	pbp_b17b_coins_yn                = 'Eye Wear Coinsurance YN'
	pbp_b17b_coins_ehc               = 'Eye Wear Benefits Coinsurance'
	pbp_b17b_coins_pct_mc            = 'Eye Wear MC Coins Pct'
	pbp_b17b_coins_pct_cl            = 'Eye Wear CL Coins Pct'
	pbp_b17b_coins_pct_egs           = 'Eye Wear EGS Coins Pct'
	pbp_b17b_coins_pct_egl           = 'Eye Wear EGL Coins Pct'
	pbp_b17b_coins_pct_egf           = 'Eye Wear EGF Coins Pct'
	pbp_b17b_coins_pct_upg           = 'Eye Wear UPG Coins Pct'
	pbp_b17b_ded_yn                  = 'Eye Wear Deductible YN'
	pbp_b17b_ded_amt                 = 'Eye Wear Deductible Amt'
	pbp_b17b_copay_yn                = 'Eye Wear Copayment YN'
	pbp_b17b_copay_ehc               = 'Eye Wear Benefits Copayment'
	pbp_b17b_copay_amt_mc            = 'Eye Wear MC Copay Amt'
	pbp_b17b_copay_amt_cl            = 'Eye Wear CL Copay Amt'
	pbp_b17b_copay_amt_egs           = 'Eye Wear EGS Copay Amt'
	pbp_b17b_copay_amt_egl           = 'Eye Wear EGL Copay Amt'
	pbp_b17b_copay_amt_egf           = 'Eye Wear EGF Copay Amt'
	pbp_b17b_copay_amt_upg           = 'Eye Wear UPG Copay Amt'
	pbp_b17b_auth                    = 'Eye Wear Enrollee Auth'
	pbp_b17b_refer_yn                = 'Eye Wear Referral YN'
;

run;

proc sort data = pbp_b17 out=out.pbp_b17;
  by Pbp_a_hnumber pbp_a_plan_identifier segment_id;
run;

proc print data = out.pbp_b17(obs = 10);
  title 'pbp_b17_eye_exams_wear file ';
run;

proc means data = out.pbp_b17;
  title 'pbp_b17_eye_exams_wear file ';
run;

proc freq data = out.pbp_b17;
table
	pbp_a_ben_cov
	pbp_a_plan_type
	orgtype
	pbp_b17a_bendesc_yn
	pbp_b17a_bendesc_enh
	pbp_b17a_bendesc_amo_rex
	pbp_b17a_bendesc_lim
	pbp_b17a_bendesc_per
	pbp_b17a_maxplan_yn
	pbp_b17a_maxplan_in_oon
	pbp_b17a_maxplan_per
	pbp_b17a_maxenr_yn
	pbp_b17a_maxenr_per
	pbp_b17a_coins_yn
	pbp_b17a_coins_ehc
	pbp_b17a_ded_yn
	pbp_b17a_copay_yn
	pbp_b17a_copay_ehc
	pbp_b17a_cost_share
	pbp_b17a_cost_share_coins_yn
	pbp_b17a_cost_share_copay_yn
	pbp_b17a_auth
	pbp_b17a_refer_yn
	pbp_b17b_bendesc_yn
	pbp_b17b_bendesc_enh
	pbp_b17b_bendesc_amo_cl
	pbp_b17b_bendesc_lim_cl
	pbp_b17b_bendesc_per_cl
	pbp_b17b_bendesc_amo_egs
	pbp_b17b_bendesc_lim_egs
	pbp_b17b_bendesc_per_egs
	pbp_b17b_bendesc_amo_egi
	pbp_b17b_bendesc_lim_egl
	pbp_b17b_bendesc_per_egl
	pbp_b17b_bendesc_amo_egf
	pbp_b17b_bendesc_lim_egf
	pbp_b17b_bendesc_per_egf
	pbp_b17b_bendesc_amo_upg
	pbp_b17b_maxplan_yn
	pbp_b17b_maxplan_in_oon
	pbp_b17b_maxplan_type
	pbp_b17b_comb_maxplan_yn
	pbp_b17b_comb_maxplan_per
	pbp_b17b_indv_maxplan_bendesc
	pbp_b17b_indv_maxplan_per_cl
	pbp_b17b_indv_maxplan_per_egs
	pbp_b17b_indv_maxplan_per_egl
	pbp_b17b_indv_maxplan_per_egf
	pbp_b17b_indv_maxplan_per_upg
	pbp_b17b_maxenr_yn
	pbp_b17b_maxenr_type
	pbp_b17b_maxenr_per
	pbp_b17b_coins_yn
	pbp_b17b_ded_yn
	pbp_b17b_copay_yn
	pbp_b17b_auth
	pbp_b17b_refer_yn
/ missing;
run;

proc contents data = out.pbp_b17;
  title 'pbp_b17 data';
run;
